public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* ld core dump
@ 2003-04-03 18:44 robert_f_sharp
  2003-04-08 15:31 ` Nick Clifton
  0 siblings, 1 reply; 5+ messages in thread
From: robert_f_sharp @ 2003-04-03 18:44 UTC (permalink / raw)
  To: binutils



I have a problem when I try build samba in 64bit mode. It builds ok in 32bit.
The problem arises when linking nsswitch/libnss_winbind.so

On Solaris 9 I'm using

bash-2.05$ /usr/local/tools/gcc/bin/gcc -v
Reading specs from
/usr/local/tools/gcc/lib/gcc-lib/sparc-sun-solaris2.9/3.2.2/specs
Configured with: ../configure --with-as=/usr/local/tools/binutils/bin/as
--with-ld=/usr/local/tools/binutils/bin/ld --with-gnu-as --with-gnu-ld
--disable-nls --enable-languages=c,c++ --prefix=/usr/local/tools/gcc
Thread model: posix
gcc version 3.2.2


bash-2.05$ /usr/local/tools/binutils/bin/ld -v
GNU ld version 2.13.2.1

bash-2.05$ /usr/local/tools/binutils/bin/as -v
GNU assembler version 2.13.2.1 (sparc-sun-solaris2.9) using BFD version 2.13.2.1

Compiling nsswitch/wb_common.c with -fPIC
Compiling nsswitch/winbind_nss_solaris.c with -fPIC
Linking nsswitch/libnss_winbind.so
collect2: ld terminated with signal 11 [Segmentation Fault]
/usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
`nsswitch/winbind_nss.po' is incompatible with sparc output
/usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
`nsswitch/wb_common.po' is incompatible with sparc output
/usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
`nsswitch/winbind_nss_solaris.po' is incompatible with sparc output
make: *** [nsswitch/libnss_winbind.so] Error 1

ld core dumps and does not go any futher, have I supplied enough info, anybody
have an idea why ld core dumps?

Robert S.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ld core dump
  2003-04-03 18:44 ld core dump robert_f_sharp
@ 2003-04-08 15:31 ` Nick Clifton
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Clifton @ 2003-04-08 15:31 UTC (permalink / raw)
  To: robert_f_sharp; +Cc: binutils

Hi Robert,

> bash-2.05$ /usr/local/tools/binutils/bin/as -v
> GNU assembler version 2.13.2.1 (sparc-sun-solaris2.9) using BFD version 2.13.2.1
> 
> Compiling nsswitch/wb_common.c with -fPIC
> Compiling nsswitch/winbind_nss_solaris.c with -fPIC
> Linking nsswitch/libnss_winbind.so
> collect2: ld terminated with signal 11 [Segmentation Fault]
> /usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
> `nsswitch/winbind_nss.po' is incompatible with sparc output
> /usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
> `nsswitch/wb_common.po' is incompatible with sparc output
> /usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
> `nsswitch/winbind_nss_solaris.po' is incompatible with sparc output
> make: *** [nsswitch/libnss_winbind.so] Error 1
> 
> ld core dumps and does not go any futher, have I supplied enough info, anybody
> have an idea why ld core dumps?

Sorry - there is not really enough information to go on here.

Do you know why the linker is complaining about the architecture
mismatches ?  (This may be at the root of the bug).  ie are the input
files really 'sparcv9' and is the output file really 'sparc' ?

Are you able to reduce the problem to a small, reproducible test case?

What is the complete command line that you are using ?

Cheers
        Nick



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ld core dump
@ 2003-04-10 18:03 robert_f_sharp
  0 siblings, 0 replies; 5+ messages in thread
From: robert_f_sharp @ 2003-04-10 18:03 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils



Thanks Nick

I will experiment with your suggestions for diagnostics and see what I can find.
I have tried to use GNU tools (gcc, ld) completely. The build will compile and
link the 64bit smbd program etc but I think the problem is with building 64bit
shared objects . I think the linker should just look at the ELF headers on the
input files and determine the mode, 32 or 64 bit. I will look for a 64bit linker
directive for shared objects. I guess my main problem is ld that ld turns it's
toes up (core dumps) and that introduces the question of how much can you trust
its error messages, I would have thought it should be a little more robust.

Robert S.




Nick Clifton <nickc@redhat.com> on 09/04/2003 16:37:56
                                                              
                                                              
                                                              
 To:      Robert F Sharp/ST/FIS@FIS                           
                                                              
 cc:      binutils@sources.redhat.com                         
                                                              
                                                              
                                                              
 Subject: Re: ld core dump                                    
                                                              





Hi Robert,

> luck. I have included the latest output. The one thing that attracts my
> attention is the output, sparc, not as it should be, sparcv9. Is it trying to
> link libnss_winbind.so as a 32bit (sparc?) oject?

Probably.  It sounds like you have a 32bit sparc targeted linker, so
it is trying to create a 32bit sparc executable, and it gets rather
confused when you give it 64bit libraries...

I am not a sparc expert, so I am not sure whether there is a different
linker to create 32bit and 64bit executable or just one linker and a
command line switch.  (Or maybe there is only one linker and the
linker is supposed to be clever and work out which kind of binary it
is supposed to create from its input files).

> bash-2.05$ make
> Using FLAGS =  -O -m64 -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper

Could you make "make" tell you the *exact* command line that it is
executing ?  It may be that there are some strange switches in there,
or maybe a 32bit object file...  Also could you add "-v" to the
command line ?  I assume that you are using gcc to drive the linker,
so passing "-v" to gcc will cause it to print out the command line
that it is using to invoke the linker

Cheers
        Nick




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ld core dump
  2003-04-08 18:04 robert_f_sharp
@ 2003-04-09 15:38 ` Nick Clifton
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Clifton @ 2003-04-09 15:38 UTC (permalink / raw)
  To: robert_f_sharp; +Cc: binutils

Hi Robert,

> luck. I have included the latest output. The one thing that attracts my
> attention is the output, sparc, not as it should be, sparcv9. Is it trying to
> link libnss_winbind.so as a 32bit (sparc?) oject?

Probably.  It sounds like you have a 32bit sparc targeted linker, so
it is trying to create a 32bit sparc executable, and it gets rather
confused when you give it 64bit libraries...

I am not a sparc expert, so I am not sure whether there is a different
linker to create 32bit and 64bit executable or just one linker and a
command line switch.  (Or maybe there is only one linker and the
linker is supposed to be clever and work out which kind of binary it
is supposed to create from its input files).

> bash-2.05$ make
> Using FLAGS =  -O -m64 -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper

Could you make "make" tell you the *exact* command line that it is
executing ?  It may be that there are some strange switches in there,
or maybe a 32bit object file...  Also could you add "-v" to the
command line ?  I assume that you are using gcc to drive the linker,
so passing "-v" to gcc will cause it to print out the command line
that it is using to invoke the linker

Cheers
        Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ld core dump
@ 2003-04-08 18:04 robert_f_sharp
  2003-04-09 15:38 ` Nick Clifton
  0 siblings, 1 reply; 5+ messages in thread
From: robert_f_sharp @ 2003-04-08 18:04 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils



Hi Nick
Thank you for your response. I was hoping that it would simply be a case of been
there, got the tee shirt but no such luck. Just to let you know where I am up
to. I think it was linking against the 32 bit library so I pointed it to the 64
bit library (/usr/lib/libsocket.so -> /usr/lib/sparcv9/libsocket.so) , still no
luck. I have included the latest output. The one thing that attracts my
attention is the output, sparc, not as it should be, sparcv9. Is it trying to
link libnss_winbind.so as a 32bit (sparc?) oject?

bash-2.05$ make
Using FLAGS =  -O -m64 -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-DLOGFILEBASE="/usr/local/tools/samba/var"
-DCONFIGFILE="/usr/local/tools/samba/lib/smb.conf"
-DLMHOSTSFILE="/usr/local/tools/samba/lib/lmhosts"
-DSWATDIR="/usr/local/tools/samba/swat" -DSBINDIR="/usr/local/tools/samba/sbin"
-DLOCKDIR="/usr/local/tools/samba/var/locks"
-DCODEPAGEDIR="/usr/local/tools/samba/lib/codepages"
-DDRIVERFILE="/usr/local/tools/samba/lib/printers.def"
-DBINDIR="/usr/local/tools/samba/bin"
-DPIDDIR="/usr/local/tools/samba/var/locks"
-DLIBDIR="/usr/local/tools/samba/lib" -DHAVE_INCLUDES_H
-DPASSWD_PROGRAM="/usr/bin/passwd"
-DSMB_PASSWD_FILE="/usr/local/tools/samba/private/smbpasswd"
-DTDB_PASSWD_FILE="/usr/local/tools/samba/private/smbpasswd.tdb"
Using FLAGS32 =  -O -m64 -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-DLOGFILEBASE="/usr/local/tools/samba/var"
-DCONFIGFILE="/usr/local/tools/samba/lib/smb.conf"
-DLMHOSTSFILE="/usr/local/tools/samba/lib/lmhosts"
-DSWATDIR="/usr/local/tools/samba/swat" -DSBINDIR="/usr/local/tools/samba/sbin"
-DLOCKDIR="/usr/local/tools/samba/var/locks"
-DCODEPAGEDIR="/usr/local/tools/samba/lib/codepages"
-DDRIVERFILE="/usr/local/tools/samba/lib/printers.def"
-DBINDIR="/usr/local/tools/samba/bin"
-DPIDDIR="/usr/local/tools/samba/var/locks"
-DLIBDIR="/usr/local/tools/samba/lib" -DHAVE_INCLUDES_H
-DPASSWD_PROGRAM="/usr/bin/passwd"
-DSMB_PASSWD_FILE="/usr/local/tools/samba/private/smbpasswd"
-DTDB_PASSWD_FILE="/usr/local/tools/samba/private/smbpasswd.tdb"
Using LIBS = -lsec -lgen -lsocket -lnsl
Linking nsswitch/libnss_winbind.so
collect2: ld terminated with signal 11 [Segmentation Fault]
/usr/local/tools/binutils/bin/ld: skipping incompatible /usr/lib/libsocket.so
when searching for -lsocket
/usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
`nsswitch/winbind_nss.po' is incompatible with sparc output
/usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
`nsswitch/wb_common.po' is incompatible with sparc output
/usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
`nsswitch/winbind_nss_solaris.po' is incompatible with sparc output
make: *** [nsswitch/libnss_winbind.so] Error 1


# file sparcv9/libgen.so.1
sparcv9/libgen.so.1:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1,
dynamically linked, not stripped
# file sparcv9/libnsl.so.1
sparcv9/libnsl.so.1:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1,
dynamically linked, not stripped
# file sparcv9/libsocket.so.1
sparcv9/libsocket.so.1: ELF 64-bit MSB dynamic lib SPARCV9 Version 1,
dynamically linked, not stripped
# file sparcv9/libsec.so.1
sparcv9/libsec.so.1:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1,
dynamically linked, not stripped


bash-2.05$ file *.po
wb_common.po:   ELF 64-bit MSB relocatable SPARCV9 Version 1
winbind_nss.po: ELF 64-bit MSB relocatable SPARCV9 Version 1
winbind_nss_solaris.po: ELF 64-bit MSB relocatable SPARCV9 Version 1

Robert S.





Nick Clifton <nickc@redhat.com> on 08/04/2003 16:30:54
                                                              
                                                              
                                                              
 To:      Robert F Sharp/ST/FIS@FIS                           
                                                              
 cc:      binutils@sources.redhat.com                         
                                                              
                                                              
                                                              
 Subject: Re: ld core dump                                    
                                                              





Hi Robert,

> bash-2.05$ /usr/local/tools/binutils/bin/as -v
> GNU assembler version 2.13.2.1 (sparc-sun-solaris2.9) using BFD version
2.13.2.1
>
> Compiling nsswitch/wb_common.c with -fPIC
> Compiling nsswitch/winbind_nss_solaris.c with -fPIC
> Linking nsswitch/libnss_winbind.so
> collect2: ld terminated with signal 11 [Segmentation Fault]
> /usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
> `nsswitch/winbind_nss.po' is incompatible with sparc output
> /usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
> `nsswitch/wb_common.po' is incompatible with sparc output
> /usr/local/tools/binutils/bin/ld: warning: sparc:v9 architecture of input file
> `nsswitch/winbind_nss_solaris.po' is incompatible with sparc output
> make: *** [nsswitch/libnss_winbind.so] Error 1
>
> ld core dumps and does not go any futher, have I supplied enough info, anybody
> have an idea why ld core dumps?

Sorry - there is not really enough information to go on here.

Do you know why the linker is complaining about the architecture
mismatches ?  (This may be at the root of the bug).  ie are the input
files really 'sparcv9' and is the output file really 'sparc' ?

Are you able to reduce the problem to a small, reproducible test case?

What is the complete command line that you are using ?

Cheers
        Nick






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-10 18:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-03 18:44 ld core dump robert_f_sharp
2003-04-08 15:31 ` Nick Clifton
2003-04-08 18:04 robert_f_sharp
2003-04-09 15:38 ` Nick Clifton
2003-04-10 18:03 robert_f_sharp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).