The ldapplugin being compiled. This is with -fPIC added to the CPPFLAGS
and after *_la_LDFLAGS, still with no success:
if /usr/local/bin/libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I.
-I../../common -DLINUX -I../../common -I../../provider/libserver
-I../../provider/common -I/usr/local/include -fPIC -DLDAP_DEPRECATED=1
-DLDAP_THREAD_SAFE -O2 -pipe -g -Wall -Wno-write-strings -DOPENBSD
-pedantic -Wno-long-long -pthread -MT ldapplugin_la-LDAPUserPlugin.lo
-MD -MP -MF ".deps/ldapplugin_la-LDAPUserPlugin.Tpo" -c -o
ldapplugin_la-LDAPUserPlugin.lo `test -f 'LDAPUserPlugin.cpp' || echo
'./'`LDAPUserPlugin.cpp; \
then mv -f ".deps/ldapplugin_la-LDAPUserPlugin.Tpo"
".deps/ldapplugin_la-LDAPUserPlugin.Plo"; else rm -f
".deps/ldapplugin_la-LDAPUserPlugin.Tpo"; exit 1; fi
mkdir .libs
c++ -DHAVE_CONFIG_H -I. -I. -I../../common -DLINUX -I../../common
-I../../provider/libserver -I../../provider/common -I/usr/local/include
-fPIC -DLDAP_DEPRECATED=1 -DLDAP_THREAD_SAFE -O2 -pipe -g -Wall
-Wno-write-strings -DOPENBSD -pedantic -Wno-long-long -pthread -MT
ldapplugin_la-LDAPUserPlugin.lo -MD -MP -MF
.deps/ldapplugin_la-LDAPUserPlugin.Tpo -c LDAPUserPlugin.cpp -fPIC
-DPIC -o .libs/ldapplugin_la-LDAPUserPlugin.o
c++ -DHAVE_CONFIG_H -I. -I. -I../../common -DLINUX -I../../common
-I../../provider/libserver -I../../provider/common -I/usr/local/include
-fPIC -DLDAP_DEPRECATED=1 -DLDAP_THREAD_SAFE -O2 -pipe -g -Wall
-Wno-write-strings -DOPENBSD -pedantic -Wno-long-long -pthread -MT
ldapplugin_la-LDAPUserPlugin.lo -MD -MP -MF
.deps/ldapplugin_la-LDAPUserPlugin.Tpo -c LDAPUserPlugin.cpp -o
ldapplugin_la-LDAPUserPlugin.o >/dev/null 2>&1
if /usr/local/bin/libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I.
-I../../common -DLINUX -I../../common -I../../provider/libserver
-I../../provider/common -I/usr/local/include -fPIC -DLDAP_DEPRECATED=1
-DLDAP_THREAD_SAFE -O2 -pipe -g -Wall -Wno-write-strings -DOPENBSD
-pedantic -Wno-long-long -pthread -MT ldapplugin_la-ldappasswords.lo -MD
-MP -MF ".deps/ldapplugin_la-ldappasswords.Tpo" -c -o
ldapplugin_la-ldappasswords.lo `test -f 'ldappasswords.cpp' || echo
'./'`ldappasswords.cpp; \
then mv -f ".deps/ldapplugin_la-ldappasswords.Tpo"
".deps/ldapplugin_la-ldappasswords.Plo"; else rm -f
".deps/ldapplugin_la-ldappasswords.Tpo"; exit 1; fi
c++ -DHAVE_CONFIG_H -I. -I. -I../../common -DLINUX -I../../common
-I../../provider/libserver -I../../provider/common -I/usr/local/include
-fPIC -DLDAP_DEPRECATED=1 -DLDAP_THREAD_SAFE -O2 -pipe -g -Wall
-Wno-write-strings -DOPENBSD -pedantic -Wno-long-long -pthread -MT
ldapplugin_la-ldappasswords.lo -MD -MP -MF
.deps/ldapplugin_la-ldappasswords.Tpo -c ldappasswords.cpp -fPIC -DPIC
-o .libs/ldapplugin_la-ldappasswords.o
c++ -DHAVE_CONFIG_H -I. -I. -I../../common -DLINUX -I../../common
-I../../provider/libserver -I../../provider/common -I/usr/local/include
-fPIC -DLDAP_DEPRECATED=1 -DLDAP_THREAD_SAFE -O2 -pipe -g -Wall
-Wno-write-strings -DOPENBSD -pedantic -Wno-long-long -pthread -MT
ldapplugin_la-ldappasswords.lo -MD -MP -MF
.deps/ldapplugin_la-ldappasswords.Tpo -c ldappasswords.cpp -o
ldapplugin_la-ldappasswords.o >/dev/null 2>&1
/usr/local/bin/libtool --mode=link c++ -O2 -pipe -g -Wall
-Wno-write-strings -DOPENBSD -pedantic -Wno-long-long -pthread
-L/usr/local/lib -lexecinfo -lssl -lcrypto -o ldapplugin.la -rpath
/usr/local/lib/zarafa -module -fPIC ldapplugin_la-LDAPUserPlugin.lo
ldapplugin_la-ldappasswords.lo ../../common/libcommon_util.la -lldap
-liconv
*** Warning: This system can not link to static lib archive
../../common/libcommon_util.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
ar cru .libs/ldapplugin.a ldapplugin_la-LDAPUserPlugin.o
ldapplugin_la-ldappasswords.o
ranlib .libs/ldapplugin.a
creating ldapplugin.la
Gavin Norman wrote:
I'm trying to port an application, however I'm having an issue with
libtool not creating the shared objects.
The compilation works fine, however only a static archive (*.a) and
libtool library/policy (*.la) are created.
In the below Makefile.am, you can see the two libtool libraries that
should be created.
M_CPPFLAGS = $(DEBUGFLAGS) -DLINUX -I${top_srcdir}/common
-I${top_srcdir}/provider/libserver -I${top_srcdir}/provider/common
COMMON_PLUGIN_FILES = plugin.h
COMMON_DBPLUGIN_FILES = DBBase.h DBBase.cpp ../libserver/ECDatabase.h
pkglib_LTLIBRARIES =
if WITH_UNIX
pkglib_LTLIBRARIES += unixplugin.la
unixplugin_la_CXXFLAGS = $(MYSQL_INCLUDES)
unixplugin_la_SOURCES = UnixUserPlugin.cpp UnixUserPlugin.h
$(COMMON_PLUGIN_FILES) $(COMMON_DBPLUGIN_FILES)
unixplugin_la_LDFLAGS = -module
unixplugin_la_LIBADD = ${top_builddir}/common/libcommon_util.la
$(MYSQL_LIBS) $(CRYPT_LIBS)
endif
if WITH_LDAP
pkglib_LTLIBRARIES += ldapplugin.la
ldapplugin_la_CXXFLAGS = $(LDAP_FLAGS) -DLDAP_THREAD_SAFE
ldapplugin_la_SOURCES = LDAPUserPlugin.cpp LDAPUserPlugin.h
ldappasswords.cpp ldappasswords.h $(COMMON_PLUGIN_FILES)
ldapplugin_la_LDFLAGS = -module
ldapplugin_la_LIBADD = ${top_builddir}/common/libcommon_util.la
$(LDAP_LIBS)
endif
# default plugin
pkglib_LTLIBRARIES += dbplugin.la
dbplugin_la_CXXFLAGS = $(MYSQL_INCLUDES)
dbplugin_la_SOURCES = DBUserPlugin.cpp DBUserPlugin.h
$(COMMON_PLUGIN_FILES) $(COMMON_DBPLUGIN_FILES)
dbplugin_la_LDFLAGS = -module
dbplugin_la_LIBADD = ${top_builddir}/common/libcommon_util.la
$(MYSQL_LIBS)
check-syntax:
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)
$(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDAP_FLAGS) \
-fsyntax-only -fmessage-length=0 ${CHK_SOURCES} -Wall
-Wformat=2
Thanks.
--
Gavin Norman
M: +614 0935 4020
E: [EMAIL PROTECTED]