Build failure on Ubuntu 20.04.2 ARM64

Hello,

Initially I reported this issue at 0003696: Build failure on Linux ARM64 for ThirdParty-dev - OpenFOAM Issue Tracking but I’ve been recommended to discuss it here.

I am trying to build OpenFOAM on Ubuntu 20.04.2 ARM64.
The build fails for ThirdParty-dev, master branch.
I follow the instructions at OpenFOAM Repo: 1. Software for Compilation | OpenFOAM

  1. sudo apt-get install build-essential flex bison git-core cmake zlib1g-dev
  2. sudo apt-get install libqt5x11extras5-dev libxt-dev qt5-default qttools5-dev curl
  3. git clone GitHub - OpenFOAM/OpenFOAM-dev: OpenFOAM Foundation development repository
  4. git clone GitHub - OpenFOAM/ThirdParty-dev: OpenFOAM-dev third-party library compilation scripts && cd ThirdParty-dev
  5. source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc
  6. ./Allwmake
  7. ./makeParaView

and here it breaks with:


[ 87%] Built target vtkPVServerManagerDefault
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkSMUtilitiesClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkSMViewLayoutProxyClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkSMViewProxyClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkSMViewProxyInteractorHelperClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkSMViewResolutionDomainClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkSMWidgetRepresentationProxyClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkSMParaViewPipelineControllerWithRenderingClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkPVServerManagerRenderingObjectFactoryClientServer.cxx.o
[ 87%] Building CXX object Wrapping/ClientServer/CMakeFiles/vtkPVServerManagerRenderingCS.dir/vtkPVServerManagerRenderingCSInit.cxx.o
[ 87%] Linking CXX static library …/…/lib/libvtkPVServerManagerRenderingCS-pv5.6.a
[ 87%] Built target vtkPVServerManagerRenderingCS
make: *** [Makefile:152: all] Error 2
Command exited with non-zero status 2
8921.63user 999.69system 23:58.03elapsed 689%CPU (0avgtext+0avgdata 1743496maxresident)k
118632inputs+2870128outputs (611major+185189999minor)pagefaults 0swaps

Any ideas how to solve it ?

Thank you!

The linked OpenFOAM issue shows that it is actually an error in OpenFOAM code and nothing to do with ParaView. Parallel builds with make usually need some scrolling to find the actual error message (make -j1 will certainly stop at the “first” error at least).

Hi @ben.boeckel ,

In the OpenFOAM issue only the first entry is about ParaView (in their ThirdParty-dev repo there is `makeParaView script). I have copied the last part of its output here too.

The later comments are about OpenFOAM itself. There I use -j for Allwmake script.

Now I modified ThirdParty-dev/ParaViewFunctions at 1ff0136d3279590bd2e1f2e408349e851b7d7e38 · OpenFOAM/ThirdParty-dev · GitHub to use make -j 1 when building ParaView and re-run it. I will copy the new error once it finishes.

Regards,
Martin

Here is the new error with make -j 1:

93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqToolTipTrapper.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqTransferFunctionWidget.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqTriggerOnIdleHelper.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqVCRController.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqViewContextMenuHandler.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqViewContextMenuManager.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqViewFrame.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqViewManager.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqWidgetRangeDomain.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqAbstractItemSelectionModel.cpp.o
[ 93%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/moc_pqExodusIIVariableSelectionWidget.cpp.o
[ 93%] Linking CXX shared library …/…/lib/libvtkpqComponents-pv5.6.so
[ 93%] Built target pqComponents
Scanning dependencies of target vtkLegacyColorMapXMLToJSON
[ 93%] Building CXX object Utilities/LegacyColorMapXMLToJSON/CMakeFiles/vtkLegacyColorMapXMLToJSON.dir/vtkLegacyColorMapXMLToJSON.cxx.o
[ 93%] Linking CXX executable …/…/bin/vtkLegacyColorMapXMLToJSON
/usr/bin/ld: /home/ubuntu/git/2021.H2/openfoam/ThirdParty-dev/build/linuxArm64Gcc/ParaView-5.6.3/lib/libvtkpng-pv5.6.so.1: undefined reference to `png_init_filter_functions_neon’
collect2: error: ld returned 1 exit status
make[2]: *** [Utilities/LegacyColorMapXMLToJSON/CMakeFiles/vtkLegacyColorMapXMLToJSON.dir/build.make:169: bin/vtkLegacyColorMapXMLToJSON] Error 1
make[1]: *** [CMakeFiles/Makefile2:16861: Utilities/LegacyColorMapXMLToJSON/CMakeFiles/vtkLegacyColorMapXMLToJSON.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Command exited with non-zero status 2
9276.50user 1241.63system 2:56:00elapsed 99%CPU (0avgtext+0avgdata 1743524maxresident)k
220504inputs+3093952outputs (532major+210340082minor)pagefaults 0swaps

OpenFOAM uses ParaView 5.6.3, so this issue might have been already fixed!

Yes, that was fixed at some point already :slight_smile: . The fix is to go and dig into png's headers and just mask out that NEON is supported at all by hacking up the processor detection routines.