Skip to content

Fix compilation under GCC 10+#25

Open
h3xx wants to merge 1 commit into
iCatButler:masterfrom
h3xx:fix-gcc10
Open

Fix compilation under GCC 10+#25
h3xx wants to merge 1 commit into
iCatButler:masterfrom
h3xx:fix-gcc10

Conversation

@h3xx

@h3xx h3xx commented Aug 27, 2021

Copy link
Copy Markdown

Fixes an error during linking. E.g.:

Error log snippet
cd /usr/src/git/pcsxr/_build/plugins/dfnet && /usr/bin/cmake -E cmake_link_script CMakeFiles/DFNet.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -O3 -DNDEBUG -s -shared  -o libDFNet.so CMakeFiles/DFNet.dir/cfg.c.o CMakeFiles/DFNet.dir/dfnet.c.o CMakeFiles/DFNet.dir/unix.c.o
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x0): multiple definition of `wset'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x80): multiple definition of `rset'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x80): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x120): multiple definition of `conf'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x120): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x104): multiple definition of `PadSize'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x104): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x106): multiple definition of `PadRecvSize'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x106): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x107): multiple definition of `PadSendSize'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x107): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x110): multiple definition of `PadSendData'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x110): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x100): multiple definition of `WaitCancel'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x100): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/dfnet.c.o:(.bss+0x108): multiple definition of `PadRecvData'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x108): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x120): multiple definition of `WaitCancel'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x100): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x140): multiple definition of `conf'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x120): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x20): multiple definition of `wset'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0xa0): multiple definition of `rset'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x80): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x124): multiple definition of `PadSize'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x104): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x126): multiple definition of `PadRecvSize'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x106): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x127): multiple definition of `PadSendSize'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x107): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x128): multiple definition of `PadRecvData'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x108): first defined here
/usr/bin/ld: CMakeFiles/DFNet.dir/unix.c.o:(.bss+0x130): multiple definition of `PadSendData'; CMakeFiles/DFNet.dir/cfg.c.o:(.bss+0x110): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/dfnet/CMakeFiles/DFNet.dir/build.make:132: plugins/dfnet/libDFNet.so] Error 1
make[2]: Leaving directory '/usr/src/git/pcsxr/_build'
make[1]: *** [CMakeFiles/Makefile2:726: plugins/dfnet/CMakeFiles/DFNet.dir/all] Error 2
make[1]: Leaving directory '/usr/src/git/pcsxr/_build'
make: *** [Makefile:139: all] Error 2
make: Leaving directory '/usr/src/git/pcsxr/_build'

Reason for WIP: I still want to test this on my local machine. Good to go.

@h3xx h3xx marked this pull request as ready for review October 31, 2022 17:01
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