Re: [ecasound] linking programs against libecasound dumps core

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] linking programs against libecasound dumps core
From: Kai Vehmanen (
Date: Tue Mar 06 2001 - 01:27:40 EET

On Mon, 5 Mar 2001, MULLER Miklos wrote:

> cc -c -o ecidoc_example.o ecidoc_example.c
> cc -lecasoundc ecidoc_example.o -o ecidoc_example
> Segmentation fault (core dumped)
> message. So I compiled ecasound again with --enable-debug, stripped down
> the ecidoc_example.c to: "int main() { return(0); }", and it still dumped

Uhm, that's bad, really bad. I just tried to compile a few progs on my
machine, and they worked fine, even the minimal one-line program. So
something is wrong with the C++ environment.

> #1 0x4021a671 in ECA_RESOURCES::ECA_RESOURCES (this=0xbffff678)
> at eca-resources.cpp:26

As a very dirty fix, you could just skip this code by replacing the lines
32-35 from ecasound/libecasound/eca-preset-map.cpp:

-string filename =
- ecarc.resource("resource-directory") + "/" + ecarc.resource("resource-file-effect-presets");
+string filename = "/usr/local/share/ecasound/resource-file-effects-presets";

... and see if that helps. This way you don't need to let this problem
stop your app development. Now the real problem is probably in...

> #3 0x4024cf41 in global constructors keyed to register_default_objects ()
> at eca-static-object-maps.cpp:94
> #4 0x40250e14 in __do_global_ctors_aux ()
> at /usr/include/g++-2/stl_vector.h:150

... the C++ static constructor mechanism. It's valid C++, but seems to
cause lots of problem with different compilers and development
environments. During 1.8.x and 1.9.x development, I've dropped most uses
of static constructors in ecasound, but there are still few places left.
One of these cases is object maps, where the above backtrace points to.

> - Stock RedHat 6.2 on two different machines,
> - gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

Now to make this even more strange, we have nearly identical setups. I too
have a Redhat6.2 variant, egcs 1.1.2-24, libstdc++ 2.9.0-24, glibc 2.1.2,
etc ...

Hmm, it seems that this issue should be resolved before 2.0 is released.

 . ... [ audio software for linux ] /\ . 
 . [ my armchair-tunes mp3/ra/wav ]

-- To unsubscribe send message 'unsubscribe' in the body of the message to <>.

New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Mar 06 2001 - 01:06:34 EET