Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link fails: ld: error: undefined symbol: term_simplify, because visibility is set to "hidden" during compilation #1

Open
yurivict opened this issue Nov 9, 2024 · 0 comments

Comments

@yurivict
Copy link

yurivict commented Nov 9, 2024

===>  Building for zimpl-3.6.2
[100% 1/1] : && /usr/local/libexec/ccache/cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -fstack-protector-strong src/CMakeFiles/zimpl.dir/zimpl/zimpl.c.o src/CMakeFiles/zimpl.dir/zimpl/xlpglue.c.o src/CMakeFiles/zimpl.dir/zimpl/zlpglue.c.o src/CMakeFiles/zimpl.dir/zimpl/ratlpstore.c.o src/CMakeFiles/zimpl.dir/zimpl/ratlpfwrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratmpswrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratmstwrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratordwrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratqbowrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratpresolve.c.o -o bin/zimpl  -Wl,-rpath,/usr/ports/math/zimpl/work/.build/lib:/usr/local/lib:  lib/libzimpl.so  /usr/local/lib/libgmp.so  /usr/local/lib/libgmpxx.so  /usr/lib/libz.so  /usr/lib/libm.so && :
FAILED: bin/zimpl 
: && /usr/local/libexec/ccache/cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -fstack-protector-strong src/CMakeFiles/zimpl.dir/zimpl/zimpl.c.o src/CMakeFiles/zimpl.dir/zimpl/xlpglue.c.o src/CMakeFiles/zimpl.dir/zimpl/zlpglue.c.o src/CMakeFiles/zimpl.dir/zimpl/ratlpstore.c.o src/CMakeFiles/zimpl.dir/zimpl/ratlpfwrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratmpswrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratmstwrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratordwrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratqbowrite.c.o src/CMakeFiles/zimpl.dir/zimpl/ratpresolve.c.o -o bin/zimpl  -Wl,-rpath,/usr/ports/math/zimpl/work/.build/lib:/usr/local/lib:  lib/libzimpl.so  /usr/local/lib/libgmp.so  /usr/local/lib/libgmpxx.so  /usr/lib/libz.so  /usr/lib/libm.so && :
ld: error: undefined symbol: term_simplify
>>> referenced by xlpglue.c
>>>               src/CMakeFiles/zimpl.dir/zimpl/xlpglue.c.o:(xlp_addcon_term)
>>> referenced by ratlpfwrite.c
>>>               src/CMakeFiles/zimpl.dir/zimpl/ratlpfwrite.c.o:(write_term)
>>> referenced by ratqbowrite.c
>>>               src/CMakeFiles/zimpl.dir/zimpl/ratqbowrite.c.o:(qbo_write)
>>> referenced 1 more times

ld: error: undefined symbol: numb_get_mpq
>>> referenced by xlpglue.c
>>>               src/CMakeFiles/zimpl.dir/zimpl/xlpglue.c.o:(xlp_addcon_term)
>>> referenced by xlpglue.c
>>>               src/CMakeFiles/zimpl.dir/zimpl/xlpglue.c.o:(xlp_addcon_term)
>>> referenced by xlpglue.c
>>>               src/CMakeFiles/zimpl.dir/zimpl/xlpglue.c.o:(xlp_addcon_term)
>>> referenced 13 more times

Example of hidden visibility that leads to some of the errors:

[ 62% 67/97] /usr/local/libexec/ccache/cc -DVERSION=\"3.6.2\" -Dlibzimpl_EXPORTS -I/usr/ports/math/zimpl/work/zimpl-362/src -I/usr/ports/math/zimpl/work/zimpl-362/src/zimpl -I/usr/ports/math/zimpl/work/.build/src -I/usr/local/include -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -std=gnu99 -fPIC -fvisibility=hidden -MD -MT src/CMakeFiles/libzimpl.dir/zimpl/mshell.c.o -MF src/CMakeFiles/libzimpl.dir/zimpl/mshell.c.o.d -o src/CMakeFiles/libzimpl.dir/zimpl/mshell.c.o -c /usr/ports/math/zimpl/work/zimpl-362/src/zimpl/mshell.c

Version: 3.6.2
clang-18
FreeBSD 14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant