make buildworld failed with error "relocation truncated to fit: R_ARM_JUMP24 against symbol `_fini'"

Hamza Sheikh fehrist at codeghar.com
Sun Jan 17 23:01:07 UTC 2016


I am running FreeBSD on Raspberry Pi 2, installed from a RaspBSD[1] 
image. It is a new 64GB Micro SD card. I was running out of space on 8GB 
card during `make installworld`.

% df -h
Filesystem        Size    Used   Avail Capacity  Mounted on
/dev/mmcsd0s2a     58G    3.6G     49G     7%    /
devfs             1.0K    1.0K      0B   100%    /dev
/dev/mmcsd0s1      50M    7.4M     43M    15%    /boot/msdos
/dev/md0           48M     28K     44M     0%    /tmp
/dev/md1           14M    196K     13M     1%    /var/log
/dev/md2          9.3M    8.0K    8.5M     0%    /var/tmp


== Steps ==

# pkg update
# pkg install ca_root_nss
# svnlite checkout svn://svn.freebsd.org/base/head /usr/src
# chflags -R noschg /usr/obj/*
# rm -rf /usr/obj
# cd /usr/src
# svnlite update
# echo "WITHOUT_DEBUG_FILES=\"YES\"" >> /etc/src.conf
# svnlite info
Path: .
Working Copy Root Path: /usr/src
URL: svn://svn.freebsd.org/base/head
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 294205
Node Kind: directory
Schedule: normal
Last Changed Author: kib
Last Changed Rev: 294205
Last Changed Date: 2016-01-17 08:40:51 +0000 (Sun, 17 Jan 2016)
# cat /etc/make.conf
CC=clang
CXX=clang++
CPP=clang-cpp
WRKDIRPREFIX=/tmp
WITH_PKGNG=yes
# make buildworld


== Error ==

... <Snip Output>...
/usr/lib/crt1.o: In function `__start':
/usr/local/raspbsd/src/common/lib/csu/arm/crt1.c:(.text+0xb4): 
relocation truncated to fit: R_ARM_CALL against symbol `atexit' defined 
in .text section in /us
r/lib/libc.a(atexit.o)
/usr/local/raspbsd/src/common/lib/csu/arm/crt1.c:(.text+0xbc): 
relocation truncated to fit: R_ARM_CALL against symbol `_init_tls' 
defined in .text section in
/usr/lib/libc.a(tls.o)
/usr/local/raspbsd/src/common/lib/csu/arm/crt1.c:(.text+0xcc): 
relocation truncated to fit: R_ARM_CALL against symbol `atexit' defined 
in .text section in /us
r/lib/libc.a(atexit.o)
/usr/local/raspbsd/src/common/lib/csu/arm/crt1.c:(.text+0x174): 
relocation truncated to fit: R_ARM_CALL against symbol `exit' defined in 
.text section in /usr
/lib/libc.a(exit.o)
/usr/lib/crt1.o: In function `finalizer':
/usr/local/raspbsd/src/common/lib/csu/arm/crt1.c:(.text+0x1ec): 
relocation truncated to fit: R_ARM_JUMP24 against symbol `_fini' defined 
in .fini section in /
usr/lib/crti.o
clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)
*** Error code 1

Stop.
make[4]: stopped in /usr/src/usr.bin/clang/clang
*** Error code 1

Stop.
make[3]: stopped in /usr/src/usr.bin/clang
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src


== Investigation ==

Some quick searching[2] shows it may be a code issue. I'm unqualified to 
either confirm or even test this assumption. Any help/pointers greatly 
appreciated.




[1] http://download.raspbsd.org/FreeBSD-armv6-11.0-RPI2-292991.img.gz
[2] 
https://rowley.zendesk.com/entries/46203--relocation-truncated-to-fit-R-ARM-PC24-against-symbol-error-message


-- 
Hamza Sheikh
Twitter: @aikchar


More information about the freebsd-arm mailing list