Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

htop: fix build failure against gcc-10 #982

Closed
wants to merge 1 commit into from
Closed

htop: fix build failure against gcc-10 #982

wants to merge 1 commit into from

Conversation

trofi
Copy link

@trofi trofi commented Jan 25, 2020

On gcc-10 (and gcc-9 -fno-common) build fails as:

gcc -pedantic ... -o htop ...
ld: ClockMeter.o:/home/slyfox/dev/git/htop/CRT.h:159:
  multiple definition of `backtraceArray'; CheckItem.o:htop/CRT.h:159: first defined here
ld: ClockMeter.o:/home/slyfox/dev/git/htop/CRT.h:153:
  multiple definition of `CRT_termType'; CheckItem.o:htop/CRT.h:153: first defined here

gcc-10 will change the default from -fcommon to fno-common:
https://gcc.gnu.org/PR85678.

The error also happens if CFLAGS=-fno-common passed explicitly.

Reported-by: Toralf Förster
Bug: https://bugs.gentoo.org/706358

On gcc-10 (and gcc-9 -fno-common) build fails as:

```
gcc -pedantic ... -o htop ...
ld: ClockMeter.o:/home/slyfox/dev/git/htop/CRT.h:159:
  multiple definition of `backtraceArray'; CheckItem.o:htop/CRT.h:159: first defined here
ld: ClockMeter.o:/home/slyfox/dev/git/htop/CRT.h:153:
  multiple definition of `CRT_termType'; CheckItem.o:htop/CRT.h:153: first defined here
```

gcc-10 will change the default from -fcommon to fno-common:
https://gcc.gnu.org/PR85678.

The error also happens if CFLAGS=-fno-common passed explicitly.

Reported-by: Toralf Förster
Bug: https://bugs.gentoo.org/706358
Signed-off-by: Sergei Trofimovich <[email protected]>
@SuperSandro2000
Copy link

Dupe of #981

@trofi trofi closed this Jan 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants