hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.85k stars 580 forks source link

compiling htop with gcc-10 fails #986

Open nonamedotc opened 4 years ago

nonamedotc commented 4 years ago

gcc-10 will be available in Fedora 32. Compiling htop using gcc-10 fails with the following messages

/usr/bin/ld: ClockMeter.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:159: multiple definition of `backtraceArray'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:159: first defined here
/usr/bin/ld: ClockMeter.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:153: multiple definition of `CRT_termType'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:153: first defined here
/usr/bin/ld: ClockMeter.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: multiple definition of `CRT_colors'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: first defined here
/usr/bin/ld: ColorsPanel.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: multiple definition of `CRT_colors'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: first defined here
/usr/bin/ld: ColorsPanel.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:159: multiple definition of `backtraceArray'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:159: first defined here
/usr/bin/ld: ColorsPanel.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:153: multiple definition of `CRT_termType'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:153: first defined here
/usr/bin/ld: ColumnsPanel.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: multiple definition of `CRT_colors'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: first defined here
/usr/bin/ld: ColumnsPanel.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:159: multiple definition of `backtraceArray'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:159: first defined here
/usr/bin/ld: ColumnsPanel.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:153: multiple definition of `CRT_termType'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:153: first defined here
/usr/bin/ld: CPUMeter.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: multiple definition of `CRT_colors'; CheckItem.o:/builddir/build/BUILD/htop-2.2.0/CRT.h:143: first defined here

Full build log here - https://kojipkgs.fedoraproject.org//work/tasks/9379/41319379/build.log

How can I address this? Thanks.

uno20001 commented 4 years ago

There is a pull request (#981) that addresses the issue.

nonamedotc commented 4 years ago

@uno20001 Thanks! I can confirm that this works.