1
20.1 Legacy Series / Re: Trying to build for Raspberry Pi 4
« on: April 12, 2020, 09:27:53 am »
Hello, I know this post is about PI4, but I am currently struggling with a task that seems to have been done in the past, involving build on FreeBSD 11.2x64 for PI2.
This is the best piece of information I've managed to find so far:
https://forum.opnsense.org/index.php?topic=6099.msg33719#msg33719
I apologize in advance, I am not versed in either FreeBSD nor OPNSense building and setup, so I am struggling.
Could anyone provide some clear instruction on what is actually wrong with building for PI2 (or at least PI4).
So far the build commands are:
The resulting error is:
Thank you in advance and I apologize if there is already a topic that provides a solution. I have been trying to find it for the past 2 days and could not find anything that actually works.
This is the best piece of information I've managed to find so far:
https://forum.opnsense.org/index.php?topic=6099.msg33719#msg33719
I apologize in advance, I am not versed in either FreeBSD nor OPNSense building and setup, so I am struggling.
Could anyone provide some clear instruction on what is actually wrong with building for PI2 (or at least PI4).
So far the build commands are:
Code: [Select]
pkg install git qemu-user-static arm-gnueabi-binutils u-boot-rpi2 rpi-firmware
cd /usr
git clone https://github.com/opnsense/tools
cd tools
make update
make base ARCH=arm:armv6 KERNEL=SMP-RPI2
The resulting error is:
Code: [Select]
===> usr.bin/clang/clang (all)
cc1_main.o: In function `cc1_main(llvm::ArrayRef<char const*>, char const*, void*)':
cc1_main.cpp:(.text._Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x45c): relocation truncated to fit: R_ARM_CALL against symbol `llvm::install_fatal_error_handler(void (*)(void*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool), void*)' defined in .text._ZN4llvm27install_fatal_error_handlerEPFvPvRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbES0_ section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(ErrorHandling.o)
cc1_main.cpp:(.text._Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x484): relocation truncated to fit: R_ARM_CALL against symbol `llvm::TimerGroup::printAll(llvm::raw_ostream&)' defined in .text._ZN4llvm10TimerGroup8printAllERNS_11raw_ostreamE section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(Timer.o)
cc1_main.cpp:(.text._Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x488): relocation truncated to fit: R_ARM_CALL against symbol `llvm::remove_fatal_error_handler()' defined in .text._ZN4llvm26remove_fatal_error_handlerEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(ErrorHandling.o)
cc1_main.o: In function `_GLOBAL__sub_I_cc1_main.cpp':
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0x34): relocation truncated to fit: R_ARM_CALL against symbol `llvm::createBasicAAWrapperPass()' defined in .text._ZN4llvm24createBasicAAWrapperPassEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(BasicAliasAnalysis.o)
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0x38): relocation truncated to fit: R_ARM_CALL against symbol `llvm::createSCEVAAWrapperPass()' defined in .text._ZN4llvm23createSCEVAAWrapperPassEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(ScalarEvolutionAliasAnalysis.o)
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0x3c): relocation truncated to fit: R_ARM_CALL against symbol `llvm::createTypeBasedAAWrapperPass()' defined in .text._ZN4llvm28createTypeBasedAAWrapperPassEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(TypeBasedAliasAnalysis.o)
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0x40): relocation truncated to fit: R_ARM_CALL against symbol `llvm::createScopedNoAliasAAWrapperPass()' defined in .text._ZN4llvm32createScopedNoAliasAAWrapperPassEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(ScopedNoAliasAA.o)
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0xa4): relocation truncated to fit: R_ARM_CALL against symbol `llvm::createCFLAndersAAWrapperPass()' defined in .text._ZN4llvm28createCFLAndersAAWrapperPassEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(CFLAndersAliasAnalysis.o)
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0xa8): relocation truncated to fit: R_ARM_CALL against symbol `llvm::createCFLSteensAAWrapperPass()' defined in .text._ZN4llvm28createCFLSteensAAWrapperPassEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(CFLSteensAliasAnalysis.o)
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0x170): relocation truncated to fit: R_ARM_CALL against symbol `llvm::createGlobalsAAWrapperPass()' defined in .text._ZN4llvm26createGlobalsAAWrapperPassEv section in /usr/obj/arm.armv6/usr/src/lib/clang/libllvm/libllvm.a(GlobalsModRef.o)
cc1_main.cpp:(.text._GLOBAL__sub_I_cc1_main.cpp+0x1a0): additional relocation overflows omitted from the output
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [clang] Error code 1
make[5]: stopped in /usr/src/usr.bin/clang/clang
1 error
make[5]: stopped in /usr/src/usr.bin/clang/clang
*** [all_subdir_usr.bin/clang/clang] Error code 2
make[4]: stopped in /usr/src/usr.bin/clang
1 error
make[4]: stopped in /usr/src/usr.bin/clang
*** [all_subdir_usr.bin/clang] Error code 2
make[3]: stopped in /usr/src/usr.bin
1 error
make[3]: stopped in /usr/src/usr.bin
*** [all_subdir_usr.bin] Error code 2
make[2]: stopped in /usr/src
1 error
make[2]: stopped in /usr/src
*** [everything] Error code 2
make[1]: stopped in /usr/src
1 error
make[1]: stopped in /usr/src
*** [buildworld] Error code 2
make: stopped in /usr/src
1 error
make: stopped in /usr/src
*** Error code 2
Stop.
make: stopped in /usr/tools
Thank you in advance and I apologize if there is already a topic that provides a solution. I have been trying to find it for the past 2 days and could not find anything that actually works.