Skip to content

ninvaders: fix multiple definition build issue with gcc 10+ #214046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025

Conversation

chenrui333
Copy link
Member

ninvaders: fix multiple definition build issue with gcc 10+

gcc-11  -o nInvaders globals.o view.o aliens.o ufo.o player.o nInvaders.o -lncurses
  /usr/bin/ld: ufo.o:(.bss+0x28): multiple definition of `skill_level'; aliens.o:(.bss+0x67c): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x2c): multiple definition of `level'; aliens.o:(.bss+0x678): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x30): multiple definition of `weite'; aliens.o:(.bss+0x684): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x38): multiple definition of `bunker'; aliens.o:(.bss+0x138): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x548): multiple definition of `alienBlock'; aliens.o:(.bss+0x18): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x610): multiple definition of `alienshotnum'; aliens.o:(.bss+0x130): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x618): multiple definition of `alienshoty'; aliens.o:(.bss+0x108): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x640): multiple definition of `alienshotx'; aliens.o:(.bss+0xe0): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x668): multiple definition of `lowest_ship'; aliens.o:(.bss+0x650): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x6[90](https://github.com/Homebrew/homebrew-core/actions/runs/13994819068/job/39187279029#step:5:91)): multiple definition of `shipnum'; aliens.o:(.bss+0x648): first defined here
  /usr/bin/ld: ufo.o:(.bss+0x10): multiple definition of `aliens'; aliens.o:(.bss+0x0): first defined here
  /usr/bin/ld: player.o:(.bss+0x34): multiple definition of `skill_level'; aliens.o:(.bss+0x67c): first defined here
  /usr/bin/ld: player.o:(.bss+0x38): multiple definition of `level'; aliens.o:(.bss+0x678): first defined here
  /usr/bin/ld: player.o:(.bss+0x3c): multiple definition of `weite'; aliens.o:(.bss+0x684): first defined here
  /usr/bin/ld: player.o:(.bss+0x40): multiple definition of `ufo'; ufo.o:(.bss+0x0): first defined here
  /usr/bin/ld: player.o:(.bss+0x48): multiple definition of `bunker'; aliens.o:(.bss+0x138): first defined here
  /usr/bin/ld: player.o:(.bss+0x558): multiple definition of `alienBlock'; aliens.o:(.bss+0x18): first defined here
  /usr/bin/ld: player.o:(.bss+0x620): multiple definition of `alienshotnum'; aliens.o:(.bss+0x130): first defined here
  /usr/bin/ld: player.o:(.bss+0x628): multiple definition of `alienshoty'; aliens.o:(.bss+0x108): first defined here
  /usr/bin/ld: player.o:(.bss+0x650): multiple definition of `alienshotx'; aliens.o:(.bss+0xe0): first defined here
  /usr/bin/ld: player.o:(.bss+0x678): multiple definition of `lowest_ship'; aliens.o:(.bss+0x650): first defined here
  /usr/bin/ld: player.o:(.bss+0x30): multiple definition of `shipnum'; aliens.o:(.bss+0x648): first defined here
  /usr/bin/ld: player.o:(.bss+0x18): multiple definition of `aliens'; aliens.o:(.bss+0x0): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x40): multiple definition of `ufo'; ufo.o:(.bss+0x0): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x48): multiple definition of `bunker'; aliens.o:(.bss+0x138): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x558): multiple definition of `alienBlock'; aliens.o:(.bss+0x18): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x620): multiple definition of `alienshotnum'; aliens.o:(.bss+0x130): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x628): multiple definition of `alienshoty'; aliens.o:(.bss+0x[108](https://github.com/Homebrew/homebrew-core/actions/runs/13994819068/job/39187279029#step:5:109)): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x650): multiple definition of `alienshotx'; aliens.o:(.bss+0xe0): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x678): multiple definition of `lowest_ship'; aliens.o:(.bss+0x650): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x2c): multiple definition of `shipnum'; aliens.o:(.bss+0x648): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x6a0): multiple definition of `aliens'; aliens.o:(.bss+0x0): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x28): multiple definition of `skill_level'; aliens.o:(.bss+0x67c): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x4): multiple definition of `level'; aliens.o:(.bss+0x678): first defined here
  /usr/bin/ld: nInvaders.o:(.bss+0x30): multiple definition of `weite'; aliens.o:(.bss+0x684): first defined here

@chenrui333 chenrui333 added the CI-no-bottles Merge without publishing bottles label Mar 21, 2025
@chenrui333 chenrui333 force-pushed the ninvaders-linux-arm branch from fa10b03 to e3fdef0 Compare March 22, 2025 05:56
@chenrui333 chenrui333 force-pushed the ninvaders-linux-arm branch from e3fdef0 to 95b1a23 Compare March 22, 2025 14:24
@chenrui333 chenrui333 added the ready to merge PR can be merged once CI is green label Mar 22, 2025
@BrewTestBot BrewTestBot added this pull request to the merge queue Mar 22, 2025
Merged via the queue into master with commit 60398ab Mar 22, 2025
21 checks passed
@BrewTestBot BrewTestBot deleted the ninvaders-linux-arm branch March 22, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-no-bottles Merge without publishing bottles linux-arm-bottling ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants