Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jul 2020 22:13:34 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 248230] [regression] Compiled C++ program fails to run with the Undefined symbol error
Message-ID:  <bug-248230-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248230

            Bug ID: 248230
           Summary: [regression] Compiled C++ program fails to run with
                    the Undefined symbol error
           Product: Base System
           Version: 12.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: vedran@miletic.net

I'm running

% uname -a
FreeBSD bsd-testing 12.1-STABLE FreeBSD 12.1-STABLE r363428 GENERIC  amd64

and

% clang++ --version=20
FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git
llvmorg-10.0.0-0-gd32170dbd5b)
Target: x86_64-unknown-freebsd12.1
Thread model: posix
InstalledDir: /usr/bin

I'm developing RxDock [1] and FreeBSD is one of our two primary target
platforms [2], other being Linux. I recently did some refactoring (commit
6d99131ef712a27d6637564de75b2b59bbc23619 in [3]) and tests now fail with:

The output from the failed tests:

1/5 rbcavity-1koc      FAIL           0.01s (exit status 1)

--- command ---
22:09:55 RBT_HOME=3D'/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME'
RBT_ROOT=3D'/usr/home/vedranm/workspace/rxdock'
/usr/home/vedranm/workspace/rxdock/builddir/rbcavity -r
/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME/1koc.prm -W
--- stderr ---
ld-elf.so.1: /usr/home/vedranm/workspace/rxdock/builddir/rbcavity: Undefined
symbol
"_ZN6rxdock14PrintStdHeaderERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEE=
ERKNS0_12basic_stringIcS3_NS0_9allocatorIcEEEE"
-------

2/5 rbcavity-1yet      FAIL           0.01s (exit status 1)

--- command ---
22:09:55 RBT_HOME=3D'/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME'
RBT_ROOT=3D'/usr/home/vedranm/workspace/rxdock'
/usr/home/vedranm/workspace/rxdock/builddir/rbcavity -r
/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME/1YET.prm -W
--- stderr ---
ld-elf.so.1: /usr/home/vedranm/workspace/rxdock/builddir/rbcavity: Undefined
symbol
"_ZN6rxdock14PrintStdHeaderERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEE=
ERKNS0_12basic_stringIcS3_NS0_9allocatorIcEEEE"
-------

3/5 rbcavity-1yet-test FAIL           0.01s (exit status 1)

--- command ---
22:09:55 RBT_HOME=3D'/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME'
RBT_ROOT=3D'/usr/home/vedranm/workspace/rxdock'
/usr/home/vedranm/workspace/rxdock/builddir/rbcavity -r
/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME/1YET_test.prm -W
--- stderr ---
ld-elf.so.1: /usr/home/vedranm/workspace/rxdock/builddir/rbcavity: Undefined
symbol
"_ZN6rxdock14PrintStdHeaderERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEE=
ERKNS0_12basic_stringIcS3_NS0_9allocatorIcEEEE"
-------

4/5 unit-test          FAIL           0.01s (exit status 1)

--- command ---
22:09:55 RBT_HOME=3D'/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME'
RBT_ROOT=3D'/usr/home/vedranm/workspace/rxdock'
/usr/home/vedranm/workspace/rxdock/builddir/unit-test
--- stderr ---
ld-elf.so.1: Undefined symbol "_ZTVN6rxdock18RbtFlexAtomFactoryE" referenced
from COPY relocation in /usr/home/vedranm/workspace/rxdock/builddir/unit-te=
st
-------

5/5 rbdock-1yet-test   FAIL           0.01s (exit status 1)

--- command ---
22:09:55 RBT_HOME=3D'/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME'
RBT_ROOT=3D'/usr/home/vedranm/workspace/rxdock'
/usr/home/vedranm/workspace/rxdock/builddir/rbdock -r
/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME/1YET_test.prm -i
/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME/1YET_c.sd -p dock.pr=
m -n
1 -s 48151623 -o
/usr/home/vedranm/workspace/rxdock/build/test/RBT_HOME/1YET_test_out
--- stderr ---
ld-elf.so.1: /usr/home/vedranm/workspace/rxdock/builddir/rbdock: Undefined
symbol
"_ZN6rxdock14PrintStdHeaderERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEE=
ERKNS0_12basic_stringIcS3_NS0_9allocatorIcEEEE"
-------

Full log written to
/usr/home/vedranm/workspace/rxdock/builddir/meson-logs/testlog.txt
FAILED: meson-test=20
/usr/local/bin/meson test --no-rebuild --print-errorlogs
ninja: build stopped: subcommand failed.

However, tests works fine on FreeBSD 11.4 with Clang 10 and 12.1 with Clang=
 8
(and also on Linux).

If I revert that commit, the tests work fine on 12.1-STABLE as well. I trie=
d to
come up with a more minimal example, but I couldn't figure out what exactly
makes it break.

[1] https://www.rxdock.org/
[2]
https://www.rxdock.org/documentation/devel/html/developer-guide/target-plat=
forms.html
[3] https://bitbucket.org/rxdock/rxdock

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248230-227>