gcc/binutils on i386-pc-solaris2.10 can't read amd64/crt1.o: /app/openpkg/bin/nm: /usr/lib/amd64/crt1.o: File format not recognized

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gcc/binutils on i386-pc-solaris2.10 can't read amd64/crt1.o: /app/openpkg/bin/nm: /usr/lib/amd64/crt1.o: File format not recognized

dietrich-bollmann
Hi,

When trying to list amd64/crt1.o with nm I got the following error:

 >   $ /app/openpkg/bin/nm /usr/lib/amd64/crt1.o
 >   /app/openpkg/bin/nm: /usr/lib/amd64/crt1.o: File format not recognized

Is this problem caused by binutils,  gcc or by the library?

/app/openpkg/bin/nm has no problems to list /usr/lib/crt1.o
and another instance of nm could list them both:

 >   /app/openpkg/bin/nm /usr/lib/amd64/crt1.o   ... failed
 >   /app/openpkg/bin/nm /usr/lib/crt1.o         ... symbols are listed
 >
 >   /usr/ccs/bin/amd64/nm /usr/lib/amd64/crt1.o ... symbols are listed
 >   /usr/ccs/bin/amd64/nm /usr/lib/crt1.o       ... symbols are listed

I encountered this problem while trying to compile OpenSSL -
The compilation would fail with the following error:

[...snip...]
make[2]: Entering directory `/app/openssl/0.9.8a/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -lsocket -lnsl
-ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -O3 -Wall -DL_ENDIAN
-DMD32_REG_T=int -DMD5_ASM}"; LIBPATH=`for x in $LIBDEPS; do if echo $x
| grep '^ *-L' > /dev/null 2>&1; then echo $x | sed -e 's/^ *-L//'; fi;
done | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`;
LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o
${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o
dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o
rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o
s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o
app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o
smime.o rand.o engine.o ocsp.o prime.o ${LIBDEPS} )
/usr/lib/amd64/crt1.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

Any idea?

Thanks, Dietrich

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: gcc/binutils on i386-pc-solaris2.10 can't read amd64/crt1.o: /app/openpkg/bin/nm: /usr/lib/amd64/crt1.o: File format not recognized

Kyle Hamilton
make clean; make depends; make

You shouldn't be seeing any attempt to link with amd64 stuff, and if
it's there that means the source tree has probably been configured on
an amd64 machine and compiled there.

-Kyle H

On 3/14/06, Dietrich Bollmann <[hidden email]> wrote:

> Hi,
>
> When trying to list amd64/crt1.o with nm I got the following error:
>
>  >   $ /app/openpkg/bin/nm /usr/lib/amd64/crt1.o
>  >   /app/openpkg/bin/nm: /usr/lib/amd64/crt1.o: File format not recognized
>
> Is this problem caused by binutils,  gcc or by the library?
>
> /app/openpkg/bin/nm has no problems to list /usr/lib/crt1.o
> and another instance of nm could list them both:
>
>  >   /app/openpkg/bin/nm /usr/lib/amd64/crt1.o   ... failed
>  >   /app/openpkg/bin/nm /usr/lib/crt1.o         ... symbols are listed
>  >
>  >   /usr/ccs/bin/amd64/nm /usr/lib/amd64/crt1.o ... symbols are listed
>  >   /usr/ccs/bin/amd64/nm /usr/lib/crt1.o       ... symbols are listed
>
> I encountered this problem while trying to compile OpenSSL -
> The compilation would fail with the following error:
>
> [...snip...]
> make[2]: Entering directory `/app/openssl/0.9.8a/apps'
> ( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -lsocket -lnsl
> -ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS
> -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -O3 -Wall -DL_ENDIAN
> -DMD32_REG_T=int -DMD5_ASM}"; LIBPATH=`for x in $LIBDEPS; do if echo $x
> | grep '^ *-L' > /dev/null 2>&1; then echo $x | sed -e 's/^ *-L//'; fi;
> done | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`;
> LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o
> ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o
> dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o
> rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o
> s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o
> app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o
> smime.o rand.o engine.o ocsp.o prime.o ${LIBDEPS} )
> /usr/lib/amd64/crt1.o: file not recognized: File format not recognized
> collect2: ld returned 1 exit status
>
> Any idea?
>
> Thanks, Dietrich
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: gcc/binutils on i386-pc-solaris2.10 can't read amd64/crt1.o: /app/openpkg/bin/nm: /usr/lib/amd64/crt1.o: File format not recognized

dietrich-bollmann
Hi Kyle,

Thanks for your answer!

The machine I used IS an amd64 machine :)

    Featuring the AMD: The Sun Java Workstation W2100z and the AMD
    Opteron processor delivers 32-bit and 64-bit binary compatibility
    platform choice [...]

...a citation from the product page at
http://www.sun.com/desktop/workstation/w2100z/index.jsp

Dietrich


 > make clean; make depends; make
 >
 > You shouldn't be seeing any attempt to link with amd64 stuff, and if
 > it's there that means the source tree has probably been configured on
 > an amd64 machine and compiled there.
 >
 > -Kyle H

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]