LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   Boost compilation -- assembler error (https://www.linuxquestions.org/questions/slackware-arm-108/boost-compilation-assembler-error-4175538324/)

drlukacs 03-31-2015 08:45 AM

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:
libs/context/src/asm/jump_arm_aapcs_elf_gas.S:62: Error: selected
processor does not support ARM mode `vstmia a4,{d8-d15}'
libs/context/src/asm/jump_arm_aapcs_elf_gas.S:66: Error: selected
processor does not support ARM mode `vldmia a4,{d8-d15}'

    "g++" -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"

I was able to reproduce the same error message with:

Code:

as libs/context/src/asm/jump_arm_aapcs_elf_gas.S

drmozes 03-31-2015 11:15 AM

Quote:

Originally Posted by drlukacs (Post 5340360)
I was able to reproduce the same error message with:

Code:

as libs/context/src/asm/jump_arm_aapcs_elf_gas.S



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.

drlukacs 03-31-2015 11:23 AM

Quote:

Originally Posted by drmozes (Post 5340410)
However, Look at boost.SlackBuild - I just tried it on -current and it builds fine.

That is precisely what I have been using. It does build the package, but does not build the context library because of the error.

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

drmozes 03-31-2015 03:56 PM

Quote:

Originally Posted by drlukacs (Post 5340417)
That is precisely what I have been using. It does build the package, but does not build the context library because of the error.

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

No it breaks the same as yours. When you say the context library

Code:

root@wizbit:/tmp/boost# tar tvvf /tmp/l/boost-1.54.0-arm-3.tgz |grep context | grep -v include
-rw-r--r-- root/root      1682 2015-03-31 21:44 usr/lib/libboost_context.a
-rwxr-xr-x root/root      3096 2015-03-31 21:43 usr/lib/libboost_context.so.1.54.0
root@wizbit:/tmp/boost#

Is that what you mean?

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?

drlukacs 03-31-2015 08:48 PM

Quote:

Originally Posted by drmozes (Post 5340556)
No it breaks the same as yours.

I am relieved to hear that.

Quote:

Originally Posted by drmozes (Post 5340556)
When you say the context library

Code:

root@wizbit:/tmp/boost# tar tvvf /tmp/l/boost-1.54.0-arm-3.tgz |grep context | grep -v include
-rw-r--r-- root/root      1682 2015-03-31 21:44 usr/lib/libboost_context.a
-rwxr-xr-x root/root      3096 2015-03-31 21:43 usr/lib/libboost_context.so.1.54.0
root@wizbit:/tmp/boost#

Is that what you mean?

Yes.

Quote:

Originally Posted by drmozes (Post 5340556)
The package is built on a full installation of -current. It builds on armv5 and armv7 using the ARM boost.SlackBuild.

Would you be so kind to share with me the build.log.bz2 file for the build that produced the above results? (Even better: would you mind re-running the arm/build with "-d+2" added to the parameters of $BJAM so that it will output more detailed debugging information, and then share the logs?)

Quote:

Originally Posted by drmozes (Post 5340556)
Presumably this is what you're using - not the x86 one?

I have slackwarearm-14.1 installed, with a number of packages recompiled using the slackwarearm-current script with only one significant modification: specifying softfp, armv7-a, cortex-a7 in the optimization parameters/architecture.

drlukacs 03-31-2015 10:33 PM

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"
will compile fine (and if your gcc's default is soft float, then -mfloat-abi=soft is not needed).

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"
will give the error message:

Code:

libs/context/src/asm/jump_arm_aapcs_elf_gas.S:62: Error: selected processor does not support ARM mode `vstmia a4,{d8-d15}'
libs/context/src/asm/jump_arm_aapcs_elf_gas.S:66: Error: selected processor does not support ARM mode `vldmia a4,{d8-d15}'

Thus, the problem can be rephrased as follows: How can one compile boost's context library using softfp (or hard) float?

drlukacs 03-31-2015 11:16 PM

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"
I am wondering now about the optimal -mfpu parameter to pass.

gus3 04-01-2015 11:01 AM

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.

drlukacs 04-01-2015 11:04 AM

Quote:

Originally Posted by gus3 (Post 5340923)
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.

What machine did you try to build it on, and how many parallel processes did you use for the build?

gus3 04-01-2015 11:27 AM

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.

drlukacs 04-01-2015 11:33 AM

Quote:

Originally Posted by gus3 (Post 5340941)
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.

Raspberry Pi may not have enough memory. You may want to try Raspberry Pi 2.

gus3 04-01-2015 12:11 PM

Isn't that the point of adding more swap in a file?

drlukacs 04-01-2015 12:19 PM

Quote:

Originally Posted by gus3 (Post 5340974)
Isn't that the point of adding more swap in a file?

The question is where is the swap -- if it is on the SD, then it is way too slow. Compiling boost requires over 1Gb of memory.

JeroenVreeken 04-03-2015 03:49 AM

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)

drlukacs 04-03-2015 09:04 AM

Quote:

Originally Posted by JeroenVreeken (Post 5341836)
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)

Which distribution are you using?


All times are GMT -5. The time now is 10:28 AM.