Home > Back-end >  Link error dynamic library undefined reference to ` __init_array_start '
Link error dynamic library undefined reference to ` __init_array_start '

Time:09-19

1, the problem description:
Original compiled without problem, increase the dynamic link library - ltl_playermanager compiler error after
2, the makefile fragment:
Librender_audio_plugin: TARGET:=librender_audio_plugin. So
Librender_audio_plugin: $(OBJS - RENDER - AUDIO)
$(warning suh25ssssssssssssssssssssssssssssss $(LD) SSSSSSSSSSSSSSSSSSSSSSSSSS)
$$(LD) - o (TARGET) $(OBJS - RENDER - AUDIO) $(LDFLAGS) $(LIBS) - whole - archive - ltl_playermanager - O2 \
- lc $(LIBGCC);
$(RM) $(BINDIR) output/plugins/$(TARGET)
Install - m $777 (TARGET) $(BINDIR) output/plugins

3, compile error:
Makefile: 428: suh25ssssssssssssssssssssssssssssss/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld - Shared -fpic SSSSSSSSSSSSSSSSSSSSSSSSSS
/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld - Shared -fpic - o librender_audio_plugin. So component/render with alsa. O component/render/format. O component/render/chmixer. O component/render/iis_driver. O component/render/snd_driver. O - L../output/bin - L../output/lib, hash - style=gnu - l../../../../build/TMP/sysroots aud8516 - SLC/lib64 - l../../../../build/TMP/sysroots/aud8516 - SLC/usr/lib64 - lpthread - lm - LDL -- lmad -- lfaad ltremor - lflac - logg - LGPG - error - lgcrypt - lmedia - lasound - whole - archive - ltl_playermanager - O2 \
- lc/home/lixiangtao/kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 poky - Linux/../../../../aud8516 - SLC - tcbootstrap/usr/lib64/aarch64 - poky - Linux/6.2.0 libgcc. A;
/home/lixiangtao/kiwi_voice/build/TMP/sysroots/aud8516 - SLC/usr/lib64/libc_nonshared (elf - init. OS) : a function In ` __libc_csu_init ':
The/usr/SRC/debug/glibc 2.24 - r0/git/csu/elf - init. C: 86: undefined reference to ` __init_array_start '
/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld:/home/lixiangtao/kiwi_voice/build/TMP/sysroots/aud8516 - SLC/usr/lib64/libc_nonshared (elf - init. OS) : a relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol ` __init_array_start 'can not be, informs the when making a Shared object; Recompile with -fpic
The/usr/SRC/debug/glibc 2.24 - r0/git/csu/elf - init. C: 86: undefined reference to ` __init_array_start '
The/usr/SRC/debug/glibc 2.24 - r0/git/csu/elf - init. C: 86: undefined reference to ` __init_array_end '
/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld:/home/lixiangtao/kiwi_voice/build/TMP/sysroots/aud8516 - SLC/usr/lib64/libc_nonshared (elf - init. OS) : a relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol ` __init_array_end 'can not be, informs the when making a Shared object; Recompile with -fpic
The/usr/SRC/debug/glibc 2.24 - r0/git/csu/elf - init. C: 86: undefined reference to ` __init_array_end '
/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld: librender_audio_plugin. So: hidden symbol ` __init_array_end 'isn' t defined
/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld: final link failed: Bad value
Makefile: 428: the recipe for target 'librender_audio_plugin failed
Make [1] : * * * [librender_audio_plugin] Error 1
Make [1] : brigade directory '/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia'

The problem for several days, check it on the Internet links - lsupc++ - lstdc++ libraries, such as cannot solve,
O people,
Grateful!

CodePudding user response:

Do you have in this area look at c + +,

CodePudding user response:

Found that this is a not problem, because the compiler options to add - the whole - archive, there appears the question, cancel this option, the problem is not appear,
  • Related