Solaris 10 apache 64 bit libldap.so problem | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Solaris 10 apache 64 bit libldap.so problem

Solaris


Tags
64bits, apache2.4.3, solaris 10

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-20-2013
teotao teotao is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 19 March 2013, 10:36 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Solaris 10 apache 64 bit libldap.so problem

Hello,

I am fairly new to Solaris so please be gentle . I am trying to install apache 2.4.3 adapting a script one of my colleagues wrote for version 2.2.23. The problem lies in the fact that I am aiming at creating a 64bit package hence I've already amended the script to reflect that. I understand this is the way to go about it, right? However, I get an error every single time I run the script.



Code:
ld: fatal: file /usr/local/lib/libldap.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to ldap/.libs/apr_ldap-1.so
collect2: ld returned 1 exit status
gmake[3]: *** [ldap/apr_ldap.la] Error 1
gmake[3]: Leaving directory `/apps/pkg/src/httpd-2.4.3/srclib/apr-util'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/apps/pkg/src/httpd-2.4.3/srclib/apr-util'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/apps/pkg/src/httpd-2.4.3/srclib'
gmake: *** [all-recursive] Error 1

I understand that the file libldap.so is a 32bit file, but am clueless what to do next.

Here are my exports:


Code:
export LDFLAGS="-L/usr/sfw/lib/amd64"
export CPPFLAGS="-m64"
export LD_LIBRARY_PATH=/usr/lib:/usr/sfw/lib
export LD_LIBRARY_PATH_64=/usr/lib/64:/usr/sfw/lib/64
export CXXFLAGS="-m64 -fPIC"
export PATH=/usr/sfw/bin/:/usr/ccs/bin/sparcv9:/usr/sbin:/usr/bin:/usr/sfw/sbin:/usr/ccs/bin
export CXX="/usr/sfw/bin/gcc -m64"
export CFLAGS="-m64"
export CPP_FLAGS="-m64"
export PKG_CONFIG_PATH=/usr/lib/64/pkgconfig
export CC="gcc -m64"

Could anyone point me in the right direction, please?

---------- Post updated at 04:22 PM ---------- Previous update was at 09:24 AM ----------

hmmm and also when I try:


Code:
file /usr/local/lib/libldap.so

I get:


Code:
can't read ELF header
/usr/local/lib/libldap.so:      data

So after all I am not able to determine if the file really is 32 bit.
Sponsored Links
    #2  
Old 02-20-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 21 November 2014, 7:36 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,522
Thanks: 8
Thanked 555 Times in 532 Posts
Well, that lib's dir in not in either $LD_LIBRARY_PATH* variable, so it must be in the make as -L libdir, and it seems to be the 32 bit dir. There may be a 64 bit dir nearby that should be what is linked, and those dirs should probably be in the $LD_LIBRARY_PATH* variables.
Sponsored Links
    #3  
Old 02-21-2013
teotao teotao is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 19 March 2013, 10:36 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by DGPickett View Post
Well, that lib's dir in not in either $LD_LIBRARY_PATH* variable, so it must be in the make as -L libdir, and it seems to be the 32 bit dir. There may be a 64 bit dir nearby that should be what is linked, and those dirs should probably be in the $LD_LIBRARY_PATH* variables.
Hi DGPickett, thanks very much for your help. I've added the dirs to the $LD_LIBRARY_PATH :


Code:
export LD_LIBRARY_PATH=/usr/lib:/usr/sfw/lib:/usr/local/lib:/usr/lib/64:/usr/sfw/lib/64:/usr/openwin/lib:/usr/local/ssl/lib

and when I run


Code:
./configure --prefix=/apps/apache${APACHEVER} --with-mpm=event --with-ldap --enable-mods-shared="all ssl proxy ldap authnz_ldap" --with-ssl=/usr/local/ssl --enable-ssl --
enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-proxy-ajp --enable-rewrite --with-ldap-lib=/usr/lib/64 --with-ldap-include=/usr/local/
include --with-included-apr --with-pcre=/usr/local/bin/pcre-config

everything seems ok. However, the result of make now gives these errors:


Code:
/apps/pkg/src/httpd-2.4.3/srclib/apr/libtool --silent --mode=link gcc -m64 -std=gnu99 -I/usr/include/libxml2  -m64   -L/usr/lib/64  -L/usr/sfw/lib/amd64 -o ab  ab.lo       
/apps/pkg/src/httpd-2.4.3/srclib/apr-util/libaprutil-1.la -lexpat /apps/pkg/src/httpd-2.4.3/srclib/apr/libapr-1.la -luuid -lsendfile -lrt -lsocket -lnsl -lpthread -L/usr/local/ssl/lib -lssl -lcrypto -luuid -lsendfile -lrt -lsocket -lnsl -lpthread -lm
Undefined                       first referenced
 symbol                             in file
BIO_set_callback                    ab.o
BIO_set_callback_arg                ab.o
BIO_get_callback_arg                ab.o
SSL_CTX_set_info_callback           ab.o
ld: fatal: Symbol referencing errors. No output written to .libs/ab
collect2: ld returned 1 exit status
gmake[2]: *** [ab] Error 1
gmake[2]: Leaving directory `/apps/pkg/src/httpd-2.4.3/support'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/apps/pkg/src/httpd-2.4.3/support'
gmake: *** [all-recursive] Error 1

From a bit of research it seems that this time it has to do with openssl. Again, not sure what to do next. Any help would be much appreciated!

Thanks
    #4  
Old 02-21-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 21 November 2014, 7:36 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,522
Thanks: 8
Thanked 555 Times in 532 Posts
Yes, it seems like you need a 64 bit openssl lib in the -L and $LD_LIBRARY_PATH_64: bio_set_callback(3): BIO callback functions - Linux man page
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem compiling apache on solaris Aelfric Solaris 3 10-20-2009 04:01 AM
Porting C++ 32-bit code on 64-bit Solaris amit_27 Solaris 2 01-05-2009 05:13 AM
Solaris 10 and 64 bit apache/openssl/gcc csross Solaris 3 08-15-2008 03:57 PM
solaris 10 apache 2.2.4 64 bit build error csross Solaris 2 05-14-2007 02:47 PM
Setting Last-Modified Bit in Apache robbieg UNIX for Dummies Questions & Answers 1 12-03-2004 12:43 PM



All times are GMT -4. The time now is 04:46 AM.