I cleared up some things in my mind and on my server and want to rewrite my question:
I got two packages from NetManagement, both belonging to nmcryptgate:
- a PHP extension (source code)
- a compiled library (the tar named nmcryptgate_client_1.7.16-i386-unknown-freebsdelf4.2)
I want to install these on my Debian 5.0.8 server.
I (./configure && make && make install)'d the PHP extension succesfully. phpinfo() states that the extension is enabled.
The created files went to
/usr/lib/php5/20060613+lfs/nmcryptgate.la
/usr/lib/php5/20060613+lfs/nmcryptgate.so
I moved the files from the compiled library as following (derived from the structure inside the tar):
/usr/local/bin/nmcryptgate
/usr/local/doc/nmcryptgate/developer.txt (of no help)
/usr/local/include/nmcryptgate.h
/usr/local/lib/libnmcryptgate.so.1
/usr/local/lib/libnmcryptgate.la
/usr/local/lib/libnmcryptgate.so (symlink directing to libnmcryptgate.so.1)
I called following methods after doing so:
ldconfig
libtool --finish
BUT: Whenever calling a method from the extension Apache will come up with this error:
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613+lfs/nmcryptgate.so: undefined symbol: nmlistalloc
/usr/local/lib is included inside /etc/ld.so.conf.d/libc.conf
/usr/lib/php5/20060613+lfs/nmcryptgate.la reads:
# nmcryptgate.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='nmcryptgate.so'
# Names of this library.
library_names='nmcryptgate.so nmcryptgate.so nmcryptgate.so'
# The name of the static archive.
old_library=''
# Libraries that this one depends upon.
dependency_libs=''
# Version information for nmcryptgate.
current=0
age=0
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=yes
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/usr/local/lib'
#libdir='/usr/lib/php5/20060613+lfs'
/usr/local/lib/libnmcryptgate.la
# libnmcryptgate.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.3.4 (1.385.2.196 1999/12/07 21:47:57)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname=''
# Names of this library.
library_names='libnmcryptgate.so.1 libnmcryptgate.so libnmcryptgate.so'
# The name of the static archive.
old_library=''
# Libraries that this one depends upon.
dependency_libs=' -L. -L/usr/ssl/lib -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto'
# Version information for libnmcryptgate.
current=1
age=0
revision=29
# Is this an already installed library?
installed=yes
# Directory that this library needs to be installed in:
libdir='/usr/local/lib'
In my thinking/guessing the whole process should work this way:
- php encounters a method call handled by the extension
- the respective extension method is called
- the extension being just a php wrapper (my guess) calls the underlying binary
- until x. ... and returning back to php script
I guess that step 3 is the problem here: somehow the extension can't find the underlying binary lib - just a guess.
Am I right on this one? Or what's the prob? Can someone help out on this?
Thanks to all and regards, Christian
PS: I just recompiled it and found an error inside the config.log:
config.log:/usr/bin/ld: h_errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in /usr/local/lib/libnmcryptgate.so
I included /usr/local/lib/libnmcryptgate.so in the Makefile by appending
DEFAULT_INCLUDES = -include /usr/local/include/nmcryptgate.h
Still the same error ...