fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] New debian/ubuntu package available for testing


From: josh
Subject: Re: [fluid-dev] New debian/ubuntu package available for testing
Date: Sun, 24 May 2009 23:38:48 -0400
User-agent: Internet Messaging Program (IMP) H3 (4.1.6)

Quoting Pedro Lopez-Cabanillas <address@hidden>:
I lack some knowledge in the area of shared libraries.  I notice that
when running ldd on the fluidsynth executable, it comes up with a
large list of dependencies, which aren't actually used in the
fluidsynth application itself, but are instead dependencies of
libfluidsynth.  Perhaps ldd is recursively listing the dependencies
though?

Yes, it is. But you can give -u and -r in the command line to avoid indirect
dependencies. This is what I got here:

$ ldd -u -r /usr/bin/fluidsynth
Unused direct dependencies:
        /lib/libreadline.so.5
        /lib/libncurses.so.5
        /usr/local/lib/libjack.so.0
        /usr/lib/libasound.so.2
        /lib/libm.so.6
        /lib/libdl.so.2
        /lib/librt.so.1
        /usr/lib/libpulse-simple.so.0
        /usr/lib/libpulse.so.0
        /lib/libpthread.so.0

(a lot of unused dependencies!)

The src/Makefile.am is using "fluidsynth_LDADD = libfluidsynth.la" to
link in the libfluidsynth library.  This seems correct and I'm not
sure where any other unnecessary linkage is occurring.

IMO, the easiest way to fix this would be to add a flag for the linker [1],
one of these lines in src/Makefile.am:

        fluidsynth_LDFLAGS = -Wl,--as-needed
or
        AM_LDFLAGS = -Wl,--as-needed

or set this environment variable before executing configure:

        LDFLAGS=-Wl,--as-needed

Can you test for unwanted side effects?

Regards,
Pedro

[1] http://www.gentoo.org/proj/en/qa/asneeded.xml


I added fluidsynth_LDFLAGS = -Wl,--as-needed to src/Makefile.am and got this:

ldd -r -u src/.libs/fluidsynth
Unused direct dependencies:

        /lib/tls/i686/cmov/libpthread.so.0

Which seems better. No unwanted side effects from what I can tell. Thanks for researching that.

Cheers!

Josh





reply via email to

[Prev in Thread] Current Thread [Next in Thread]