Boost compilation -- assembler error
I am wondering how the context module of boost was compiled for slackware-14.1 and slackware-current.
When I tried to recompile boost, I got the following error message: Code:
libs/context/src/asm/jump_arm_aapcs_elf_gas.S: Assembler messages: Code:
as libs/context/src/asm/jump_arm_aapcs_elf_gas.S |
Quote:
For some things I wouldn't be surprised that they don't build anymore since boost was last built in 2013. However, Look at boost.SlackBuild - I just tried it on -current and it builds fine. |
Quote:
What hardware did you use to run boost.SlackBuild? Does the following compilation run without any errors on your system? Code:
as libs/context/src/asm/jump_arm_aapcs_elf_gas.S |
Quote:
Code:
root@wizbit:/tmp/boost# tar tvvf /tmp/l/boost-1.54.0-arm-3.tgz |grep context | grep -v include The package is built on a full installation of -current. It builds on armv5 and armv7 using the ARM boost.SlackBuild. Presumably this is what you're using - not the x86 one? |
Quote:
Quote:
Quote:
Quote:
|
First explanation for the error message
It seems that the error is directly related to the -mfloat-abi= used during the compilation of the context library:
Code:
"g++" -mfloat-abi=soft -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/context/build/gcc-4.8.4/release/threading-multi/asm/jump_arm_aapcs_elf_gas.o" "libs/context/src/asm/jump_arm_aapcs_elf_gas.S" On the other hand, Code:
"g++" -mfloat-abi=softfp -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/context/build/gcc-4.8.4/release/threading-multi/asm/jump_arm_aapcs_elf_gas.o" "libs/context/src/asm/jump_arm_aapcs_elf_gas.S" Code:
libs/context/src/asm/jump_arm_aapcs_elf_gas.S:62: Error: selected processor does not support ARM mode `vstmia a4,{d8-d15}' |
A possible solution to the problem
I looked at the code of the file that was causing the errors, and the following does compile fine:
Code:
"g++" -mfloat-abi=softfp -mfpu=neon -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/context/build/gcc-4.8.4/release/threading-multi/asm/jump_arm_aapcs_elf_gas.o" "libs/context/src/asm/jump_arm_aapcs_elf_gas.S" |
Heh. I tried to build it overnight, to see what would happen. It exhausted the virtual memory (RAM+swap) trying to process a C++ template, and zapped a couple low-priority daemons that were in the way.
|
Quote:
|
Raspberry Pi, no parallelism except what's in boost.Slackbuild.
I suppose I could try using a local FS as root, and NFS for just the build space. Then I could add more swap in a file. |
Quote:
|
Isn't that the point of adding more swap in a file?
|
Quote:
|
I just finished compiling boost for arm hardfloat.
I used a beagle bone black which has 512Mb ram and a 1Gb swap space on SD. While not fast it finished in about half a day. (actually an evening and a night) The sources I used came from x86_64. (with some architecture and library path changes, but otherwise left untouched) |
Quote:
|
All times are GMT -5. The time now is 10:28 AM. |