# uname -a
SunOS birch 5.10 Generic_127111-11 sun4u sparc SUNW,Sun-Fire-V890
# gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/
gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --
with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-
languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
the steps I've taken:
openssl-0.9.8i:
./Configure solaris64-sparcv9-gcc
gmake
sudo gmake install
berkeley db-4.7.25:
cd build_unix ;
env CC=gcc CFLAGS=-m64 LDFLAGS=-m64 ../dist/
configure ;
env CC=gcc CFLAGS=-m64 LDFLAGS=-m64
gmake ;
sudo env CC=gcc CFLAGS=-m64 LDFLAGS=-m64 gmake
install
sudo crle -64 -l /lib/64:/usr/lib/64:/usr/sfw/lib/64/:/usr/local/
BerkeleyDB.4.7/lib:/usr/local/lib:/usr/local/ssl/lib
openldap:
export CC=gcc
export CPPFLAGS="-m64 -I/usr/local/ssl/include -I/usr/local/BerkeleyDB.
4.7/include"
export CFLAGS=$CPPFLAGS
export LDFLAGS="-m64 -L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.7/
lib"
./configure --enable-referrals --with-readline --with-threads --with-
tls --without-cyrus-sasl --enable-phonetic --enable-ldap --enable-meta
--enable-bdb --enable-hdb --enable-null --enable-monitor --enable-
relay --enable-passwd --enable-overlays --enable-ppolicy --enable-
accesslog --enable-auditlog --enable-denyop --enable-dyngroup --enable-
dynlist --enable-lastmod --enable-ppolicy --enable-proxycache --enable-
refint --enable-rwm --enable-syncprov --enable-translucent --enable-
unique=yes --enable-valsort --enable-crypt
gmake depend && gmake
here are the last few lines before it dies:
gcc -m64 -I/usr/local/ssl/include -I/usr/local/BerkeleyDB.4.7/include
-I../../include -I../../include -m64 -I/usr/local/ssl/include -I
/usr/local/BerkeleyDB.4.7/include -DLDAP_LIBRARY -c version.c -o
version.o >/dev/null 2>&1
/bin/sh ../..//libtool --mode=link gcc -m64 -I/usr/local/ssl/include -
I/usr/local/BerkeleyDB.4.7/include -m64 -L/usr/local/ssl/lib -L
/usr/local/BerkeleyDB.4.7/lib -release 2.4 -version-info 3:0:1 -
rpath /usr/local/lib -o libldap.la bind.lo open.lo result.lo error.lo
compare.lo search.lo controls.lo messages.lo references.lo extended.lo
cyrus.lo modify.lo add.lo modrdn.lo delete.lo abandon.lo sasl.lo
sbind.lo unbind.lo cancel.lo filter.lo free.lo sort.lo passwd.lo
whoami.lo getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo re
quest.lo os-ip.lo url.lo pagectrl.lo sortctrl.lo vlvctrl.lo init.lo
options.lo print.lo string.lo ut
il-int.lo schema.lo charray.lo tls.lo os-local.lo dnssrv.lo utf-8.lo
utf-8-conv.lo turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl
.lo assertion.lo version.lo ../../libraries/liblber/liblber.la -
lresolv -lgen -lnsl -lsocket -lssl -lcrypto
gcc -shared -Wl,-h -Wl,libldap-2.4.so.2 -o .libs/libldap-2.4.so.
2.1.0 .libs/bind.o .libs/open.o .libs/result.o .libs/error.o .libs/
com
pare.o .libs/search.o .libs/controls.o .libs/messages.o .libs/
references.o .libs/extended.o .libs/cyrus.o .libs/modify.o .libs/
add.o .l
ibs/modrdn.o .libs/delete.o .libs/abandon.o .libs/sasl.o .libs/
sbind.o .libs/unbind.o .libs/cancel.o .libs/filter.o .libs/
free.o .libs/
sort.o .libs/passwd.o .libs/whoami.o .libs/getdn.o .libs/
getentry.o .libs/getattr.o .libs/getvalues.o .libs/addentry.o .libs/
request.o
.libs/os-ip.o .libs/url.o .libs/pagectrl.o .libs/sortctrl.o .libs/
vlvctrl.o .libs/init.o .libs/options.o .libs/print.o .libs/string.o .
libs/util-int.o .libs/schema.o .libs/charray.o .libs/tls.o .libs/os-
local.o .libs/dnssrv.o .libs/utf-8.o .libs/utf-8-conv.o .libs/turn.
o .libs/ppolicy.o .libs/dds.o .libs/txn.o .libs/ldap_sync.o .libs/
stctrl.o .libs/assertion.o .libs/version.o -R/export/home/rex/src/op
enldap-2.4.11/libraries/liblber/.libs -R/usr/local/lib -L/usr/local/
ssl/lib -L/usr/local/BerkeleyDB.4.7/lib ../../libraries/liblber/.li
bs/liblber.so -lresolv -lgen -lnsl -lsocket -lssl -lcrypto -lc -m64 -
m64
Text relocation remains referenced
against symbol offset in file
<unknown> 0x0 /usr/local/ssl/lib/
libssl.a(s3_both.o)
<unknown> 0x8 /usr/local/ssl/lib/
libssl.a(s3_both.o)
<unknown> 0x10 /usr/local/ssl/lib/
libssl.a(s3_both.o)
<unknown> 0x18 /usr/local/ssl/lib/
libssl.a(s3_both.o)
[ followed by thousands of these ]
a few interesting ones:
ERR_print_errors_cb 0xdc0 /usr/local/ssl/lib/
libcrypto.a(ui_lib.o)
UI_new 0xbc /usr/local/ssl/lib/
libcrypto.a(evp_key.o)
UI_add_input_string 0xe4 /usr/local/ssl/lib/
libcrypto.a(evp_key.o)
UI_add_verify_string 0x120 /usr/local/ssl/lib/
libcrypto.a(evp_key.o)
UI_process 0x144 /usr/local/ssl/lib/
libcrypto.a(evp_key.o)
UI_free 0x150 /usr/local/ssl/lib/
libcrypto.a(evp_key.o)
X509_REQ_set_subject_name 0x70 /usr/local/ssl/lib/
libcrypto.a(x509_req.o)
X509_REQ_set_pubkey 0x90 /usr/local/ssl/lib/
libcrypto.a(x509_req.o)
X509_REQ_add_extensions_nid 0x508 /usr/local/ssl/lib/
libcrypto.a(x509_req.o)
so, is something wrong with the way I compiled openssl?
I'm wondering if I should try compiling using sun's cc compiler,
instead of gcc?
I've also tried to use a different version of ld, using:
sudo mount -F lofs /usr/sfw/sparc-sun-solaris2.10/bin/ld /usr/ccs/bin/
ld
but I've had even less luck with that.
If anyone would like to see my full build output:
http://orchard.wccnet.edu/~rex/openldap_build.txt
thanks for any suggestions.
> I'm trying to get a working build of OpenLDAP, 64bit, using gcc. I'm
> running into some errors.
> [...]
> openssl-0.9.8i:
> ./Configure solaris64-sparcv9-gcc
> gmake
> sudo gmake install
>
> Text relocation remains referenced
> against symbol offset in file
> <unknown> 0x0 /usr/local/ssl/lib/
> libssl.a(s3_both.o)
>
> so, is something wrong with the way I compiled openssl?
It would have worked better if you had configured openssl with the
"shared" option.
But if I may ask, what is wrong with the system supplied openssl ?
I'll try using the system supplied OpenSSL.
I rebuilt openssl with "./Configure shared solaris64-sparcv9-gcc", and
now openLDAP gives me this build error:
/bin/sh ../../..//libtool --tag=disable-shared --mode=compile gcc -m64
-I/usr/local/ssl/include -
I/usr/local/BerkeleyDB.4.7/include -I../../../include -
I../../../include -I.. -I./.. -m64
-I/usr/local/ssl/include -I/usr/local/BerkeleyDB.4.7/include -c
init.c
gcc -m64 -I/usr/local/ssl/include -I/usr/local/BerkeleyDB.4.7/include
-I../../../include -I../..
/../include -I.. -I./.. -m64 -I/usr/local/ssl/include -I/usr/local/
BerkeleyDB.4.7/include -c init
.c -o init.o
init.c: In function `bdb_db_open':
init.c:509: error: structure has no member named `lk_handle'
init.c: In function `bdb_back_initialize':
init.c:752: warning: passing arg 1 of `db_env_set_func_yield' from
incompatible pointer type
gmake[3]: *** [init.lo] Error 1
gmake[3]: Leaving directory `/export/home/rex/src/openldap-2.4.11/
servers/slapd/back-bdb'
I'm guessing it is a Berkeley incompatibility error.
I was able to build a 64bit OpenLDAP slapd, using the system-supplied
SSL and Berkeley DB 4.6.
-Rex