[haiku] Re: Haunted by libstdc++.r4.so!

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sun, 09 Feb 2020 09:42:51 +0100

Le 9 février 2020 03:33:35 GMT+01:00, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx> 
a écrit :

Hi,

I have built a program that -- whatever I do -- complains ,when I try
to run  it:

"runtime_loader: Cannot open file libstdc++.r4.so: No such file or
directory"

The strangeness is that: a) it's supposed to be x86, which I understand
doesn't
use that lib, and b) it's in C, not C++!

In more detail, it's fluidsynth 1.11, which I need to compile myself
for various
reasons.  It is in two parts: a library and a front-end.  It's the
front-end that
gives the above message, but it only lists the app library and libroot
as
needed ones.  The library part links to several system libs, but none
show any need
for the 'r4' lib.  If I load it with another app, it doesn't complain.
Only the front-end
seems to have the problem.

The code is built with cmake, but I can't see anything in that to cause
it.
And I have another library/front-end x86 program (Csound) that builds
and runs fine.

I'm baffled.  Any idea?

Thanks,
      -- Pete --

It's quite possible that one of the "find" modules for cmake is broken and 
finds the gcc2 version of a library. In particular, it can be a problem for 
modules using pkg-config.

You have two ways to workaround this:
- uninstall pkgconfig and install only pkgconfig_x86
- or, set the PKG_CONFIG_LIBDIR to point to develop/libs/x86 so that pkgconfig 
looks there

Then make a clean build (because otherwise cmake caches previous results)

If that still does not work, you'll need to look into more details in what 
causes cmake to end up linking a gcc2 library.

Other related posts: