Skip to content

Fix build on modern Linux (GCC 10+, ALSA/OSS)#1

Open
Cormoran96 wants to merge 3 commits into
jd-code:masterfrom
Cormoran96:fix/modern-gcc-build
Open

Fix build on modern Linux (GCC 10+, ALSA/OSS)#1
Cormoran96 wants to merge 3 commits into
jd-code:masterfrom
Cormoran96:fix/modern-gcc-build

Conversation

@Cormoran96
Copy link
Copy Markdown

Changes

1. Sync source to latest v1.4 snapshot
Several source files had local fixes and additions that were never pushed to
the repository (controls.c/h, groovit.c/h, grpattern.c, grsequence.c,
menu_board.c, readsample.c, settings.c).

2. Fix build with GCC 10+
GCC 10 changed the default from -fcommon to -fno-common. This project
defines globals in headers included by multiple translation units, which now
causes "multiple definition" linker errors. Adding -fcommon to CC_OPTIONS
restores the previous behaviour.

3. Add README
Documents how to build and run on a modern Debian/Ubuntu system:

sudo apt install build-essential libncurses-dev oss-compat alsa-oss
sudo modprobe snd-pcm-oss
make fastconfig && make
aoss ./groovit myfile.grov

Tested on

  • Linux 6.17, GCC 13, Debian/Ubuntu

Sync all source files from the latest distributed archive (v1.4),
which includes fixes and additions not yet pushed to the repository.
GCC 10 changed the default from -fcommon to -fno-common, causing
linker errors for tentative variable definitions in headers included
by multiple translation units. Adding -fcommon restores the previous
behaviour and allows the project to build on modern toolchains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant