CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Error compiling OpenFOAM-6 on ARMv7

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2019, 16:24
Question
  #1
Senior Member
 
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10
Time4Tea is on a distinguished road
Hi,


I'm trying to compile OpenFOAM-6 on an ARMv7 Chromebook running Parabola GNU/Linux. After I start compiling, I very quickly run into the following error:


Code:
$ ./Allwmake -j
Compiling enabled on 4 cores
Allwmake /home/lee/OpenFOAM/OpenFOAM-6
gcc -DlinuxARM7 -DWM_ARCH_OPTION=32 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=softfp   -fPIC dirToString.c -o /home/lee/OpenFOAM/OpenFOAM-6/wmake/platforms/linuxARM7Gcc/dirToString
In file included from /usr/include/features.h:452,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from dirToString.c:43:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-soft.h: No such file or directory
 # include <gnu/stubs-soft.h>
           ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:68: /home/lee/OpenFOAM/OpenFOAM-6/wmake/platforms/linuxARM7Gcc/dirToString] Error 1
Does anyone have any idea how I can resolve this? What does this 'stubs-soft.h' header relate to?

Perhaps something to do with the -mfloat-abi=softfp compiler option?

Last edited by wyldckat; May 11, 2019 at 20:47. Reason: Merged posts a few minutes apart
Time4Tea is offline   Reply With Quote

Old   May 11, 2019, 20:58
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Very likely, yes, it's related to using softfp by default...

A quick review online for this topic on what I saw in the past and with ARM, there are a ton of FPUs out there... I'm not sure how we can figure out which ones are better or should be used... for example, in post #2 here: OpenFOAM on embedded systems (Pi, Pi2, Edison & BBB) - each ARM uses or can use its own FPU type...

A bit more researching online and it's not entirely clear to me if the problem you're having is due to an incomplete GCC installation or if the ARMv7 model you have does not support softfp...

Running:
Code:
cat /proc/cpuinfo
should tell you more details about the exact CPU model and any additional extensions it has.


edit: Another example of compile flags customization needed for ARM: https://openfoamwiki.net/index.php/I...rchitecture.29
__________________

Last edited by wyldckat; May 11, 2019 at 20:59. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   May 12, 2019, 07:51
Default
  #3
Senior Member
 
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10
Time4Tea is on a distinguished road
@wyldckat:

Thanks for the info. I actually managed to figure it out (I think):

The info pages for gcc indicate that -mfloat-abi seems to be an ARM-specific compiler flag that has something to do with floating point operations. My /usr/include/gnu folder has a stubs-hard.h, but not a stubs-soft.h. So, I changed the flag to -mfloat-abi=hard (in the settings in $WM_DIR/rules) and that seemed to resolve it. It compiled fine and, as far as I can tell, OF seems to be working.

I have no idea what stubs-soft vs stubs-hard means, or what (if any) effect it would have on OF ...
Time4Tea is offline   Reply With Quote

Old   May 12, 2019, 15:48
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: "soft" and "hard" refer to which FPU to use:
  • "soft" means that it will have to do mathematical calculations using the CPU, which is slower.
  • "hard" means that it will use the hardware FPU, namely a chip that is specialized for mathematical operations and can process them a lot faster than the CPU.
And again, ARM has a fairly broad range of implementations, with and without a hardware FPU and other possibly hardware features... so there are more build options than the more conventional x86/x86_64 CPUs.
wyldckat is offline   Reply With Quote

Old   May 13, 2019, 08:32
Default
  #5
Senior Member
 
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10
Time4Tea is on a distinguished road
Ok, that makes sense. Thanks again for your help.
Time4Tea is offline   Reply With Quote

Old   April 22, 2020, 11:54
Default Installing OpenFOAM to raspberry pi
  #6
New Member
 
Sean
Join Date: Apr 2020
Location: London
Posts: 2
Rep Power: 0
sew234 is on a distinguished road
Hi,

I am aware this is an old thread however am having a similar issue.

I am very new to Linux and OpenFOAM and am trying to install it to a raspberry pi 4 using the following instructions.

http://www.wolfdynamics.com/images/r...nFOAM-RPI3.pdf

When I reach the last step and try to compile I am getting the same error as the person above.

If anyone has any advice on how to solve it would be greatly appreciated.
sew234 is offline   Reply With Quote

Reply

Tags
openfoam


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
OpenFOAM Foundation releases OpenFOAMŪ 3.0.0 CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 1 November 7, 2015 16:16
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 14:36
OpenFOAM Foundation Releases OpenFOAM v2.3.0 opencfd OpenFOAM Announcements from OpenFOAM Foundation 3 December 23, 2014 04:43
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52


All times are GMT -4. The time now is 19:05.