libretro / libretro/blastem

Build errors on openSUSE Tumbleweed x86_64

Open
#13 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
77
Forks
38
Avg merge
36m
Merged PRs (30d)
6

Description

After openSUSE Tumbleweed recently rebuilt with gcc10, the build start to fail with ld errors:

[   28s] gcc -shared -o libblastem.so libblastem.o system.o genesis.o debug.o gdb_remote.o vdp.o io.o romdb.o hash.o xband.o realtec.o i2c.o nor.o sega_mapper.o multi_game.o megawifi.o net.o serialize.o terminal.o config.o tern.o util.o paths.o gst.o 68kinst.o m68k_core.o m68k_core_x86.o gen.o backend.o mem.o arena.o gen_x86.o backend_x86.o ym2612.o psg.o wave.o saves.o jcart.o rom.db.o sms.o z80inst.o z80_to_x86.o -O2 -flto -lm -m64
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: system.o (symbol from plugin): in function `safe_cmp':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: genesis.o (symbol from plugin): in function `MCLKS_PER_68K':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: debug.o (symbol from plugin): in function `find_breakpoint':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gdb_remote.o (symbol from plugin): in function `hex_32':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: vdp.o (symbol from plugin): in function `init_vdp_context':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: io.o (symbol from plugin): in function `io_port_gamepad_down':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: romdb.o (symbol from plugin): in function `eeprom_read_fun':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: xband.o (symbol from plugin): in function `xband_detect':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: realtec.o (symbol from plugin): in function `realtec_detect':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: i2c.o (symbol from plugin): in function `eeprom_init':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: nor.o (symbol from plugin): in function `nor_flash_init':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: sega_mapper.o (symbol from plugin): in function `read_sram_w':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: multi_game.o (symbol from plugin): in function `write_multi_game_b':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: megawifi.o (symbol from plugin): in function `megawifi_write_b':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: util.o (symbol from plugin): in function `alloc_concat':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gst.o (symbol from plugin): in function `read_le_32':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[   28s] (.text+0x0): multiple definition of `x86_modes'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[   28s] (.text+0x0): multiple definition of `x86_size'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[   28s] (.text+0x0): multiple definition of `x86_cc'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[   28s] (.text+0x0): multiple definition of `x86_regs'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[   28s] (.text+0x0): multiple definition of `x86_modes'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[   28s] (.text+0x0): multiple definition of `x86_size'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[   28s] (.text+0x0): multiple definition of `x86_cc'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[   28s] (.text+0x0): multiple definition of `x86_regs'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: ym2612.o (symbol from plugin): in function `ym_adjust_master_clock':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: psg.o (symbol from plugin): in function `psg_init':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: jcart.o (symbol from plugin): in function `jcart_write_w':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: sms.o (symbol from plugin): in function `debug_commands':
[   28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[   28s] (.text+0x0): multiple definition of `x86_modes'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[   28s] (.text+0x0): multiple definition of `x86_size'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[   28s] (.text+0x0): multiple definition of `x86_cc'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[   28s] (.text+0x0): multiple definition of `x86_regs'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[   33s] In function 'mw_putc',
[   33s]     inlined from 'start_reply' at megawifi.c:181:2:
[   33s] megawifi.c:94:42: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
[   33s]    94 |  mw->receive_buffer[mw->receive_bytes++] = v;
[   33s]       |                                          ^
[   33s] megawifi.c: In function 'start_reply':
[   33s] megawifi.c:70:11: note: at offset 4098 to object 'receive_buffer' with size 4096 declared here
[   33s]    70 |  uint8_t  receive_buffer[4096];
[   33s]       |           ^
[   37s] collect2: error: ld returned 1 exit status
[   37s] make[1]: *** [Makefile:270: libblastem.so] Error 1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the libblastem.so target from Makefile:270 on openSUSE Tumbleweed x86_64 with GCC 10 and inspect the listed object files for the duplicate vdp_regs and x86_* definitions. Also review the megawifi.c warning around receive_buffer. Done means the build completes without the linker errors and the reported compiler warning is understood or resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.