Skip to content

wander can't compile under modern gcc #20

Description

@spacehobo

If you run make on a stock Ubuntu LTS system these days, the output displays many warnings (not unusual for C of this vintage!) and then errors out with the following:

cc wand1.o wand2.o wandglb.o wandsys.o -o Wander
/usr/bin/ld: wand2.o:(.bss+0x0): multiple definition of `param'; wand1.o:(.bss+0x0): first defined here
/usr/bin/ld: wandglb.o:(.bss+0x0): multiple definition of `param'; wand1.o:(.bss+0x0): first defined here
/usr/bin/ld: wandsys.o:(.bss+0x0): multiple definition of `param'; wand1.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:25: Wander] Error 1

This is due to a change made way back in 2020 with GCC release 10, which changed the option defaults to include the effect of -fno-common. When I set CFLAGS=-fcommon beforehand, the build succeeds. I've packaged this behaviour up in PR #19 in the hopes that fewer future wanderers will be tripped up by this problem.

As mentioned in the PR, I'm one of the co-hosts of the Retro Adventurers podcast, and Tim Gilberts (of The Quill fame) pointed out this workaround in our most recent episode on Aldebaran III.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions