[yocto] [Yocot] : undefined reference to `__init_array_start' error.

BHARATH RAJ kernelraj at gmail.com
Fri Sep 9 00:15:10 PDT 2016


I am now trying to build one recipe on Yocto 2.0 based environent.

Howerver, I am seeng following error.I wonder if this is a known
problem and you already have workaround?


It says undefined reference to `__init_array_start'.



This error did not happen with Yocto 1.8 based build, So, it can be
toolchain issue


| aarch64-poky-linux-libtool: link: aarch64-poky-linux-g++
--sysroot=/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroot/xxxxx
 -fPIC -DPIC -shared -nostdlib
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxx/usr/lib64/Scrt1.o
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxx/usr/lib64/crti.o
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxx/usr/lib64/aarch64-poky-linux/5.2.0/crtbeginS.o
 .libs/libbinder_la-AppOpsManager.o .libs/libbinder_la-Binder.o
.libs/libbinder_la-BpBinder.o .libs/libbinder_la-BufferedTextOutput.o
.libs/libbinder_la-Debug.o .libs/libbinder_la-IAppOpsCallback.o
.libs/libbinder_la-IAppOpsService.o .libs/libbinder_la-IBatteryStats.o
.libs/libbinder_la-IInterface.o .libs/libbinder_la-IMemory.o
.libs/libbinder_la-IPCThreadState.o
.libs/libbinder_la-IPermissionController.o
.libs/libbinder_la-IProcessInfoService.o
.libs/libbinder_la-ProcessInfoService.o
.libs/libbinder_la-IServiceManager.o .libs/libbinder_la-MemoryDealer.o
.libs/libbinder_la-MemoryBase.o .libs/libbinder_la-MemoryHeapBase.o
.libs/libbinder_la-Parcel.o .libs/libbinder_la-PermissionCache.o
.libs/libbinder_la-ProcessState.o .libs/libbinder_la-Static.o
.libs/libbinder_la-TextOutput.o
-L/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroot/xxxxxx/usr/lib64
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxx/usr/lib64/libcutils.so
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroot/xxxxxx/usr/lib64/liblog.so
-lpthread /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroot/xxxxxx/usr/lib64/libutils.so
-L/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/x86_64-linux/usr/lib/aarch64-poky-linux/gcc/aarch64-poky-linux/5.2.0
-L/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxx/lib64
-L/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxx/usr/lib64/aarch64-poky-linux/5.2.0
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxx/usr/lib64/libstdc++.so
-lm -lc -lgcc_s -lgcc
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxx/usr/lib64/aarch64-poky-linux/5.2.0/crtendS.o
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxx/usr/lib64/crtn.o
 --sysroot=/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxxx/
-g -fstack-protector-all -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-Wl,-z -Wl,relro -Wl,-z -Wl,now   -Wl,-soname -Wl,libbinder.so.0 -o
.libs/libbinder.so.0.0.0
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxx/usr/lib64/libc_nonshared.a(elf-init.oS):
In function `__libc_csu_init':
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/work/aarch64-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87:
undefined reference to `__init_array_start'
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/5.2.0/ld:
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxx/lib64/libc_nonshared.a(elf-init.oS):
relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol
`__init_array_start' can not be used when making a shared object;
recompile with -fPIC
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/work/aarch64-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87:
undefined reference to `__init_array_end'
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/5.2.0/ld:
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/xxxxxxx/usr/lib64/libc_nonshared.a(elf-init.oS):
relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol
`__init_array_end' can not be used when making a shared object;
recompile with -fPIC
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/work/aarch64-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87:
undefined reference to `__init_array_start'
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/work/aarch64-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87:
undefined reference to `__init_array_end'
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/5.2.0/ld:
.libs/libbinder.so.0.0.0: hidden symbol `__init_array_end' isn't
defined
| /local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/5.2.0/ld:
final link failed: Bad value
| collect2: error: ld returned 1 exit status
| make[2]: *** [libbinder.la] Error 1
| make[2]: Leaving directory
`/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/work/aarch64-poky-linux/native-frameworks/git-r0/build/libs/binder'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory
`/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/work/aarch64-poky-linux/native-frameworks/git-r0/build'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at
/local/mnt/workspace/narasimha/AGL_NEW/poky/build/tmp-glibc/work/aarch64-poky-linux/native-frameworks/git-r0/temp/log.do_compile.13017)

Regards

Raj.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160909/f2923d70/attachment.html>


More information about the yocto mailing list