Hi, I'm trying to build samba 3.4.2 on Solaris 10 using SunStudio 12 but I've hit a snag. The configure line used was: CFLAGS="-xcode=pic32 -KPIC -m64 -I/ec/sw/samba/openldap/current/include -Iec/sw/samba/krb/current/include" \ CPPFLAGS="-xcode=pic32 -KPIC -m64 -I/ec/sw/samba/openldap/current/include -I/ec/sw/samba/krb/current/include" \ LDFLAGS="-L/ec/sw/samba/openldap/current/lib -L/ec/sw/samba/krb/current/lib -R/ec/sw/samba/openldap/current/lib -R/ec/sw/samba/krb/current/lib" \ ./configure --prefix=/ec/sw/samba/3.4.2 \ --with-krb5 \ --with-ads \ --with-ldap \ --without-winbind Both krb 1.7 and OpenLDAP 2.4.16 were built as 64-bit At the linking of smbd it errors out: Linking bin/smbd ld: fatal: file dynconfig.o: wrong ELF class: ELFCLASS64 ld: fatal: File processing errors. No output written to bin/smbd *** Error code 1 The following command caused the error: cc -xc99=all -o bin/smbd dynconfig.o [massive snip] -L/ec/sw/samba/openldap/current/lib -L/ec/sw/samba/krb/current/lib -R/ec/sw/samba/openldap/current/lib -R/ec/sw/samba/krb/current/lib -lthread -L./bin -lldap -llber \ -lgssapi_krb5 -lkrb5 -lk5crypto \ -lsec -lldap -llber -lsendfile -lresolv -lrt -lnsl -lsocket \ ../lib/popt/findme.o ../lib/popt/popt.o ../lib/popt/poptconfig.o ../lib/popt/popthelp.o ../lib/popt/poptparse.o -ltalloc -ltdb \ bin/libwbclient.a -lz make: Fatal error: Command failed for target `bin/smbd' I'm using the standard /usr/ccs/bin/ld as linker. If I manually execute the command line and add -m64 asargument ( cc -m64 -xc99=all ) it churns out: Undefined first referenced symbol in file error_message libsmb/cliconnect.o (symbol belongs to implicit dependency /ec/sw/samba/krb/current/lib/libcom_err.so.3) ld: fatal: Symbol referencing errors. No output written to bin/smbd What am I overlooking? Gregory
Hello Gregory, Am Freitag 09 Oktober 2009 14:39:14 schrieb Gregory Gabriel:> Hi, > > I'm trying to build samba 3.4.2 on Solaris 10 using SunStudio 12 but > I've hit a snag. > > Linking bin/smbd > ld: fatal: file dynconfig.o: wrong ELF class: ELFCLASS64 > ld: fatal: File processing errors. No output written to bin/smbdi allways had this error because using gcc the Makefile is not correct. The CFLAGS (-m64) where not used on all lines so gcc tried to build 32 and 64 bit binaries which is not working for sure. The first error was in the same line as yours (bin/smbd). So i added $CFLAGS to LDFLAGS because LDFLAGS has been used correctly in the Makefile (did not want to add $CFLAGS to about 50 lines). Perhaps nearly the same problem. -- Dirk
On Fri, Oct 9, 2009 at 3:34 PM, Dirk Jakobsmeier <dirk.jakobsmeier at wige.com> wrote:> Hello Gregory, > > i allways had this error because using gcc the Makefile is not correct. The > CFLAGS (-m64) where not used on all lines so gcc tried to build 32 and 64 bit > binaries which is not working for sure. The first error was in the same line > as yours (bin/smbd). So i added $CFLAGS to LDFLAGS because LDFLAGS has been > used correctly in the Makefile (did not want to add $CFLAGS to about 50 > lines). > > Perhaps nearly the same problem. > > -- > > DirkHi Dirk, Thanks for your feedback. In the end I edited the Makefile to include the -m64 and -on the suggestion of Michael Wood- a -lcom_err After that it compiled cleanly. Enjoy the weekend, Gregory