Linking error on GCC 10.2

Issue #145 resolved
Former user created an issue

The application is not built on Linux with the GCC 10.2 compiler. The error is related to multiple function definitions. As far as I understand, I need to pass line "-Wl,--allow-multiple-definition" to the compiler as a parameter, but I don't know where to put it in your build system.

g++ -Wl,-O3,--gc-sections,--relax -o ../../bin/linux/release/zxtune123 ../../obj/linux/release/zxtune123/information.cpp.o ../../obj/linux/release/zxtune123/sound.cpp.o ../../obj/linux/release/zxtune123/source.cpp.o ../../obj/linux/release/zxtune123/display.cpp.o ../../obj/linux/release/zxtune123/cli_app.cpp.o ../../obj/linux/release/zxtune123/config.cpp.o ../../obj/linux/release/zxtune123/console_linux.cpp.o ../../obj/linux/release/zxtune123/text.cpp.o -L../../lib/linux/release -Wl,'-(' -lboost_filesystem -lboost_program_options -lboost_system -lanalysis -lasync -lbinary -lbinary_compression -lbinary_format -lcore -lcore_plugins_players -lcore_plugins_archives -ldebug -ldevices_aym -ldevices_beeper -ldevices_dac -ldevices_aym_dumper -ldevices_fm -ldevices_saa -ldevices_z80 -lformats_archived -lformats_archived_multitrack -lformats_chiptune -lformats_packed -lformats_multitrack -lio -ll10n_stub -lmodule -lmodule_conversion -lmodule_players -lmodule_properties -lparameters -lplatform -lplatform_application -lplatform_version -lsound -lsound_backends -lstrings -ltools -lasap -lffmpeg -lFLAC -lgme -lhe -lht -lhvl -llazyusf2 -llhasa -llzma -lmgba -lsidplayfp -lsnesspc -lunrar -lv2m -lvio2sf -lxmp -lz80ex -lz -Wl,'-)' -Wl,'-(' -ldl -lpthread -lrt -lstdc++ -Wl,'-)' /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:33: multiple definition of panning_right'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:33: first defined here /usr/bin/ld: disabling relaxation; it will not work with multiple definitions /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:33: multiple definition ofpanning_left'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:33: first defined here /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:30: multiple definition of filter_thing'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:30: first defined here /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:21: multiple definition oflentab'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:21: first defined here /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:32: multiple definition of waves'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:32: first defined here /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:28: multiple definition ofstereopan_right'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:28: first defined here /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:27: multiple definition of stereopan_left'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:27: first defined here /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:25: multiple definition ofperiod_tab'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:25: first defined here /usr/bin/ld: ../../lib/linux/release/libhvl.a(hvl_tables.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:23: multiple definition of `vib_tab'; ../../lib/linux/release/libhvl.a(hvl_replay.c.o):zxtune123/src/zxtune-r4891/3rdparty/hvl/hvl_tables.h:23: first defined here

Comments (4)

  1. Борис Тимофеев

    Теперь выдает такую ошибку при компиляции:

    Это Archlinux и GCC 10.2

  2. Log in to comment