tidalcycles / Dirt

Experimental sample playback
GNU General Public License v3.0
85 stars 24 forks source link

dirt: fix build for gcc-10 (fno-common) #65

Closed trofi closed 2 years ago

trofi commented 2 years ago

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

As a result build fails as:

ld: audio.o:/home/slyfox/dev/git/Dirt/audio.h:55: multiple definition of
  `delays'; dirt.o:/home/slyfox/dev/git/Dirt/audio.h:55: first defined here
ld: audio.o:/home/slyfox/dev/git/Dirt/audio.h:56: multiple definition of
  `line_feedback_delay'; dirt.o:/home/slyfox/dev/git/Dirt/audio.h:56: first defined here
ld: server.o:/home/slyfox/dev/git/Dirt/audio.h:56: multiple definition of
  `line_feedback_delay'; dirt.o:/home/slyfox/dev/git/Dirt/audio.h:56: first defined here
ld: server.o:/home/slyfox/dev/git/Dirt/audio.h:55: multiple definition of
  `delays'; dirt.o:/home/slyfox/dev/git/Dirt/audio.h:55: first defined here

The change moves globals definitions from .h files to .c files.

yaxu commented 2 years ago

Thanks! I'm curious what you're using classic dirt for?

trofi commented 2 years ago

I'm afraid I don't use it myself. I only noticed dirt build failure when was working on moving NixOS to gcc-10 and was fixing various packages that fail to build: https://github.com/NixOS/nixpkgs/pull/110571#issuecomment-1119343199

yaxu commented 2 years ago

Aha, thanks for your work !