- changed status to resolved
UniPCEmu won't build with GCC 10 due to multiple definition linker errors
/usr/bin/ld: ../../projects_build/UniPCemu/linux/basicio/io.o:/home/bruh/code/unipcemu/UniPCemu/basicio/io.c:31: multiple definition of `diskpath'; ../../projects_buil
d/UniPCemu/linux/basicio/dynamicimage.o:/home/bruh/code/unipcemu/UniPCemu/basicio/dynamicimage.c:738: first defined here
/usr/bin/ld: ../../projects_build/UniPCemu/linux/cpu/cpu_jmptbls0f.o:/home/bruh/code/unipcemu/UniPCemu/cpu/cpu_jmptbls0f.c:1691: multiple definition of `CurrentCPU_opc
ode_jmptbl'; ../../projects_build/UniPCemu/linux/cpu/cpu_jmptbls.o:/home/bruh/code/unipcemu/UniPCemu/cpu/cpu_jmptbls.c:2275: first defined here
/usr/bin/ld: ../../projects_build/UniPCemu/linux/emu/debugger/debugger.o:/home/bruh/code/unipcemu/UniPCemu/emu/debugger/debugger.c:63: multiple definition of `allow_de
buggerstep'; ../../projects_build/UniPCemu/linux/emu/core/emu_bios_post.o:/home/bruh/code/unipcemu/UniPCemu/emu/core/emu_bios_post.c:87: first defined here
/usr/bin/ld: ../../projects_build/UniPCemu/linux/hardware/pic.o:/home/bruh/code/unipcemu/UniPCemu/hardware/pic.c:1547: multiple definition of `i440fx_ioapic_base_mask'
; ../../projects_build/UniPCemu/linux/hardware/i430fx.o:/home/bruh/code/unipcemu/UniPCemu/hardware/i430fx.c:378: first defined here
/usr/bin/ld: ../../projects_build/UniPCemu/linux/hardware/pic.o:/home/bruh/code/unipcemu/UniPCemu/hardware/pic.c:1548: multiple definition of `i440fx_ioapic_base_match
'; ../../projects_build/UniPCemu/linux/hardware/i430fx.o:/home/bruh/code/unipcemu/UniPCemu/hardware/i430fx.c:379: first defined here
/usr/bin/ld: ../../projects_build/UniPCemu/linux/mmu/mmuhandler.o:/home/bruh/code/unipcemu/UniPCemu/mmu/mmuhandler.c:72: multiple definition of `enableMMUbuffer'; ../.
./projects_build/UniPCemu/linux/cpu/multitasking.o:/home/bruh/code/unipcemu/UniPCemu/cpu/multitasking.c:306: first defined here
Comments (10)
-
repo owner -
repo owner Just fixed them by marking the appropriate definitions as extern. Also cleaned up two extern definitions that aren’t used anymore.
It should be able to compile now. Can you check?
-
repo owner - changed status to open
Awaiting confirmation of bugfix.
-
repo owner Just validated the fixes myself using Ubuntu 18 with the gcc/g++ 10 installed as an alternative.
I noticed that the new compiler gives a lot of
format-truncation
warnings. Simply adding the lineCFLAGS := $(CFLAGS) -Wno-format-truncation
Below
# Generic requirements!
in commonemuframework/Makefile.linux, to suppress said warnings temporarily, removes said messages from the compiler warnings. Then it reports no more warnings.So the code is compiling fine on Ubuntu 18 w/ gcc 10.
Is it compiling without any other warnings on your end as well?
-
reporter Yes, it’s working fine now. BTW, can you open up pull requests for this project please? I’d like to potentially contribute, but Bitbucket won’t allow me to fork the project so I can submit a pull request
-
repo owner Forking should be allowed, according to the manuals of bitbucket, because it’s a public repository and not private?
-
repo owner Is forking and/or pull requests working now at your end?
-
repo owner - changed status to new
-
repo owner I’ve checked the pull requests feature and it’s working properly now. It’s exactly as the BitBucket documentation says, although the pull request needs to be createn on the copy of the repository (the source) instead of on this repository (the destination), which isn’t mentioned in the documentation as far as I can see.
Can you try again to fork and/or pull request?
-
repo owner - changed status to resolved
For now I'll assume this issue as solved. Feel free to open a different issue if needed.
- Log in to comment
#6multiple definitions of global variables due to missing extern keywords.→ <<cset ba24a5fc591b>>