- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- GCC libgcc will not link correctly - PERL / MYSQL
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2007 09:49 AM
тАО06-28-2007 09:49 AM
I have been spending far too much time trying to get PERL and MYSQL to play nicely with linked 64bit libgcc objects. Does anyone know of a 64bit version of GCC that plays nicely with the latest OPENSSL, MYSQL and most importantly PERL and the libgcc functions?
At first I thought it may be generic gcc builds so I installed gcc (GCC) 4.1.2 and it works almost, but the outcome is the same as with the GCC from HP, The porting center, and Merijn. (Thanks to everyone for those great resources).
PERL compiles, but nothing I do seems to actually use the -static-libgcc flag option and move it into the Makefiles. MYSQL compiles fine and works great up until I try to compile with openssl to support PKI authentication. Then the same libgcc errors show up.
Below are the configure options IтАЩm using, I will attempt to keep this very short.
./configure --prefix=/opt/pacbin/mysql --with-low-memory --enable-thread-safe-client --without-debug \
--with-openssl=/opt/pacbin/openssl --with-openssl-includes=/opt/pacbin/include/openssl \
--enable-local-infile --with-pthread --with-lib-ccflags=-fPIC --disable-shared \
--with-extra-charsets=none --enable-assembler
/opt/pacdev/bin/ld: warning: libgcc_s.sl, needed by /opt/pacbin/lib/libpthread.sl,
not found (try using -rpath or -rpath-link)
/opt/pacdev/bin/ld: conf_to_src: hidden symbol `__divdi3' in /opt/pacbin/lib/libgcc.a(_divdi3.o) is referenced by DSO
/opt/pacdev/bin/ld: final link failed: Nonrepresentable section on output
perl-5.8.8
sh Configure -A prepend:libswanted='pthread ' -de -Dcc=gcc -DfPIC -Dcl -Dprefix=/opt/pacbin \
-Dcccdlflags='-fPIC' \
-Dlddlflags='-shared -static-libgcc -fPIC' \
-Dlddlflags='-b -L/opt/pacdev/lib -L/lib/pa20_64' \
-Dldflags='-L/opt/pacdev/lib -L/lib/pa20_64' \
-Dlibpth=='/opt/pacdev/lib /opt/pacbin/lib /lib/pa20_64 /lib /usr/lib /usr/ccs/lib'
EXAMPLE FAILED TEST.
ext/Digest/MD5/t/files..................../usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '__divdi3' in load module '../lib/auto/MIME/Base64/Base64.sl'.
ext/Unicode/Normalize/t/fcdc............../usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '__umoddi3' in load module '../lib/auto/Unicode/Normalize/Normalize.sl'.
Failed 19 test scripts out of 919, 97.93% okay.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2007 03:31 PM
тАО06-28-2007 03:31 PM
Re: GCC libgcc will not link correctly - PERL / MYSQL
/opt/pacdev/bin/ld: conf_to_src: hidden symbol __divdi3 in /opt/pacbin/lib/libgcc.a(_divdi3.o) is referenced by DSO
So you need to include -lgcc when building those two libs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2007 05:03 PM
тАО06-28-2007 05:03 PM
Re: GCC libgcc will not link correctly - PERL / MYSQL
Directly editing Makefile to test...
If I point it to a directory without the libgcc libraries it does fail. Below is what I'm seeing.
LDDLFLAGS = -b -L/lib/pa20_64 -L/opt/pacbin/lib -lgcc
LDFLAGS = -L/lib/pa20_64 -L/opt/pacbin/lib -lgcc
rm *.o
make
gcc -c -D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -DVERSION=\"0.06\" -DXS_VERSION=\"0.06\" -fPIC "-I../.." byterun.c
byterun.c: In function 'byterun':
byterun.c:173: warning: comparison is always false due to limited range of data type
byterun.c:899: warning: comparison is always false due to limited range of data type
gcc -c -D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -DVERSION=\"0.06\" -DXS_VERSION=\"0.06\" -fPIC "-I../.." ByteLoader.c
Running Mkbootstrap for ByteLoader ()
chmod 644 ByteLoader.bs
rm -f ../../lib/auto/ByteLoader/ByteLoader.sl
/usr/bin/ld -b -L/lib/pa20_64 -L/opt/pacbin/lib -lgcc byterun.o ByteLoader.o -o ../../lib/auto/ByteLoader/ByteLoader.sl \
\
Warning: Some debug info sections were missing.
PXDB aborted.
chmod 755 ../../lib/auto/ByteLoader/ByteLoader.sl
cp ByteLoader.bs ../../lib/auto/ByteLoader/ByteLoader.bs
chmod 644 ../../lib/auto/ByteLoader/ByteLoader.bs
It still fails the make test.
../../lib/auto/ByteLoader/ByteLoader.sl:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /lib/pa20_64:/opt/pacbin/lib
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
5 text 4000000000000000 z---c- D (default)
6 data 8000000100000000 ---m-- D (default)
static branch prediction disabled
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap disabled
echo $LD_LIBRARY_PATH
/opt/pacbin/lib
ll /opt/pacbin/lib/libgcc*
-r-xr-xr-x 1 root sys 368544 Jun 28 22:30 /opt/pacbin/lib/libgcc.a
-rw-r--r-- 1 root sys 165554 Jun 28 22:30 /opt/pacbin/lib/libgcc_eh.a
-r-xr-xr-x 1 root sys 303852 Jun 27 22:32 /opt/pacbin/lib/libgcc_s.4
lrwxr-xr-x 1 root sys 10 Jun 28 22:07 /opt/pacbin/lib/libgcc_s.sl -> libgcc_s.4
-rw-r--r-- 1 root sys 4666 Jun 28 22:30 /opt/pacbin/lib/libgcc_stub.a
I know I must be missing something very basic and simple, though I am stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2007 06:27 PM
тАО06-28-2007 06:27 PM
Solution>/usr/bin/ld -b -L/lib/pa20_64 -L/opt/pacbin/lib -lgcc byterun.o ByteLoader.o -o ByteLoader.sl
Libraries, especially archives must be last on the list, after objects!
The linker sees -lgcc, and thinks that's interesting and ignores it since it isn't needed yet. Then it sees the objects and when it gets to the end, there is nothing it can do.
You can either reorder your LDDLFLAGS and LDFLAGS or you can add -Wl,+n. This will cause ld to work harder and interate over the command line, until no progress.
You should also remove the default lib path:
-L/lib/pa20_64
(And this isn't correct in the first place, it should really be /usr/lib/pa20_64, since /lib is an illusion.)
>I know I must be missing something very basic and simple,
Well it was if you really look at it. ;-)
You could also see the order with "-Wl,-t".
This may be the reason there are lots of libs in the Porting Center with this same unsat problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2007 08:48 AM
тАО06-29-2007 08:48 AM
Re: GCC libgcc will not link correctly - PERL / MYSQL
I did have "-Wl,+n" set, but for some reason it still did not work. However, by going into the sections having this problem:
ByteLoader/
MIME/Base64/
Unicode/Normalize
Deleting the ofending *.sl and relinking it, IE:
/usr/bin/ld -b -L/opt/pacbin/lib byterun.o ByteLoader.o -lgcc -o ../../lib/auto/ByteLoader/ByteLoader.sl
Has resolved the issue. Once again thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2007 09:04 AM
тАО06-29-2007 09:04 AM
Re: GCC libgcc will not link correctly - PERL / MYSQL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2007 12:05 PM
тАО06-29-2007 12:05 PM