LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 03-31-2015, 08:45 AM   #1
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Rep: Reputation: 4
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
 
Old 03-31-2015, 11:15 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,531

Rep: Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274
Quote:
Originally Posted by drlukacs View Post
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.
 
Old 03-31-2015, 11:23 AM   #3
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by drmozes View Post
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
 
Old 03-31-2015, 03:56 PM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,531

Rep: Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274
Quote:
Originally Posted by drlukacs View Post
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?
 
1 members found this post helpful.
Old 03-31-2015, 08:48 PM   #5
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by drmozes View Post
No it breaks the same as yours.
I am relieved to hear that.

Quote:
Originally Posted by drmozes View Post
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 View Post
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 View Post
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.

Last edited by drlukacs; 03-31-2015 at 10:22 PM.
 
Old 03-31-2015, 10:33 PM   #6
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
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?
 
Old 03-31-2015, 11:16 PM   #7
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
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.
 
Old 04-01-2015, 11:01 AM   #8
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 485

Rep: Reputation: Disabled
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.
 
Old 04-01-2015, 11:04 AM   #9
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by gus3 View Post
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?
 
Old 04-01-2015, 11:27 AM   #10
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 485

Rep: Reputation: Disabled
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.
 
Old 04-01-2015, 11:33 AM   #11
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by gus3 View Post
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.
 
Old 04-01-2015, 12:11 PM   #12
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 485

Rep: Reputation: Disabled
Isn't that the point of adding more swap in a file?
 
Old 04-01-2015, 12:19 PM   #13
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by gus3 View Post
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.
 
Old 04-03-2015, 03:49 AM   #14
JeroenVreeken
LQ Newbie
 
Registered: Mar 2015
Distribution: Slackware
Posts: 5

Rep: Reputation: Disabled
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)
 
Old 04-03-2015, 09:04 AM   #15
drlukacs
Member
 
Registered: Oct 2012
Location: Halifax, NS, Canada
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by JeroenVreeken View Post
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?
 
  


Reply

Tags
assembler, boost, compile error


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat 6 Boost Error when installing SW markcgriffiths Linux - Software 10 04-08-2014 09:36 AM
Error installing due to boost lib cecillord Linux - Newbie 6 10-02-2013 11:24 AM
Compilation errors with compiling a program with boost libraries 1.39 Metal_Koola Programming 5 12-04-2009 07:13 PM
HL-RDHM/BOOST installation error safeeq Linux - Software 1 07-23-2009 05:37 AM
configure: error: Could not find Boost headers version >= 1.33 ????? BULPulse Slackware 2 03-11-2008 04:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 02:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration