[Flac-dev] flac-1.1.0: libtool warnings

Alexey Tourbin at at altlinux.org
Wed Feb 4 16:59:05 PST 2004


Hi,

And thanks for flac.  There's a minor problem when compiling flac:
libtool warns about mixing up shared and static libraries. Typical
messages are:

*** Warning: Linking the shared library libxmms-flac.la against the
*** static library ../../src/plugin_common/libplugin_common.a is not portable!

*** Warning: Linking the shared library libxmms-flac.la against the
*** static library ../../src/share/grabbag/libgrabbag.a is not portable!

*** Warning: Linking the shared library libxmms-flac.la against the
*** static library ../../src/share/gain_analysis/libgain_analysis.a is not portable!

*** Warning: Linking the shared library libxmms-flac.la against the
*** static library ../../src/share/utf8/libutf8.a is not portable!

This is because libtool compiles so called position independent
object code for shared libraries (-fPIC compiler option) and non-PIC
code for static libraries and executables.  Bringing non-PIC code into
shared libraries seems to be harmless, though definitely not
recommended (it affects dynamic linker internals).

To fix this issue, simply turning static noinst_LIBRARIES into
libootl noinst_LTLIBRARIES is enough.  Libtool then will manage PIC and
non-PIC object code automagically.

--- flac-1.1.0~/src/flac/Makefile.am	2003-01-25 21:14:42 +0300
+++ flac-1.1.0/src/flac/Makefile.am	2004-02-05 03:52:31 +0300
@@ -41,10 +41,10 @@
 
 flac_LDADD = \
 	$(NEED_OGGFLAC_LIB) \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
-	$(top_builddir)/src/share/getopt/libgetopt.a \
-	$(top_builddir)/src/share/utf8/libutf8.a \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+	$(top_builddir)/src/share/getopt/libgetopt.la \
+	$(top_builddir)/src/share/utf8/libutf8.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	@OGG_LIBS@ \
 	@LIBICONV@ \
--- flac-1.1.0~/src/metaflac/Makefile.am	2003-01-25 21:14:53 +0300
+++ flac-1.1.0/src/metaflac/Makefile.am	2004-02-05 03:52:31 +0300
@@ -39,10 +39,10 @@
 metaflac_LDFLAGS = 
 
 metaflac_LDADD = \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
-	$(top_builddir)/src/share/getopt/libgetopt.a \
-	$(top_builddir)/src/share/utf8/libutf8.a \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+	$(top_builddir)/src/share/getopt/libgetopt.la \
+	$(top_builddir)/src/share/utf8/libutf8.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	@LIBICONV@ \
 	-lm
--- flac-1.1.0~/src/plugin_common/Makefile.am	2003-01-25 21:15:48 +0300
+++ flac-1.1.0/src/plugin_common/Makefile.am	2004-02-05 03:52:31 +0300
@@ -6,7 +6,7 @@
 
 INCLUDES = -I$(top_srcdir)/include @ID3LIB_CFLAGS@
 
-noinst_LIBRARIES = libplugin_common.a
+noinst_LTLIBRARIES = libplugin_common.la
 
 noinst_HEADERS = \
 	all.h \
@@ -20,7 +20,7 @@
 	replaygain_synthesis.h \
 	vorbiscomment.h
 
-libplugin_common_a_SOURCES = \
+libplugin_common_la_SOURCES = \
 	canonical_tag.c \
 	charset.c \
 	dither.c \
--- flac-1.1.0~/src/plugin_xmms/Makefile.am	2003-01-14 04:33:03 +0300
+++ flac-1.1.0/src/plugin_xmms/Makefile.am	2004-02-05 03:52:31 +0300
@@ -57,10 +57,10 @@
 #   http://lists.freshrpms.net/pipermail/rpm-list/2002-April/000746.html
 # the workaround is the extra '-L$(top_builddir)/src/libFLAC/.libs'
 libxmms_flac_la_LIBADD = \
-	$(top_builddir)/src/plugin_common/libplugin_common.a \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
-	$(top_builddir)/src/share/utf8/libutf8.a \
+	$(top_builddir)/src/plugin_common/libplugin_common.la \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+	$(top_builddir)/src/share/utf8/libutf8.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	-L$(top_builddir)/src/libFLAC/.libs \
 	@XMMS_LIBS@ \
--- flac-1.1.0~/src/share/gain_analysis/Makefile.am	2003-01-25 21:15:37 +0300
+++ flac-1.1.0/src/share/gain_analysis/Makefile.am	2004-02-05 03:52:31 +0300
@@ -4,9 +4,9 @@
 
 INCLUDES = -I$(top_srcdir)/include/share
 
-noinst_LIBRARIES = libgain_analysis.a
+noinst_LTLIBRARIES = libgain_analysis.la
 
-libgain_analysis_a_SOURCES = gain_analysis.c
+libgain_analysis_la_SOURCES = gain_analysis.c
 
 EXTRA_DIST = \
 	Makefile.lite \
--- flac-1.1.0~/src/share/getopt/Makefile.am	2003-01-25 21:15:33 +0300
+++ flac-1.1.0/src/share/getopt/Makefile.am	2004-02-05 03:52:31 +0300
@@ -4,9 +4,9 @@
 
 INCLUDES = -I$(top_srcdir)/include/share
 
-noinst_LIBRARIES = libgetopt.a
+noinst_LTLIBRARIES = libgetopt.la
 
-libgetopt_a_SOURCES = getopt.c getopt1.c
+libgetopt_la_SOURCES = getopt.c getopt1.c
 
 EXTRA_DIST = \
 	Makefile.lite \
--- flac-1.1.0~/src/share/grabbag/Makefile.am	2003-01-25 21:15:39 +0300
+++ flac-1.1.0/src/share/grabbag/Makefile.am	2004-02-05 03:52:31 +0300
@@ -4,9 +4,9 @@
 
 INCLUDES = -I$(top_srcdir)/include
 
-noinst_LIBRARIES = libgrabbag.a
+noinst_LTLIBRARIES = libgrabbag.la
 
-libgrabbag_a_SOURCES = \
+libgrabbag_la_SOURCES = \
 	cuesheet.c \
 	file.c \
 	replaygain.c \
--- flac-1.1.0~/src/share/utf8/Makefile.am	2003-01-25 21:15:36 +0300
+++ flac-1.1.0/src/share/utf8/Makefile.am	2004-02-05 03:52:31 +0300
@@ -4,9 +4,9 @@
 
 INCLUDES = -I$(top_srcdir)/include/share
 
-noinst_LIBRARIES = libutf8.a
+noinst_LTLIBRARIES = libutf8.la
 
-libutf8_a_SOURCES = charset.c charset.h iconvert.c utf8.c
+libutf8_la_SOURCES = charset.c charset.h iconvert.c utf8.c
 
 EXTRA_DIST = \
 	Makefile.lite \
--- flac-1.1.0~/src/test_grabbag/cuesheet/Makefile.am	2003-01-25 21:15:58 +0300
+++ flac-1.1.0/src/test_grabbag/cuesheet/Makefile.am	2004-02-05 03:52:31 +0300
@@ -25,8 +25,8 @@
 test_cuesheet_SOURCES = \
 	main.c
 test_cuesheet_LDADD = \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	-lm
 
--- flac-1.1.0~/src/test_libFLAC/Makefile.am	2003-01-25 21:15:40 +0300
+++ flac-1.1.0/src/test_libFLAC/Makefile.am	2004-02-05 03:52:31 +0300
@@ -24,8 +24,8 @@
 
 noinst_PROGRAMS = test_libFLAC
 test_libFLAC_LDADD = \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	-lm
 test_libFLAC_SOURCES = \
--- flac-1.1.0~/src/test_libFLAC++/Makefile.am	2003-01-25 21:15:42 +0300
+++ flac-1.1.0/src/test_libFLAC++/Makefile.am	2004-02-05 03:52:31 +0300
@@ -24,8 +24,8 @@
 
 noinst_PROGRAMS = test_libFLAC++
 test_libFLAC___LDADD = \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
 	$(top_builddir)/src/libFLAC++/libFLAC++.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	-lm
--- flac-1.1.0~/src/test_libOggFLAC/Makefile.am	2003-01-25 21:15:45 +0300
+++ flac-1.1.0/src/test_libOggFLAC/Makefile.am	2004-02-05 03:52:31 +0300
@@ -24,8 +24,8 @@
 
 noinst_PROGRAMS = test_libOggFLAC
 test_libOggFLAC_LDADD = \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
 	$(top_builddir)/src/libOggFLAC/libOggFLAC.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	@OGG_LIBS@ \
--- flac-1.1.0~/src/test_libOggFLAC++/Makefile.am	2003-01-25 21:15:46 +0300
+++ flac-1.1.0/src/test_libOggFLAC++/Makefile.am	2004-02-05 03:52:31 +0300
@@ -24,8 +24,8 @@
 
 noinst_PROGRAMS = test_libOggFLAC++
 test_libOggFLAC___LDADD = \
-	$(top_builddir)/src/share/grabbag/libgrabbag.a \
-	$(top_builddir)/src/share/gain_analysis/libgain_analysis.a \
+	$(top_builddir)/src/share/grabbag/libgrabbag.la \
+	$(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
 	$(top_builddir)/src/libOggFLAC++/libOggFLAC++.la \
 	$(top_builddir)/src/libOggFLAC/libOggFLAC.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20040204/4c50e438/attachment.pgp


More information about the Flac-dev mailing list