[Flac-dev] non-PIC code in shared libs again

Ben Hines bhines at alumni.ucsd.edu
Tue Feb 11 08:44:06 PST 2003


On Tuesday, February 11, 2003, at 08:11  AM, Matt Zimmerman wrote:

> On Tue, Feb 11, 2003 at 07:55:37AM -0800, Ben Hines wrote:
>
>> The patch fixed the problem with your libs. However, when linking the
>> xmms plugin i still get:
>>
>> *** Warning: This library needs some functionality provided by 
>> -lstdc++.
>> *** 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.
>
> Hmm...can you post the libtool command line and resulting gcc command 
> line
> which caused this message?  I did not think any C++ code was linked 
> into the
> xmms plugin, but that may have changed since I last looked at it.

I thnk it comes from the -lstdc++ which is added to ID3LIB_LIBS in 
configure.in. -lstdc++ is only needed on darwin for C++ code if you 
link with the "gcc" (or ld, of course) commands. If you link with the 
"g++", it is included implicitly. Additionally, darwin's stdc++ lib is 
static only. If i remove the -lstdc++ from the libtool line below, it 
links, and works in xmms. I think the -lstdc++ is not needed when 
linking to libid3 on darwin, even though its C++, because libstdc++.a 
is already (a static) part of libid3.

You might be able to replicate this on the compile farm, even though it 
is only has gcc2/ darwin 10.1 currently.

-Ben


../../libtool-disable-static --mode=link gcc  -I../.. -I./include 
-I../../include -O3 -DNDEBUG -fomit-frame-pointer -funroll-loops 
-finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__ -g -O2 
-I/sw/include -I/sw/include -I/sw/include/xmms -I/sw/include/gtk-1.2 
-I/sw/include/glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include  
-L/sw/src/flac-1.1.0-3/flac-1.1.0/src/libOggFLAC/.libs 
-L/sw/src/flac-1.1.0-3/flac-1.1.0/src/libFLAC/.libs -o libxmms-flac.la 
-rpath /sw/lib/xmms/Input -module -avoid-version charset.lo 
configure.lo plugin.lo wrap_id3.lo fileinfo.lo 
../../src/plugin_common/libplugin_common.la 
../../src/share/grabbag/libgrabbag.la 
../../src/share/gain_analysis/libgain_analysis.la 
../../src/share/utf8/libutf8.la ../../src/libFLAC/libFLAC.la 
-L../../src/libFLAC/.libs -L/sw/lib -L/sw/lib -L/usr/X11R6/lib -lgtk 
-lgdk -lgmodule -lglib -ldl -lintl -lXext -lX11 -lm -lxmms -L/sw/lib 
-lid3 -lz -lstdc++ -lstdc++ -lz
mkdir .libs
rm -fr .libs/libxmms-flac.la .libs/libxmms-flac.* .libs/libxmms-flac.*

*** Warning: This library needs some functionality provided by -lstdc++.
*** 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.

*** Warning: This library needs some functionality provided by -lstdc++.
*** 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.

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libxmms-flac.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.





More information about the Flac-dev mailing list