|
[Sponsors] |
[OpenFOAM.org] Error compiling OpenFOAM-6 on ARMv7 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2019, 16:24 |
|
#1 |
Senior Member
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10 |
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 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 |
|
May 11, 2019, 20:58 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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 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:" |
|
May 12, 2019, 07:51 |
|
#3 |
Senior Member
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10 |
@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 ... |
|
May 12, 2019, 15:48 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer: "soft" and "hard" refer to which FPU to use:
|
|
May 13, 2019, 08:32 |
|
#5 |
Senior Member
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10 |
Ok, that makes sense. Thanks again for your help.
|
|
April 22, 2020, 11:54 |
Installing OpenFOAM to raspberry pi
|
#6 |
New Member
Sean
Join Date: Apr 2020
Location: London
Posts: 2
Rep Power: 0 |
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. |
|
Tags |
openfoam |
|
|
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 |