btop icon indicating copy to clipboard operation
btop copied to clipboard

[BUG] Build fails in Ubuntu 20.04 using gcc 13.2.0

Open codeapparat opened this issue 11 months ago • 4 comments

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 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

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):

  • btop++ version: 1.3.2 (from git)
  • Architecture: x86_64
  • Platform: Ubuntu 20.04
  • Linux Kernel: 5.8.0-63-generic

Thank you very much, for this amazing tool!

codeapparat avatar Mar 12 '24 10:03 codeapparat

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.

imwints avatar Mar 12 '24 11:03 imwints

@imwints Maybe getting four duplicates of the same issue means the use case is not as unusual as was initially thought?

alalazo avatar Mar 14 '24 05:03 alalazo