Re: [ecasound] Something's badly wrong with ecasound!

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] Something's badly wrong with ecasound!
From: Kai Vehmanen (k_AT_eca.cx)
Date: Tue Jan 08 2002 - 18:05:16 EET


On Mon, 7 Jan 2002, Junichi Uekawa wrote:

>> Indeed it works now but I also had to specify linking against
>> libstdc++ in order for it to work; is this piece of info available
> It sounds rather bad.

Well, this should be _that_ big of a problem.

> Usually programs compiled with g++ depend on being linked with
> g++. And this rule has gotten more strict with g++-3.0, it seems.

Or more specifically, they need to be linked against -lstdc++. When
compiling with either g++ or c++ (both are just fronend scripts that
execute gcc), -lstdc++ is automatically added.

> Are you sure your program is a C program compiled with gcc ?
> If that is the case, it might be a problem on the libecasoundc side.

Libecasoundc is actually a C++ library which just happens to provide a
public C API. It is compiled with c++, so -lstdc++ is not explicitly
specified in the makefiles. I guess the easiest fix would be to just
add -lstdc++ to libecasoundc/Makefile.am. This doesn't cause any problems
as it's legal to specify one library multiple times, and libstdc++ is
always already installed.

I put the change to CVS right away. Before the change:

###| ~ |$ ldd apps/eca/lib/libecasoundc.so
        libdl.so.2 => /lib/libdl.so.2 (0x40014000)
        libm.so.6 => /lib/libm.so.6 (0x40018000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40035000)
        libc.so.6 => /lib/libc.so.6 (0x40048000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

and after:

###| ~ |$ ldd apps/eca/lib/libecasoundc_debug.so
        libstdc++-libc6.1-1.so.2 => /usr/lib/libstdc++-libc6.1-1.so.2 (0x4000f000)
        libdl.so.2 => /lib/libdl.so.2 (0x40051000)
        libm.so.6 => /lib/libm.so.6 (0x40055000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40072000)
        libc.so.6 => /lib/libc.so.6 (0x40086000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

... this should be enough. Linking to libkvutils and libecasound is still
missing, so they have to be specified when linking against libecasoundc
(--> ecasoundc-config --libs). This is because problems with linking
libraries against libraries affect only situatioons where the library
linked against is not yet installed to its final location (like libkvutils
and libecasound).

Although it is possibly to link against yet uninstalled libtool libraries,
it seems to be error-prone. Libtool documentation doesn't really cover
this case in anyway (--> possible weird problems with different libtool
versions and platforms).

-- 
 http://www.eca.cx
 Audio software for Linux!

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jan 08 2002 - 17:56:24 EET