[Bug 260364] Toolchain creates the shared library that SEGVs on load: Invalid permissions for mapped object.

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 12 Dec 2021 19:05:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260364

--- Comment #4 from Dimitry Andric <dim@FreeBSD.org> ---
I think the problem is that libcalf.so is mixing libc++.so and libstdc++.so,
which can never work correctly:

% ldd
/wrkdirs/share/dim/ports/audio/calf-lv2/work/calf-0.90.3/src/.libs/libcalf.so
/wrkdirs/share/dim/ports/audio/calf-lv2/work/calf-0.90.3/src/.libs/libcalf.so:
        libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0xcd137d63000)
        libfluidsynth.so.3 => /usr/local/lib/libfluidsynth.so.3 (0xcd1373dc000)
        libgthread-2.0.so.0 => /usr/local/lib/libgthread-2.0.so.0
(0xcd1388cb000)
        libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0xcd13c016000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0xcd138a2d000)
        libstdc++.so.6 => /usr/local/lib/gcc11/libstdc++.so.6 (0xcd13ce00000)
        libm.so.5 => /lib/libm.so.5 (0xcd13aab0000)
        libc.so.7 => /lib/libc.so.7 (0xcd135dc3000)
        libgcc_s.so.1 => /usr/local/lib/gcc11/libgcc_s.so.1 (0xcd13b69a000)
        libthr.so.3 => /lib/libthr.so.3 (0xcd13da68000)
        libjack.so.0 => /usr/local/lib/libjack.so.0 (0xcd13e927000)
        libreadline.so.8 => /usr/local/lib/libreadline.so.8 (0xcd13fff6000)
        libomp.so => /usr/lib/libomp.so (0xcd13ee8b000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0xcd1401ed000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0xcd13fae9000)
        libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0xcd1405bf000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0xcd1415c0000)
        libutil.so.9 => /lib/libutil.so.9 (0xcd1419b3000)
        libopus.so.0 => /usr/local/lib/libopus.so.0 (0xcd141ac4000)
        libsamplerate.so.0 => /usr/local/lib/libsamplerate.so.0 (0xcd142ec8000)
        libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0xcd142a9b000)
        libtinfow.so.9 => /lib/libtinfow.so.9 (0xcd144e33000)
        libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0xcd143924000)
        libelf.so.2 => /lib/libelf.so.2 (0xcd13436c000)

It seems that libfluidsynth.so.3 and libjack.so.0 are the ones that 'pull in'
libc++.so.1. So either these should also be compiled against libstdc++, or
libcalf.so. should be linked against libc++. The latter is preferred, of
course.

-- 
You are receiving this mail because:
You are the assignee for the bug.