This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FFTW3, Shared Libraries, libtool


James R. Phillips wrote:

Hi all,

I am looking at packaging fftw3, a library for fast fourier transforms, for use
with octave.  This is a nice gpl package that has been autoconfiscated, and
builds out-of-tree properly, making it work well with g-b-s.  octave can be
built to use fftw3 instead of its default routines to perform fft's.

I have run into a snag, though, because despite being configured to build
shared libraries, I see no shared libraries when the fftw3 build completes.

When the build is complete, there is a libfftw3.a and libfftw3.la file
installed in usr/lib, and information in libfftw3.la (an ascii file created by
libtool) indicates there was no dll built, only a static library (libfftw3.a).

The configuration process creates a shell script labeled libtool in the build
directory, which appears to be based on some older version of gnu libtool.  So,
I'm wondering where to go from here.  I'm not very familiar with libtool, and
wonder how it is that this shell script gets created without the cygwin libtool
package being installed.  Perhaps the cygwin version would work better, i.e.
actually create the dll?  However, reading the libtool script indicates it has
configuration information created during execution of the configuration script.
 I'm not sure how to tell configure to use an installed version of libtool
instead of the version that is shipped with the source.

Anyone have ideas on this?

I have this attached patch against 3.0.1. I don't know if it is still all needed, however you see where to go. Maybe it applies with some fuzz.

After applying the changes run `autoreconf --force --install --verbose`
in the top level source directory to install the Cygwin libtool and the
current helper scripts in the source tree and to regenerate aclocal.m4,
configure and the Makefile.in templates.

Then try to build again, should create shared libraries now.
The two relevant changes are the build order of the subdirectories
because of dependencies and the libtool ldflag '-no-undefined' to
convince it to build shared libs.

Using CFLAGS in Makefile.am is not working with recent automake one must
use AM_CFLAGS instead.


Gerrit -- =^..^=
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/Makefile.am fftw-3.0.1/Makefile.am
--- fftw-3.0.1~/Makefile.am	2003-04-17 16:51:09.000000000 +0200
+++ fftw-3.0.1/Makefile.am	2003-07-29 19:29:19.745731200 +0200
@@ -8,8 +8,8 @@ else
 GENFFT =
 endif
 
-SUBDIRS=support $(GENFFT) kernel simd dft rdft reodft threads api	\
-libbench2 . tests doc tools
+SUBDIRS=support $(GENFFT) kernel simd dft rdft reodft api	\
+libbench2 . threads tests doc tools
 EXTRA_DIST=COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in acx_pthread.m4
 
 libfftw3@PREC_SUFFIX@_la_SOURCES = 
@@ -33,7 +33,7 @@ libfftw3@PREC_SUFFIX@_la_LIBADD =			\
 	reodft/libreodft.la				\
 	api/libapi.la
 
-libfftw3@PREC_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+libfftw3@PREC_SUFFIX@_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
 
 fftw3@PREC_SUFFIX@.pc: fftw.pc
 	cp -f fftw.pc fftw3@PREC_SUFFIX@.pc
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/configure.ac fftw-3.0.1/configure.ac
--- fftw-3.0.1~/configure.ac	2003-07-04 07:18:48.000000000 +0200
+++ fftw-3.0.1/configure.ac	2003-07-28 21:53:25.550689600 +0200
@@ -134,7 +134,6 @@ ACX_PROG_CC_EGCS
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
-AC_PROG_RANLIB
 AM_PROG_LIBTOOL
 
 AC_CHECK_PROG(OCAMLC, ocamlc, ocamlc)
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/dft/codelets/inplace/Makefile.am fftw-3.0.1/dft/codelets/inplace/Makefile.am
--- fftw-3.0.1~/dft/codelets/inplace/Makefile.am	2003-03-27 08:37:52.000000000 +0100
+++ fftw-3.0.1/dft/codelets/inplace/Makefile.am	2003-07-28 21:54:40.388300800 +0200
@@ -13,7 +13,7 @@
 ###########################################################################
 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/dft	\
 -I$(top_srcdir)/dft/codelets
-CFLAGS = @CFLAGS@ @CODELET_OPTIM@
+AM_CFLAGS = @CFLAGS@ @CODELET_OPTIM@
 noinst_LTLIBRARIES = libdft_inplace.la
 
 ###########################################################################
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/dft/codelets/standard/Makefile.am fftw-3.0.1/dft/codelets/standard/Makefile.am
--- fftw-3.0.1~/dft/codelets/standard/Makefile.am	2003-04-18 00:53:29.000000000 +0200
+++ fftw-3.0.1/dft/codelets/standard/Makefile.am	2003-07-28 21:54:42.291036800 +0200
@@ -13,7 +13,7 @@
 ###########################################################################
 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/dft	\
 -I$(top_srcdir)/dft/codelets
-CFLAGS = @CFLAGS@ @CODELET_OPTIM@
+AM_CFLAGS = @CFLAGS@ @CODELET_OPTIM@
 noinst_LTLIBRARIES = libdft_standard.la
 
 ###########################################################################
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/dft/simd/Makefile.am fftw-3.0.1/dft/simd/Makefile.am
--- fftw-3.0.1~/dft/simd/Makefile.am	2003-04-14 21:00:48.000000000 +0200
+++ fftw-3.0.1/dft/simd/Makefile.am	2003-07-28 21:58:40.753929600 +0200
@@ -1,6 +1,6 @@
 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/dft -I$(top_srcdir)/simd
 noinst_LTLIBRARIES = libdft_simd.la
 SUBDIRS = codelets
-CFLAGS = @CFLAGS@ $(SIMD_CFLAGS)
+AM_CFLAGS = @CFLAGS@ $(SIMD_CFLAGS)
 libdft_simd_la_SOURCES = n1b.c n1f.c n2b.c n2f.c q1b.c q1f.c t1b.c	\
 t1f.c n1b.h n1f.h n2b.h n2f.h q1b.h q1f.h t1b.h t1f.h
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/dft/simd/codelets/Makefile.am fftw-3.0.1/dft/simd/codelets/Makefile.am
--- fftw-3.0.1~/dft/simd/codelets/Makefile.am	2003-06-16 19:53:25.000000000 +0200
+++ fftw-3.0.1/dft/simd/codelets/Makefile.am	2003-07-28 21:58:51.469337600 +0200
@@ -13,7 +13,7 @@
 ###########################################################################
 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/dft	\
 -I$(top_srcdir)/dft/simd -I$(top_srcdir)/simd
-CFLAGS = @CFLAGS@ @CODELET_OPTIM@ $(SIMD_CFLAGS)
+AM_CFLAGS = @CFLAGS@ @CODELET_OPTIM@ $(SIMD_CFLAGS)
 noinst_LTLIBRARIES = libdft_codelets_simd.la
 
 ###########################################################################
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/rdft/codelets/hc2r/Makefile.am fftw-3.0.1/rdft/codelets/hc2r/Makefile.am
--- fftw-3.0.1~/rdft/codelets/hc2r/Makefile.am	2003-04-18 00:53:29.000000000 +0200
+++ fftw-3.0.1/rdft/codelets/hc2r/Makefile.am	2003-07-28 21:55:04.232587200 +0200
@@ -13,7 +13,7 @@
 ###########################################################################
 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/rdft	\
 -I$(top_srcdir)/rdft/codelets
-CFLAGS = @CFLAGS@ @CODELET_OPTIM@
+AM_CFLAGS = @CFLAGS@ @CODELET_OPTIM@
 noinst_LTLIBRARIES = librdft_codelets_hc2r.la
 
 ###########################################################################
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/rdft/codelets/r2hc/Makefile.am fftw-3.0.1/rdft/codelets/r2hc/Makefile.am
--- fftw-3.0.1~/rdft/codelets/r2hc/Makefile.am	2003-04-18 00:53:29.000000000 +0200
+++ fftw-3.0.1/rdft/codelets/r2hc/Makefile.am	2003-07-28 21:55:16.109665600 +0200
@@ -13,7 +13,7 @@
 ###########################################################################
 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/rdft	\
 -I$(top_srcdir)/rdft/codelets
-CFLAGS = @CFLAGS@ @CODELET_OPTIM@
+AM_CFLAGS = @CFLAGS@ @CODELET_OPTIM@
 noinst_LTLIBRARIES = librdft_codelets_r2hc.la
 
 ###########################################################################
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/rdft/codelets/r2r/Makefile.am fftw-3.0.1/rdft/codelets/r2r/Makefile.am
--- fftw-3.0.1~/rdft/codelets/r2r/Makefile.am	2003-03-27 08:37:52.000000000 +0100
+++ fftw-3.0.1/rdft/codelets/r2r/Makefile.am	2003-07-28 21:55:25.723489600 +0200
@@ -13,7 +13,7 @@
 ###########################################################################
 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/rdft	\
 -I$(top_srcdir)/rdft/codelets
-CFLAGS = @CFLAGS@ @CODELET_OPTIM@
+AM_CFLAGS = @CFLAGS@ @CODELET_OPTIM@
 noinst_LTLIBRARIES = librdft_codelets_r2r.la
 
 ###########################################################################
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/simd/Makefile.am fftw-3.0.1/simd/Makefile.am
--- fftw-3.0.1~/simd/Makefile.am	2003-04-14 21:00:50.000000000 +0200
+++ fftw-3.0.1/simd/Makefile.am	2003-07-28 21:56:09.756806400 +0200
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/kernel
 noinst_LTLIBRARIES = libsimd.la
-CFLAGS = @CFLAGS@ $(SIMD_CFLAGS)
+AM_CFLAGS = @CFLAGS@ $(SIMD_CFLAGS)
 libsimd_la_SOURCES = 3dnow.c altivec.c sse-aux.c sse.c sse2-aux.c	\
 sse2.c simd-3dnow.h simd-altivec.h simd-sse.h simd-sse2.h simd.h taint.c
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/tests/Makefile.am fftw-3.0.1/tests/Makefile.am
--- fftw-3.0.1~/tests/Makefile.am	2003-05-08 03:09:43.000000000 +0200
+++ fftw-3.0.1/tests/Makefile.am	2003-07-30 14:06:12.795764800 +0200
@@ -12,9 +12,10 @@ LIBFFTWTHREADS = 
 endif
 
 bench_SOURCES = bench.c hook.c
-bench_LDADD = $(LIBFFTWTHREADS)				\
+bench_LDADD = 	\
 $(top_builddir)/libfftw3@PREC_SUFFIX@.la		\
-$(top_builddir)/libbench2/libbench2.a $(THREADLIBS)
+$(top_builddir)/libbench2/libbench2.a $(LIBFFTWTHREADS)	\
+$(THREADLIBS)
 
 check-local: bench
 	perl -w $(srcdir)/check.pl -r -c=30 -v `pwd`/bench
diff -urdNp --exclude=doc --exclude=.deps --exclude=.libs --exclude=Makefile --exclude=config.h --exclude=config.status --exclude=config.log --exclude=configure.lineno --exclude=fftw_wisdom.1 --exclude=fftw-wisdom-to-conf --exclude=stamp-h1 --exclude=libtool --exclude=fftw.pc --exclude=fftw3.pc --exclude=fftw-wisdom.1 fftw-3.0.1~/threads/Makefile.am fftw-3.0.1/threads/Makefile.am
--- fftw-3.0.1~/threads/Makefile.am	2003-03-16 21:00:04.000000000 +0100
+++ fftw-3.0.1/threads/Makefile.am	2003-07-30 15:47:23.244641600 +0200
@@ -9,4 +9,5 @@ libfftw3@PREC_SUFFIX@_threads_la_SOURCES
 threads.h dft-vrank-geq1.c ct-dit.c rdft-vrank-geq1.c hc2hc-dit.c	\
 hc2hc-dif.c vrank-geq1-rdft2.c f77api.c f77funcs.h
 
-libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ ../rdft/librdft.la
+libfftw3@PREC_SUFFIX@_threads_la_LIBADD = ../libfftw3.la

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]