[Issues] [mod_gnutls 0000099]: mod_gnutls build fails to produce shared library under CygWin

Mantis Bug Tracker issues at outoforder.cc
Sun Jun 14 11:50:17 EDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://issues.outoforder.cc/view.php?id=99 
====================================================================== 
Reported By:                TimeHorse
Assigned To:                
====================================================================== 
Project:                    mod_gnutls
Issue ID:                   99
Category:                   Compile or Build
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Apache Version:             Apache 2.2.6 CYGWIN 
====================================================================== 
Date Submitted:             2009-05-31 14:15 EDT
Last Modified:              2009-06-14 11:50 EDT
====================================================================== 
Summary:                    mod_gnutls build fails to produce shared library
under CygWin
Description: 
When trying to build mod_gnutls for the current release of CYGWIN, the
build produces the static libraries but fails to produce the required
shared library (*.so).  I have back-verified this fails also in version
0.2.0 and 0.4.3 of the mod_gnutls software.

The system I am using has the following versions:
Apache 2.2.6
GnuTLS 2.4.1
CygWin DLL 1.2.25-15
APR 1.3.3-3
APR-Utils 1.3.4-1
ap_memcache 0.7.0
====================================================================== 

---------------------------------------------------------------------- 
 (0000148) TimeHorse (reporter) - 2009-06-14 11:50
 http://issues.outoforder.cc/view.php?id=99#c148 
---------------------------------------------------------------------- 
Build still does not produce .so file as of version 0.5.5.  Statically
linked files are built, but the .so file, critical for use with Apache, is
silently ignored and never generated.

Now, this make command:

make all LDFLAGS="-W1 -shared -avoid-version -no-undefined -R/usr/bin
-L/usr/bin -L/usr/lib -ldl -shrext=.so --enable-auto-import
/usr/lib/libapr-1.la /usr/lib/libhttpd2core.la" libdir=/usr/lib/apache2
LIBTOOL=/usr/share/apr/build-1/libtool

Does make a seemingly valid shared library by the name cygmod_gnutls.dll
with headers in libmod_gnutls.dll.a but as you can see this is a massive
make line which forces me to link my module statically with the latest APR
library and the Apache 2 core.  This strikes me as inelegant for a module,
not to mention that I had to hardcode the path to the libtool since you
were not using the libtool appropriate for the Apache Portable Runtime,
had to turn on warnings, force the target to sharded, turn off versions
for no undefined symbols to make sure the build doesn't silently build the
statically linked file and neglect the critical shared library build, had
to add /usr/bin to the run-time, shared library path, /usr/bin and
/usr/lib to the link-time library search path, add dl or the dynamic
loading library to the list of linked modules and force auto import of
modules.  You can see that I tried to force the extension of the shared
library to '.so' but this actually has no effect.  I also had to force the
libdir to be the apache library directory.

Anyway, the install just needs to copy src/.libs/cygmod_gnutls.dll to
/usr/lib/apache2/mod_gnutls.so as well as src/.libs/libmod_gnutls.dll.a to
/usr/lib/apache2/mod_gnutls.dll.a and src/.libs/libmod_gnutls.la to
/usr/lib/apache2/mod_gnutls.la.

Anyone who needs to compile mod_gnutls for CYGWIN can follow these
complicated build instructions to get the software compiled. 
Specifically, the counter-intuitive make command above and the three
manual copy instructions as described below:

$ ./configure --with-apxs=/usr/sbin/apxs2

...

$ make all LDFLAGS="-W1 -shared -avoid-version -no-undefined -R/usr/bin
-L/usr/bin -L/usr/lib -ldl -shrext=.so --enable-auto-import
/usr/lib/libapr-1.la /usr/lib/libhttpd2core.la" libdir=/usr/lib/apache2
LIBTOOL=/usr/share/apr/build-1/libtool

...

$ cp -f src/.libs/cygmod_gnutls.dll /usr/lib/apache2/mod_gnutls.so
$ cp -f src/.libs/libmod_gnutls.dll.a /usr/lib/apache2/mod_gnutls.dll.a
$ cp -f src/.libs/libmod_gnutls.la /usr/lib/apache2/mod_gnutls.la

Good luck for those who use these instructions and if you need any further
help integrating these instructions into a common build, I'll be happy to
work with you further. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-31 14:15 TimeHorse      New Issue                                    
2009-05-31 14:15 TimeHorse      File Added: config.log                       
2009-05-31 14:15 TimeHorse      Apache Version            => Apache 2.2.6 CYGWIN
2009-05-31 14:16 TimeHorse      File Added: build.log                        
2009-05-31 14:16 TimeHorse      File Added: build2.log                       
2009-06-14 11:50 TimeHorse      Note Added: 0000148                          
======================================================================




More information about the Issues mailing list