- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ld: Can't find library or mismatched ABI for -lnsl...
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
тАО11-13-2007 11:24 PM
тАО11-13-2007 11:24 PM
# make
make all-recursive
make[1]: Entering directory `/shamim/syslog-ng-2.0.2'
Making all in src
make[2]: Entering directory `/shamim/syslog-ng-2.0.2/src'
gcc -g -O2 -Wall -g -o syslog-ng main.o libsyslog-ng.a -static -lnsl -lrt -ll -L/usr/local/lib/hpux32 -lglib-2.0 -lintl
-liconv -L/usr/local/lib -levtlog
ld: Can't find library or mismatched ABI for -lnsl
Fatal error.
collect2: ld returned 1 exit status
make[2]: *** [syslog-ng] Error 1
make[2]: Leaving directory `/shamim/syslog-ng-2.0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/shamim/syslog-ng-2.0.2'
make: *** [all] Error 2
#
------------------------------------------------------------------------------------------------------------
System Details:
---------------
# uname -a
HP-UX kmghp2 B.11.23 U ia64 3887625253 unlimited-user license
# getconf KERNEL_BITS
64
#
#
# Product(s) not contained in a Bundle:
#
GNU_C_C++ 4.2.1
Ignite-UX C.6.7.79 HP-UX System Installation Services
Libnet 1.1.2.1 Libnet
SOE-Openssh 4.3p2-1 SOE-Openssh 4.3p2 - SSH-SecSH protocol suite, encryption for network services
SOE-Perl 5.8.7-0 SOE-Perl 5.8.7 - Practical Extraction and Reporting Language
bison 2.3 bison
byacc 20040328 byacc
flex 2.5.4a flex
gawk 3.1.5 gawk
gettext 0.14.5 gettext
glib 1.2.10 glib
glib2 2.12.4 glib2
gmp 4.2.1 gmp
libgcc 4.1.2 libgcc
libiconv 1.10 libiconv
libol 0.3.18 libol
libpcap 0.9.8 libpcap
libtool 1.5.24 libtool
pkgconfig 0.21 pkgconfig
#
# whereis gcc
gcc: /opt/hp-gcc-4.2.1/bin/gcc /opt/hp-gcc/bin/gcc /opt/gcc-3.0.1-32/man/man1/gcc.11 /opt/hp-gcc-4.2.1/man/man1/gcc.1
/opt/hp-gcc/man/man1/gcc.1
#
# ls -la /usr/local/lib/hpux32/libg*
-rwxr-xr-x 1 root sys 971 Oct 10 2005 /usr/local/lib/hpux32/libgettextlib.la
-r-xr-xr-x 1 root sys 187572 Oct 10 2005 /usr/local/lib/hpux32/libgettextlib.so
-rw-r--r-- 1 root sys 19608 Oct 10 2005 /usr/local/lib/hpux32/libgettextpo.a
-rwxr-xr-x 1 root sys 1029 Oct 10 2005 /usr/local/lib/hpux32/libgettextpo.la
-r-xr-xr-x 1 root sys 22948 Oct 10 2005 /usr/local/lib/hpux32/libgettextpo.so
-rwxr-xr-x 1 root sys 1010 Oct 10 2005 /usr/local/lib/hpux32/libgettextsrc.la
-r-xr-xr-x 1 root sys 425764 Oct 10 2005 /usr/local/lib/hpux32/libgettextsrc.so
-rw-r--r-- 1 root sys 1611132 Oct 4 2006 /usr/local/lib/hpux32/libglib-2.0.a
-rw-r--r-- 1 root sys 884 Oct 4 2006 /usr/local/lib/hpux32/libglib-2.0.la
-r-xr-xr-x 1 root sys 1203484 Oct 4 2006 /usr/local/lib/hpux32/libglib-2.0.so
-rw-r--r-- 1 root sys 837484 Nov 27 2006 /usr/local/lib/hpux32/libglib.a
-rwxr-xr-x 1 root sys 673 Nov 27 2006 /usr/local/lib/hpux32/libglib.la
-r-xr-xr-x 1 root sys 498132 Nov 27 2006 /usr/local/lib/hpux32/libglib.so
-rw-r--r-- 1 root sys 16548 Oct 4 2006 /usr/local/lib/hpux32/libgmodule-2.0.a
-rw-r--r-- 1 root sys 936 Oct 4 2006 /usr/local/lib/hpux32/libgmodule-2.0.la
-r-xr-xr-x 1 root sys 68188 Oct 4 2006 /usr/local/lib/hpux32/libgmodule-2.0.so
-rw-r--r-- 1 root sys 22584 Nov 27 2006 /usr/local/lib/hpux32/libgmodule.a
-rw-r--r-- 1 root sys 694 Nov 27 2006 /usr/local/lib/hpux32/libgmodule.la
-r-xr-xr-x 1 root sys 68660 Nov 27 2006 /usr/local/lib/hpux32/libgmodule.so
-rw-r--r-- 1 root sys 1628698 Jul 15 2006 /usr/local/lib/hpux32/libgmp.a
-rwxr-xr-x 1 root sys 760 Jul 15 2006 /usr/local/lib/hpux32/libgmp.la
-r-xr-xr-x 1 root sys 848472 Jul 15 2006 /usr/local/lib/hpux32/libgmp.so
-rw-r--r-- 1 root sys 762856 Oct 4 2006 /usr/local/lib/hpux32/libgobject-2.0.a
-rw-r--r-- 1 root sys 936 Oct 4 2006 /usr/local/lib/hpux32/libgobject-2.0.la
-r-xr-xr-x 1 root sys 610692 Oct 4 2006 /usr/local/lib/hpux32/libgobject-2.0.so
-rw-r--r-- 1 root sys 25800 Oct 4 2006 /usr/local/lib/hpux32/libgthread-2.0.a
-rw-r--r-- 1 root sys 936 Oct 4 2006 /usr/local/lib/hpux32/libgthread-2.0.la
-r-xr-xr-x 1 root sys 68968 Oct 4 2006 /usr/local/lib/hpux32/libgthread-2.0.so
-rw-r--r-- 1 root sys 16510 Nov 27 2006 /usr/local/lib/hpux32/libgthread.a
-rwxr-xr-x 1 root sys 704 Nov 27 2006 /usr/local/lib/hpux32/libgthread.la
-r-xr-xr-x 1 root sys 69092 Nov 27 2006 /usr/local/lib/hpux32/libgthread.so
#
# file /usr/local/lib/hpux32/libglib-2.0.a
/usr/local/lib/hpux32/libglib-2.0.a: archive file
#
# file /usr/local/lib/hpux32/libglib-2.0.so
/usr/local/lib/hpux32/libglib-2.0.so: ELF-32 shared object file - IA64
#
# file ./src/main.o
./src/main.o: ELF-32 relocatable object file - IA64
#
-------------------------------------------------------------------------------
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2007 11:46 PM
тАО11-13-2007 11:46 PM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
Whats the environment, especially SHLIB_PATH.
I see this code is ELF-32. I'm not an expert, but can code written like that work with an IA-64 system even with 32 bit compatability libraries?
I wonder aloud where did the code come from? Whats the big picture on this project.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 12:09 AM
тАО11-14-2007 12:09 AM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
/usr/local/bin:/usr/local/lib:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/bin/X11:/opt/graphics/common/bin:/opt/upgrade/bin:/usr/contrib/bin/X11:/opt/ipf/bin:/opt/resmon/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/gnome/bin:/opt/ignite/bin:/opt/mozilla:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/gwlm/bin:/opt/vse/bin:/opt/hpvm/bin:/opt/ignite/bin:/usr/sbin/:/sbin:/home/root:/usr/contrib/bin:/usr/local/lib/hpux32:/opt/hp-gcc-4.2.1/bin/gcc:/opt/hp-gcc-4.2.1/bin/:/opt/hp-gcc-4.2.1/bin/:/opt/hp-gcc-4.2.1/bin/:/opt/hp-gcc/bin/:/usr/local/lib/hpux32/
#
Yes this is an ia64 system. And I'm trying to compile syslog_ng for static library linking.
Regards
Shamim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 01:16 AM
тАО11-14-2007 01:16 AM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
Here's why (based on my 11.31 box, but I doubt there's much difference here):
# ll /usr/lib/libnsl*
-r-xr-xr-x 1 bin bin 585728 Jun 4 2006 /usr/lib/libnsl.1
lrwxr-xr-x 1 root sys 10 Jun 28 2006 /usr/lib/libnsl.sl -> ./libnsl.1
-r-xr-xr-x 1 bin bin 98304 Mar 29 2001 /usr/lib/libnsl_s.1
-r-xr-xr-x 1 bin bin 126976 May 30 2006 /usr/lib/libnsl_s.2
lrwxr-xr-x 1 root sys 12 Jun 28 2006 /usr/lib/libnsl_s.sl -> ./libnsl_s.2
# file /usr/lib/libnsl.1
/usr/lib/libnsl.1: PA-RISC1.1 shared library -not stripped
[all the libnsl files here are PA -- PA 32 (SOM) and IPF 32 (ELF-32) are not compatible ABIs, hence the error].
# file /usr/lib/hpux32/libnsl.so
/usr/lib/hpux32/libnsl.so: ELF-32 shared object file - IA64
That's the one you want (for 64-bit, obviously use /usr/lib/hpux64/libnsl.so).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 10:07 PM
тАО11-14-2007 10:07 PM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
>ld: Can't find library or mismatched ABI for -lnsl
If you have a recent linker patch, I've asked this message be split into two parts so you don't have to guess which part of the "or" is wrong.
>SEP: I see this code is ELF-32. I'm not an expert, but can code written like that work with an IA-64 system even with 32 bit compatibility libraries?
ELF-32 is the native 32 bit IPF format. Nothing to do with compatibility libs.
>Don: /usr/lib/hpux32 in your library path as well.
No, that's the default.
# ll /usr/lib/libnsl*
This shows the problem. You can't use -static on IPF. There is no archive versions of libnsl, libc, etc.
What Shamim1 could try is use -Wl,-a,archive_shared.
(It would have been helpful to add -v to the gcc command line to see the linker options.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 10:35 PM
тАО11-14-2007 10:35 PM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
# gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.23
Configured with: /tmp/gcc-4.2.1.tar.gz/gcc-4.2.1/configure --host=ia64-hp-hpux11.23 --target=ia64-hp-hpux11.23 --build=ia64-hp-hpux11.23 --prefix=/opt/hp-gcc-4.2.1 --with-gnu-as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --enable-languages=c,c++
Thread model: posix
gcc version 4.2.1
#
Regards
Shamim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2007 10:50 PM
тАО11-14-2007 10:50 PM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
You need to add it to your link line.
>However still no success.
You didn't remove -static or use the tried and true -Wl,-a,archive_shared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2007 07:46 PM
тАО12-11-2007 07:46 PM
Solutionhttp://forums11.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2007 05:45 AM
тАО12-12-2007 05:45 AM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
Thanks for your help, I really appreciate your timely help. However I'm still struggling with the problem, And I put that on hold.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2007 02:20 PM
тАО12-12-2007 02:20 PM
Re: ld: Can't find library or mismatched ABI for -lnsl--- on HP-UX kmghp2 B.11.23 U ia64 3887625253
Let us know what your problems are when you get back to it.