We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Can't compile btop under Ubuntu 20.04, using g++ 13.2.0, it fails at linking time. When typing make I get:
make
PLATFORM ?| Linux ARCH ?| x86_64 GPU_SUPPORT :| true CXX ?| /opt/gcc-13.2.0/bin/g++ (13.2.0) THREADS :| 6 REQFLAGS !| -std=c++20 WARNFLAGS :| -Wall -Wextra -pedantic OPTFLAGS :| -O2 -ftree-vectorize -flto=6 LDCXXFLAGS :| -pthread -DFMT_HEADER_ONLY -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 -fexceptions -fstack-clash-protection -fcf-protection -fstack-protector -DGPU_SUPPORT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 CXXFLAGS +| $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) LDFLAGS +| $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
Building btop++ (v1.3.2) Linux x86_64 Command 'lowdown' not found: skipping generating man page btop.1 ... Configuring obj/config.h Compiling src/btop.cpp Compiling src/btop_menu.cpp Compiling src/btop_input.cpp Compiling src/btop_shared.cpp Compiling src/btop_draw.cpp ... Linking and optimizing binary... /usr/bin/ld: /tmp/ccj2IUfF.ltrans17.ltrans.o: in function Shared::init()': <artificial>:(.text+0x5cf7): undefined reference to dlopen' /usr/bin/ld: :(.text+0x5d12): undefined reference to dlopen' /usr/bin/ld: <artificial>:(.text+0x611b): undefined reference to dlerror' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function Gpu::Rsmi::init()::{lambda(char const*)#1}::operator()(char const*) const [clone .isra.0]': <artificial>:(.text+0x19): undefined reference to dlsym' /usr/bin/ld: :(.text+0x21): undefined reference to dlerror' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function Gpu::Nvml::init()::{lambda(char const*)#1}::operator()(char const*) const [clone .isra.0]': :(.text+0x4a4d): undefined reference to dlsym' /usr/bin/ld: <artificial>:(.text+0x4a55): undefined reference to dlerror' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function Gpu::Rsmi::init() [clone .isra.0]': <artificial>:(.text+0x4c50): undefined reference to dlopen' /usr/bin/ld: :(.text+0x4c6a): undefined reference to dlerror' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function Gpu::Nvml::shutdown() [clone .isra.0]': :(.text+0x4974): undefined reference to dlclose' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function Gpu::Rsmi::shutdown() [clone .isra.0]': :(.text+0x4bcc): undefined reference to `dlclose' collect2: error: ld returned 1 exit status make: *** [Makefile:383: btop] Error 1
Shared::init()': <artificial>:(.text+0x5cf7): undefined reference to
dlopen' /usr/bin/ld: <artificial>:(.text+0x611b): undefined reference to
Gpu::Rsmi::init()::{lambda(char const*)#1}::operator()(char const*) const [clone .isra.0]': <artificial>:(.text+0x19): undefined reference to
dlerror' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function
dlsym' /usr/bin/ld: <artificial>:(.text+0x4a55): undefined reference to
Gpu::Rsmi::init() [clone .isra.0]': <artificial>:(.text+0x4c50): undefined reference to
dlclose' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function
To Reproduce Ubuntu 20.04, compile gcc 13.2.0 and set CXX to the new g++ binary.
git clone https://github.com/aristocratos/btop.git cd btop make CXX=/opt/gcc-13.2.0/bin/g++
git clone https://github.com/aristocratos/btop.git
cd btop
make CXX=/opt/gcc-13.2.0/bin/g++
Expected behavior btop binary gets created after make
Info (please complete the following information):
Thank you very much, for this amazing tool!
The text was updated successfully, but these errors were encountered:
Read the README.md and search for similar issues before posting a bug report!
Duplicate of #704 #725 #730
Please upgrade to a newer version of your distro.
Sorry, something went wrong.
@imwints Maybe getting four duplicates of the same issue means the use case is not as unusual as was initially thought?
For reference, I solved this issue by adding the line: target_link_libraries(btop dl) To the linking section towards the end of CMakeLists.txt
target_link_libraries(btop dl)
@arubin See #725 😉
aristocratos
No branches or pull requests
Describe the bug
Can't compile btop under Ubuntu 20.04, using g++ 13.2.0,
it fails at linking time. When typing
make
I get:PLATFORM ?| Linux$(REQFLAGS) $ (LDCXXFLAGS) $(OPTFLAGS) $ (WARNFLAGS)$(LDCXXFLAGS) $ (OPTFLAGS) $(WARNFLAGS)
ARCH ?| x86_64
GPU_SUPPORT :| true
CXX ?| /opt/gcc-13.2.0/bin/g++ (13.2.0)
THREADS :| 6
REQFLAGS !| -std=c++20
WARNFLAGS :| -Wall -Wextra -pedantic
OPTFLAGS :| -O2 -ftree-vectorize -flto=6
LDCXXFLAGS :| -pthread -DFMT_HEADER_ONLY -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 -fexceptions -fstack-clash-protection -fcf-protection -fstack-protector -DGPU_SUPPORT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
CXXFLAGS +|
LDFLAGS +|
Building btop++ (v1.3.2) Linux x86_64
Command 'lowdown' not found: skipping generating man page btop.1
...
Configuring obj/config.h
Compiling src/btop.cpp
Compiling src/btop_menu.cpp
Compiling src/btop_input.cpp
Compiling src/btop_shared.cpp
Compiling src/btop_draw.cpp
...
Linking and optimizing binary...
/usr/bin/ld: /tmp/ccj2IUfF.ltrans17.ltrans.o: in function
Shared::init()': <artificial>:(.text+0x5cf7): undefined reference to
dlopen'/usr/bin/ld: :(.text+0x5d12): undefined reference to
dlopen' /usr/bin/ld: <artificial>:(.text+0x611b): undefined reference to
dlerror'/usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function
Gpu::Rsmi::init()::{lambda(char const*)#1}::operator()(char const*) const [clone .isra.0]': <artificial>:(.text+0x19): undefined reference to
dlsym'/usr/bin/ld: :(.text+0x21): undefined reference to
dlerror' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function
Gpu::Nvml::init()::{lambda(char const*)#1}::operator()(char const*) const [clone .isra.0]'::(.text+0x4a4d): undefined reference to
dlsym' /usr/bin/ld: <artificial>:(.text+0x4a55): undefined reference to
dlerror'/usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function
Gpu::Rsmi::init() [clone .isra.0]': <artificial>:(.text+0x4c50): undefined reference to
dlopen'/usr/bin/ld: :(.text+0x4c6a): undefined reference to
dlerror' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function
Gpu::Nvml::shutdown() [clone .isra.0]'::(.text+0x4974): undefined reference to
dlclose' /usr/bin/ld: /tmp/ccj2IUfF.ltrans23.ltrans.o: in function
Gpu::Rsmi::shutdown() [clone .isra.0]'::(.text+0x4bcc): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [Makefile:383: btop] Error 1
To Reproduce
Ubuntu 20.04, compile gcc 13.2.0 and set CXX to the new g++ binary.
git clone https://github.com/aristocratos/btop.git
cd btop
make CXX=/opt/gcc-13.2.0/bin/g++
Expected behavior
btop binary gets created after
make
Info (please complete the following information):
Thank you very much, for this amazing tool!
The text was updated successfully, but these errors were encountered: