math/suitesparse from ports head -r557893 fails for armv7 by default: "/usr/local/bin/ld: cannot find -lomp"

Mark Millard marklmi at yahoo.com
Tue Dec 15 05:48:56 UTC 2020


On 2020-Dec-14, at 13:34, Mark Millard <marklmi at yahoo.com> wrote:

> This was on aarch64 doing a build targeting armv7 via poudriere --but might apply to other platforms that by default do not have LLVM's OpenMP runtime:
> 
>    WITHOUT_OPENMP
>             Set to not build LLVM's OpenMP runtime.
> 
>             This is a default setting on arm/armv6, arm/armv7, mips/mips,
>             mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf.
> 
> # poudriere jail -jFBSDFSSDjailArmV7 -i
> Jail name:         FBSDFSSDjailArmV7
> Jail version:      13.0-CURRENT
> Jail arch:         arm.armv7
> Jail method:       null
> Jail mount:        /usr/obj/DESTDIRs/clang-armv7-installworld-poud
> Jail fs:           
> Jail updated:      2020-04-21 22:39:35
> 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud is at: head -r368500
> (as is the containing aarch64 environment).
> 
> Apparently, armv7 (at least) requires a manual/explicit OPENMP=off configuration option for math/suitesparse . Is this intentional?
> 
> 
> poudriere reported:
> 
> [02:42:51] [01] [00:00:00] Building math/suitesparse | suitesparse-5.8.1
> [02:46:41] [01] [00:03:50] Saving math/suitesparse | suitesparse-5.8.1 wrkdir
> [02:46:45] [01] [00:03:54] Saved math/suitesparse | suitesparse-5.8.1 wrkdir to: /usr/local/poudriere/data/wrkdirs/FBSDFSSDjailArmV7-default/default/suitesparse-5.8.1.tar
> [02:46:55] [01] [00:04:04] Finished math/suitesparse | suitesparse-5.8.1: Failed: build
> [02:46:59] [01] [00:04:08] Skipping math/eigen3 | eigen-3.3.8: Dependent port math/suitesparse | suitesparse-5.8.1 failed
> [02:46:59] [01] [00:04:08] Skipping multimedia/ffmpeg | ffmpeg-4.3.1_9,1: Dependent port math/suitesparse | suitesparse-5.8.1 failed
> [02:46:59] [01] [00:04:08] Skipping multimedia/gstreamer1-libav | gstreamer1-libav-1.16.2: Dependent port math/suitesparse | suitesparse-5.8.1 failed
> [02:46:59] [01] [00:04:08] Skipping multimedia/gstreamer1-plugins-core | gstreamer1-plugins-core-1.16: Dependent port math/suitesparse | suitesparse-5.8.1 failed
> [02:46:59] [01] [00:04:08] Skipping x11/lumina | lumina-1.6.0,3: Dependent port math/suitesparse | suitesparse-5.8.1 failed
> [02:46:59] [01] [00:04:08] Skipping x11/lumina-core | lumina-core-1.6.0: Dependent port math/suitesparse | suitesparse-5.8.1 failed
> [02:46:59] [01] [00:04:08] Skipping graphics/opencv-core | opencv-core-3.4.1_37: Dependent port math/suitesparse | suitesparse-5.8.1 failed
> . . .
> [02:48:20] Failed ports: math/suitesparse:build
> [02:48:20] Skipped ports: graphics/opencv-core math/eigen3 multimedia/ffmpeg multimedia/gstreamer1-libav multimedia/gstreamer1-plugins-core x11/lumina x11/lumina-core
> 
> (That last gives a clue what types of things are blocked by the failure.)
> 
> The log showed the -lomp issue:
> 
> . . .
> /usr/local/bin/ranlib libcholmod.a
> /usr/local/bin/ld: cannot find -lomp
> c++: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake[4]: *** [Makefile:544: /wrkdirs/usr/ports/math/suitesparse/work/SuiteSparse-5.8.1/lib/libcholmod.so.3.0.14] Error 1
> gmake[4]: Leaving directory '/wrkdirs/usr/ports/math/suitesparse/work/SuiteSparse-5.8.1/CHOLMOD/Lib'
> gmake[3]: *** [Makefile:31: library] Error 2
> gmake[3]: Leaving directory '/wrkdirs/usr/ports/math/suitesparse/work/SuiteSparse-5.8.1/CHOLMOD/Lib'
> gmake[2]: *** [Makefile:19: library] Error 2
> gmake[2]: Leaving directory '/wrkdirs/usr/ports/math/suitesparse/work/SuiteSparse-5.8.1/CHOLMOD'
> gmake[1]: *** [Makefile:135: library] Error 2
> gmake[1]: Leaving directory '/wrkdirs/usr/ports/math/suitesparse/work/SuiteSparse-5.8.1'
> ===> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
> the maintainer.
> *** Error code 1
> . . .
> 
> Other context details . . .
> 
> # svnlite info /usr/ports/
> Path: /usr/ports
> Working Copy Root Path: /usr/ports
> URL: svn://svn.freebsd.org/ports/head
> Relative URL: ^/head
> Repository Root: svn://svn.freebsd.org/ports
> Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> Revision: 557893
> Node Kind: directory
> Schedule: normal
> Last Changed Author: manu
> Last Changed Rev: 557893
> Last Changed Date: 2020-12-13 03:53:57 -0800 (Sun, 13 Dec 2020)
> 
> # uname -apKU
> FreeBSD FBSDmacch 13.0-CURRENT FreeBSD 13.0-CURRENT #47 r368500M: Thu Dec 10 03:15:10 PST 2020     root at FBSDFHUGE:/usr/obj/cortexA72_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-NODBG  arm64 aarch64 1300131 1300131
> 


An explicit use of OPTIONS_FILE_UNSET+=OPENMP in the below was sufficient to allow the build:

# more /usr/local/etc/poudriere.d/FBSDFSSDjailArmV7-options/math_suitesparse/options 
# This file is auto-generated by 'make config'.
# Options for suitesparse-5.8.1
_OPTIONS_READ=suitesparse-5.8.1
_FILE_COMPLETE_OPTIONS_LIST=DEMOS DOCS TBB ATLAS GOTOBLAS NETLIB OPENBLAS
OPTIONS_FILE_UNSET+=DEMOS
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=TBB
OPTIONS_FILE_UNSET+=ATLAS
OPTIONS_FILE_UNSET+=GOTOBLAS
OPTIONS_FILE_UNSET+=NETLIB
OPTIONS_FILE_SET+=OPENBLAS
OPTIONS_FILE_UNSET+=OPENMP

Note that for armv7 config had not even listed OPENMP as an option. Yet UNSET'ing it seems to be required for a by-default WITHOUT_OPENMP context in order for the build to work.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ports mailing list