# uname -pivKU FreeBSD 11.1-STABLE r330133M amd64 hqdev-amd64-smp-vga 1101511 1101509 Interestingly I'm using the default BLAS, netlib, but openblas is listed in the libraries to be linked, even after modifying the Makefile: -OPTIONS_DEFAULT= OPENBLAS +#OPTIONS_DEFAULT= OPENBLAS gcc7 -pie -Wl,--strip-debug -Wl,--build-id=md5 -Wl,-rpath=/usr/local/lib/gcc7 -L/usr/local/lib/gcc7 -B/usr/local/bin -L/usr/local/lib -fno-stack-protector -Wl,-rpath=/usr/local/lib/gcc7 -L/usr/local/lib/gcc7 -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -shared -Wl,-soname -Wl,libcholmod.so.3 -Wl,--no-undefined -fopenmp cholmod_aat.o cholmod_add.o cholmod_band.o cholmod_change_factor.o cholmod_common.o cholmod_complex.o cholmod_copy.o cholmod_dense.o cholmod_error.o cholmod_factor.o cholmod_memory.o cholmod_sparse.o cholmod_transpose.o cholmod_triplet.o cholmod_version.o cholmod_check.o cholmod_read.o cholmod_write.o cholmod_amd.o cholmod_analyze.o cholmod_colamd.o cholmod_etree.o cholmod_factorize.o cholmod_postorder.o cholmod_rcond.o cholmod_resymbol.o cholmod_rowcolcounts.o cholmod_rowfac.o cholmod_solve.o cholmod_spsolve.o cholmod_drop.o cholmod_horzcat.o cholmod_norm.o cholmod_scale.o cholmod_sdmult.o cholmod_ssmult.o cholmod_submatrix.o cholmod_vertcat.o cholmod_symmetry.o cholmod_rowadd.o cholmod_rowdel.o cholmod_updown.o cholmod_super_numeric.o cholmod_super_solve.o cholmod_super_symbolic.o cholmod_ccolamd.o cholmod_csymamd.o cholmod_metis.o cholmod_nesdis.o cholmod_camd.o cholmod_l_aat.o cholmod_l_add.o cholmod_l_band.o cholmod_l_change_factor.o cholmod_l_common.o cholmod_l_complex.o cholmod_l_copy.o cholmod_l_dense.o cholmod_l_error.o cholmod_l_factor.o cholmod_l_memory.o cholmod_l_sparse.o cholmod_l_transpose.o cholmod_l_triplet.o cholmod_l_version.o cholmod_l_check.o cholmod_l_read.o cholmod_l_write.o cholmod_l_amd.o cholmod_l_analyze.o cholmod_l_colamd.o cholmod_l_etree.o cholmod_l_factorize.o cholmod_l_postorder.o cholmod_l_rcond.o cholmod_l_resymbol.o cholmod_l_rowcolcounts.o cholmod_l_rowfac.o cholmod_l_solve.o cholmod_l_spsolve.o cholmod_l_drop.o cholmod_l_horzcat.o cholmod_l_norm.o cholmod_l_scale.o cholmod_l_sdmult.o cholmod_l_ssmult.o cholmod_l_submatrix.o cholmod_l_vertcat.o cholmod_l_symmetry.o cholmod_l_rowadd.o cholmod_l_rowdel.o cholmod_l_updown.o cholmod_l_super_numeric.o cholmod_l_super_solve.o cholmod_l_super_symbolic.o cholmod_l_ccolamd.o cholmod_l_csymamd.o cholmod_l_metis.o cholmod_l_nesdis.o cholmod_l_camd.o -o /var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib/libcholmod.so.3.0.12 -lm -lamd -lcolamd -lsuitesparseconfig -lccolamd -lcamd -L/usr/local/lib -lmetis -pie -Wl,--strip-debug -Wl,--build-id=md5 -Wl,-rpath=/usr/local/lib/gcc7 -L/usr/local/lib/gcc7 -B/usr/local/bin -L/usr/local/lib -fno-stack-protector -Wl,-rpath=/usr/local/lib/gcc7 -L/usr/local/lib/gcc7 -llapack -lopenblas /usr/local/bin/ranlib libcholmod.a /usr/lib/Scrt1.o: In function `_start': /smallblocks/src/lib/csu/amd64/crt1.c:(.text+0x18c): undefined reference to `main' collect2: error: ld returned 1 exit status gmake[4]: *** [Makefile:544: /var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib/libcholmod.so.3.0.12] Error 1 gmake[4]: Leaving directory '/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/CHOLMOD/Lib' gmake[3]: *** [Makefile:31: library] Error 2 gmake[3]: Leaving directory '/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/CHOLMOD/Lib' gmake[2]: *** [Makefile:14: all] Error 2 gmake[2]: Leaving directory '/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/CHOLMOD' gmake[1]: *** [Makefile:21: go] Error 2 gmake[1]: Leaving directory '/var/ports/usr/ports/math/suitesparse/work/SuiteSparse' *** Error code 2 PS /usr/src points to /smallblocks, I'm surprised the port looks there for crt1.c? Prior to April updates, suitesparse built with gcc7
(In reply to dewayne from comment #0) Since filing the above problem which was included in a previous PR that was marked as duplicate, suitesparse fails to build with netblas or "none" blas. On FreeBSD 11.2 on i386 and amd64 using either gcc7 or clang 6.0.1. With netblas /usr/local/bin/ranlib libcholmod.a /usr/lib/Scrt1.o: In function `_start': crt1.c:(.text+0xb1): undefined reference to `main' collect2: error: ld returned 1 exit status gmake[4]: *** [Makefile:544: /var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib/libcholmod.so.3.0.12] Error 1 With "none" blas selected /usr/local/lib/liblapack.so: undefined reference to `ztbmv_' collect2: error: ld returned 1 exit status gmake[4]: *** [Makefile:544: /var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib/libcholmod.so.3.0.12] Error 1 Seems that only "svnlite update -r '{20180424}' /usr/ports/math/suitesparse" works?
FreeBSD 11.1 is gone. We have suitsparse version 5.2.0 and gcc9. Does the problem still exist?
Created attachment 206235 [details] patch to disable failing tests I cannot really tell because I have been running with the attached patch ever since. The patch disables the failing tests but does not otherwise change the package.
Forgot: If have build suitesparse with openblas yesterday on 11.2-amd64 without problems.
I just tried it without my patch, and it is still failing (the demos dump core). This is with FreeBSD 12.0-RELEASE-p7 #4 r349733M, latest ports (as of yesterday). -- Martin
Sorry I see I am replying to an issue I have not reported, and the original reporter's issue seems to have been different. Anyway, I cannot build suitesparse (using portmaster) because the demos fail (see the patch I attached). -- Martin
Searching the bugs for suitesparse I realize that my issue is described in bug #233967. -- Martin
*** Bug 233967 has been marked as a duplicate of this bug. ***
Look at the last post in the forum https://forums.freebsd.org/threads/suitesparse-portmaster.65647/page-2 The problem for building math/suitesparse were settings for math/openblas. I left just openmt=on and building of Suitesparse works. (seems a typo an he means openmp).
Forgot: I had openmp=off.
(In reply to w.schwarzenfeld from comment #2) On FreeBSD amd64 11.3Stable make __MAKE_CONF=/etc/make_test.conf -C /usr/ports/math/suitesparse clean package ... a - cholmod_l_camd.o cc -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 -B/usr/local/bin -L/usr/local/lib -fstack-protector -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -shared -Wl,-soname -Wl,libcholmod.so.3 -Wl,--no-undefined -fopenmp cholmod_aat.o cholmod_add.o cholmod_band.o cholmod_change_factor.o cholmod_common.o cholmod_complex.o cholmod_copy.o cholmod_dense.o cholmod_error.o cholmod_factor.o cholmod_memory.o cholmod_sparse.o cholmod_transpose.o cholmod_triplet.o cholmod_version.o cholmod_check.o cholmod_read.o cholmod_write.o cholmod_amd.o cholmod_analyze.o cholmod_colamd.o cholmod_etree.o cholmod_factorize.o cholmod_postorder.o cholmod_rcond.o cholmod_resymbol.o cholmod_rowcolcounts.o cholmod_rowfac.o cholmod_solve.o cholmod_spsolve.o cholmod_drop.o cholmod_horzcat.o cholmod_norm.o cholmod_scale.o cholmod_sdmult.o cholmod_ssmult.o cholmod_submatrix.o cholmod_vertcat.o cholmod_symmetry.o cholmod_rowadd.o cholmod_rowdel.o cholmod_updown.o cholmod_super_numeric.o cholmod_super_solve.o cholmod_super_symbolic.o cholmod_ccolamd.o cholmod_csymamd.o cholmod_metis.o cholmod_nesdis.o cholmod_camd.o cholmod_l_aat.o cholmod_l_add.o cholmod_l_band.o cholmod_l_change_factor.o cholmod_l_common.o cholmod_l_complex.o cholmod_l_copy.o cholmod_l_dense.o cholmod_l_error.o cholmod_l_factor.o cholmod_l_memory.o cholmod_l_sparse.o cholmod_l_transpose.o cholmod_l_triplet.o cholmod_l_version.o cholmod_l_check.o cholmod_l_read.o cholmod_l_write.o cholmod_l_amd.o cholmod_l_analyze.o cholmod_l_colamd.o cholmod_l_etree.o cholmod_l_factorize.o cholmod_l_postorder.o cholmod_l_rcond.o cholmod_l_resymbol.o cholmod_l_rowcolcounts.o cholmod_l_rowfac.o cholmod_l_solve.o cholmod_l_spsolve.o cholmod_l_drop.o cholmod_l_horzcat.o cholmod_l_norm.o cholmod_l_scale.o cholmod_l_sdmult.o cholmod_l_ssmult.o cholmod_l_submatrix.o cholmod_l_vertcat.o cholmod_l_symmetry.o cholmod_l_rowadd.o cholmod_l_rowdel.o cholmod_l_updown.o cholmod_l_super_numeric.o cholmod_l_super_solve.o cholmod_l_super_symbolic.o cholmod_l_ccolamd.o cholmod_l_csymamd.o cholmod_l_metis.o cholmod_l_nesdis.o cholmod_l_camd.o -o /var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib/libcholmod.so.3.0.12 -lm -lamd -lcolamd -lsuitesparseconfig -lccolamd -lcamd -L/usr/local/lib -lmetis -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 -B/usr/local/bin -L/usr/local/lib -fstack-protector -llapack -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 -B/usr/local/bin -L/usr/local/lib -fstack-protector -lopenblasp /usr/local/bin/ranlib libcholmod.a /usr/local/bin/ld: cannot find -llapack cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[4]: *** [Makefile:544: /var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib/libcholmod.so.3.0.12] Error 1 CFLAGS and LDFLAGS used make __MAKE_CONF=/etc/make_test.conf -C /usr/ports/math/suitesparse -VCFLAGS -Vspace -VLDFLAGS -O2 -pipe -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing -L/var/ports/usr/ports/math/suitesparse/work/SuiteSparse/lib -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 -B/usr/local/bin -L/usr/local/lib -fstack-protector Building math/lapack before and after the failure is successful (===> Building package for lapack-3.5.0_8) This using gcc9.0.1 and latest binutils 2.32. Unfortunately I no longer have the requirement for this suite, so this is to help those that experience a similar problem.
(In reply to dewayne from comment #11) As I no longer use suitesparse nor FBSD11, I'm closing this as I'm unable to reproduce the same errors