Skip to content

Errors linking a GNU/Linux version #7

@vanfanel

Description

@vanfanel

Hi there, @EXL

I have just discovered this Gish SDL2 port you have done, which I believe is the only SDL2 version available of the sources (correct me if I am wrong on this).

I have tried to build a GNU/Linux version (not Android, but plain GNU/Linux) using gish/src/main/cpp/CMakeLists.txt, and the game builds, but it fails during the final linking phase:

[ 98%] Linking C executable Gish
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/custom.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/custom.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/game.c.o:(.bss+0x0): multiple definition of `numofobjectrenders'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/game.c.o:(.bss+0x20): multiple definition of `objectrender'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x20): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/gametexture.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/gametexture.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/high.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/high.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/level.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/level.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/lighting.c.o:(.bss+0x0): multiple definition of `numofobjectrenders'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/lighting.c.o:(.bss+0x20): multiple definition of `objectrender'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x20): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/music.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/music.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/player.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/player.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/prerender.c.o:(.bss+0x0): multiple definition of `numofobjectrenders'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/prerender.c.o:(.bss+0x20): multiple definition of `objectrender'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x20): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/render.c.o:(.bss+0x0): multiple definition of `numofobjectrenders'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/render.c.o:(.bss+0x20): multiple definition of `objectrender'; CMakeFiles/Gish.dir/Gish/game/editor.c.o:(.bss+0x20): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/replay.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/game/replay.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/sdl/endian.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/sdl/endian.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/sdl/file.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/sdl/file.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/video/texture.c.o:(.bss+0x0): multiple definition of `fread2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/Gish.dir/Gish/video/texture.c.o:(.bss+0x8): multiple definition of `fwrite2'; CMakeFiles/Gish.dir/Gish/game/block.c.o:(.bss+0x8): first defined here
collect2: error: ld returned 1 exit status

So almost there, but not quite there! Do you have an idea on why is this happening? Seems like some simple omission, but I don't know what it could be. Any ideas?

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