Hi,
I'm trying to compile OpenLDAP v2.4.13 on Solaris 10 using Sun Studio 12. Everything is building fine until it gets to slapd itself. It fails linking .libs/slapdS.o:
rm -f .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT creating .libs/slapdS.c (cd .libs && cc -c "slapdS.c") rm -f .libs/slapdS.c .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT
cc -g -fast -fsimple=0 -fns=no -xtarget=ultraT1 -xarch=sparcvis2 -m64 -xipo -mt -xcode=pic32 -xpagesize=default -xlic_lib=sunperf .libs/slapdS.o -o .libs/slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o lock.o controls.o extended.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o txn.o version.o -xarch=v9 -L/opt/python2/lib/sparcv9 -L/opt/perl5/lib/sparcv9 -L/opt/heimdal/lib/sparcv9 -L/opt/db/lib/sparcv9 -L/opt/gnu/lib/sparcv9 -L/opt/local/lib/sparcv9 -L/usr/sfw/lib/sparcv9 -L/usr/lib/sparcv9 libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/.libs/libldap_r.so /opt/ws/dists/Services/openldap-2.4.13/libraries/liblber/.libs/liblber.so -L/opt/db/lib ../../libraries/liblber/.libs/liblber.so -mt /opt/gnu/lib/sparcv9/libltdl.so /opt/db/lib/sparcv9/libdb-4.7.so -L/opt/tcl/lib/sparcv9 -lrt -L/opt/SUNWspro/prod/lib/v9 -L/usr/ccs/lib/sparcv9 -L/opt/AS/perl5/lib/CORE -lperl -ldl -lm -lpthread -licuuc -licudata -lsasl /opt/heimdal/lib/libgssapi.so /opt/heimdal/lib/libheimntlm.so /opt/heimdal/lib/libkrb5.so /opt/heimdal/lib/libhx509.so /opt/heimdal/lib/libwind.so -ldoor /opt/heimdal/lib/libhcrypto.so /opt/heimdal/lib /libasn1.so /opt/heimdal/lib/libcom_err.so /opt/heimdal/lib/libroken.so -ldb-4 - lssl -lcrypto -lresolv -lgen -lnsl -lsocket -ldb -lumem -R/opt/openldap/lib/sparcv9 -R/opt/gnu/lib/sparcv9 -R/opt/db/lib/sparcv9 -R/opt/heimdal/lib -R/opt/python2/lib/sparcv9 -R/opt/perl5/lib/sparcv9 -R/opt/heimdal/lib/sparcv9 -R/opt/local/lib/sparcv9 -R/usr/sfw/lib/sparcv9 -R/usr/lib/sparcv9 -R/opt/AS/perl5/lib/CORE
cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs ld: fatal: file .libs/slapdS.o: wrong ELF class: ELFCLASS32
I think slapdS.c is generated dynamically by ltmain.sh, seen in the line: (cd .libs && cc -c "slapdS.c")
I don't know what slapdS.c does, but I think "-m64" needs to be passed to cc here; unfortunately I don't know how to do it. I've searched through the mail archives w/o much luck. Could someone please explain to me what I'm missing?
Thanks.
-John
On Wed, 21 Jan 2009, John Center wrote:
cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs ld: fatal: file .libs/slapdS.o: wrong ELF class: ELFCLASS32
As you diagnosed, you're missing a -m64.
I think slapdS.c is generated dynamically by ltmain.sh, seen in the line: (cd .libs && cc -c "slapdS.c")
Yes.
I don't know what slapdS.c does, but I think "-m64" needs to be passed to cc here; unfortunately I don't know how to do it. I've searched through the
It's libtool black magic, you probably don't need to worry too much about it...
long story short: export LTCFLAGS='-g -xs -KPIC -xarch=v9' prior to make.
Thanks, Aaron, I'll give this a shot! -John
Aaron Richton wrote:
On Wed, 21 Jan 2009, John Center wrote:
cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs ld: fatal: file .libs/slapdS.o: wrong ELF class: ELFCLASS32
As you diagnosed, you're missing a -m64.
I think slapdS.c is generated dynamically by ltmain.sh, seen in the line: (cd .libs && cc -c "slapdS.c")
Yes.
I don't know what slapdS.c does, but I think "-m64" needs to be passed to cc here; unfortunately I don't know how to do it. I've searched through the
It's libtool black magic, you probably don't need to worry too much about it...
long story short: export LTCFLAGS='-g -xs -KPIC -xarch=v9' prior to make.
Hi Aaron,
I think I could use some more black magic... ;-) I get the compile to complete now - Thanks! - but I noticed in SLAPD_PERL_LDFLAGS, SLAPD_LIBS & PERL_CPPFLAGS an "-xarch=v9" flag is being set somewhere. I'd like to set this to the actual xarch/m64 flags I'm using in CFLAGS. This gets added to all the makefiles & I can't seem to override it like I could with the LTCFLAGS. Do you know how to override this? I'm trying to avoid having to edit all of the Makefiles by hand.
Thanks.
-John
Aaron Richton wrote:
On Wed, 21 Jan 2009, John Center wrote:
cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs ld: fatal: file .libs/slapdS.o: wrong ELF class: ELFCLASS32
As you diagnosed, you're missing a -m64.
I think slapdS.c is generated dynamically by ltmain.sh, seen in the line: (cd .libs && cc -c "slapdS.c")
Yes.
I don't know what slapdS.c does, but I think "-m64" needs to be passed to cc here; unfortunately I don't know how to do it. I've searched through the
It's libtool black magic, you probably don't need to worry too much about it...
long story short: export LTCFLAGS='-g -xs -KPIC -xarch=v9' prior to make.
On Sat, 24 Jan 2009, John Center wrote:
I think I could use some more black magic... ;-) I get the compile to complete now - Thanks! - but I noticed in SLAPD_PERL_LDFLAGS, SLAPD_LIBS & PERL_CPPFLAGS an "-xarch=v9" flag is being set somewhere. I'd like to set this to the actual xarch/m64 flags I'm using in CFLAGS. This gets added to all the makefiles & I can't seem to override it like I could with the LTCFLAGS. Do you know how to override this? I'm trying to avoid having to edit all of the Makefiles by hand.
My guess is that you need to keep in mind that autoconf (./configure) itself is influenced by many variables that you might not typically expect to be read by a shell script; see the INSTALL file for details. And of course there can be more sinister things going on...I don't use back-perl myself, but I know that lots of perl things are affected by MakeMaker, which in turn is affected by the compile environment of your perl interpreter, which is probably not something in the front of your mind (and might have been done by your vendor, not even yourself).
Everything we know about building OpenLDAP on Solaris is at:
http://cvs.rutgers.edu/cgi-bin/viewvc.cgi/trunk/SPECS/openldap24.spec
There are some non-obvious gems (you knew to request direct binding to the dynamic linker, of course?) and some irrelevant-to-the-world local mods (SLAPD_EPASSWD is a deprecated local define from before there were password modules...that's a *LONG* time ago)...pick and choose what you will if you look through that.
Hi Aaron,
Thanks for pointing me in the right direction. I found the -xarch=v9 being set in Config_heavy.pm, installed as part of ActiveState Perl. I also found your OpenLDAP spec file useful, also. You use pkgbuild to maintain your software?
Thanks, again!
-John
Aaron Richton wrote:
On Sat, 24 Jan 2009, John Center wrote:
I think I could use some more black magic... ;-) I get the compile to complete now - Thanks! - but I noticed in SLAPD_PERL_LDFLAGS, SLAPD_LIBS & PERL_CPPFLAGS an "-xarch=v9" flag is being set somewhere. I'd like to set this to the actual xarch/m64 flags I'm using in CFLAGS. This gets added to all the makefiles & I can't seem to override it like I could with the LTCFLAGS. Do you know how to override this? I'm trying to avoid having to edit all of the Makefiles by hand.
My guess is that you need to keep in mind that autoconf (./configure) itself is influenced by many variables that you might not typically expect to be read by a shell script; see the INSTALL file for details. And of course there can be more sinister things going on...I don't use back-perl myself, but I know that lots of perl things are affected by MakeMaker, which in turn is affected by the compile environment of your perl interpreter, which is probably not something in the front of your mind (and might have been done by your vendor, not even yourself).
Everything we know about building OpenLDAP on Solaris is at:
http://cvs.rutgers.edu/cgi-bin/viewvc.cgi/trunk/SPECS/openldap24.spec
There are some non-obvious gems (you knew to request direct binding to the dynamic linker, of course?) and some irrelevant-to-the-world local mods (SLAPD_EPASSWD is a deprecated local define from before there were password modules...that's a *LONG* time ago)...pick and choose what you will if you look through that.
On Mon, 26 Jan 2009, John Center wrote:
your OpenLDAP spec file useful, also. You use pkgbuild to maintain your software?
We use undergraduates :)
If you want to look at the finished product, OpenLDAP and its dependency graph (actually, all of our Solaris binaries) are served at http://rpm.rutgers.edu/ (at this point we're only doing Solaris 9 as we transition to Linux). They're in rpm format and built with rpmbuild.
--On Wednesday, January 21, 2009 11:19 AM -0500 John Center john.center@villanova.edu wrote:
Hi,
I'm trying to compile OpenLDAP v2.4.13 on Solaris 10 using Sun Studio 12. Everything is building fine until it gets to slapd itself. It fails linking .libs/slapdS.o:
I don't know what slapdS.c does, but I think "-m64" needs to be passed to cc here; unfortunately I don't know how to do it. I've searched through the mail archives w/o much luck. Could someone please explain to me what I'm missing?
Add -m64 to the CFLAGS you're using?
For example, something like:
CFLAGS="-m64" ./configure ....
That way it gets passed into all the Makefiles.
If you have other CFLAGS you want to set (like -g, etc), put them in there too:
CFLAGS="-g -m64" ./configure ...
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Thanks, Quanah, but I do have CFLAGS configured. My problem is that it wasn't being being passed to ltmain.sh. I'm trying Aaron's suggestion now. -John
Quanah Gibson-Mount wrote:
--On Wednesday, January 21, 2009 11:19 AM -0500 John Center john.center@villanova.edu wrote:
Hi,
I'm trying to compile OpenLDAP v2.4.13 on Solaris 10 using Sun Studio 12. Everything is building fine until it gets to slapd itself. It fails linking .libs/slapdS.o:
I don't know what slapdS.c does, but I think "-m64" needs to be passed to cc here; unfortunately I don't know how to do it. I've searched through the mail archives w/o much luck. Could someone please explain to me what I'm missing?
Add -m64 to the CFLAGS you're using?
For example, something like:
CFLAGS="-m64" ./configure ....
That way it gets passed into all the Makefiles.
If you have other CFLAGS you want to set (like -g, etc), put them in there too:
CFLAGS="-g -m64" ./configure ...
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc
Zimbra :: the leader in open source messaging and collaboration
--On Wednesday, January 21, 2009 3:12 PM -0500 John Center john.center@villanova.edu wrote:
Thanks, Quanah, but I do have CFLAGS configured. My problem is that it wasn't being being passed to ltmain.sh. I'm trying Aaron's suggestion now. -John
Sounds good. I haven't built on Solaris in ages. ;)
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-software@openldap.org