This issue has caused another ghemical FTBFS in Ubuntu, see LP: #1277718 [1].
The attached updated 11_ld_as_needed.patch fixes the FTBFS by linking
libSCbasis to liblapack to resolve dgesvd_.

[1] https://bugs.launchpad.net/ubuntu/+source/ghemical/+bug/1277718
--- a/src/lib/math/scmat/Makefile
+++ b/src/lib/math/scmat/Makefile
@@ -63,6 +63,8 @@
        result.h vector3.h vector3_i.h block.h matrix3.h elemop.h repl.h \
        blocked.h disthql.h dim.h
 
+LTLINKLIBOPTS += -lblas -lgfortran
+
 GENINC =
 
 DEPENDINCLUDE = $(INC) $(GENINC)
--- a/src/lib/chemistry/qc/Makefile
+++ b/src/lib/chemistry/qc/Makefile
@@ -33,7 +33,7 @@
 include $(SRCDIR)/$(TOPDIR)/lib/GlobalMakefile
 include $(TOPDIR)/lib/Makedirlist
 
-SUBDIRS = basis oint3 intv3 wfn scf dft mbpt
+SUBDIRS = basis oint3 intv3 dft wfn scf mbpt
 ifeq ($(HAVE_SC_SRC_LIB_CHEMISTRY_QC_PSI),yes)
 SUBDIRS := $(SUBDIRS) psi
 endif
--- a/src/lib/chemistry/qc/wfn/Makefile
+++ b/src/lib/chemistry/qc/wfn/Makefile
@@ -48,6 +48,8 @@
 
 LIBS = $(shell $(LISTLIBS) $(INCLUDE) $(SRCDIR)/../dft/LIBS.h)
 
+LTLINKLIBOPTS += $(TOPDIR)/lib/libSCdft.la
+
 wfntest:: wfntest.$(OBJSUF) $(LIBS)
 	$(LTLINK) $(CXX) $(LDFLAGS) -o wfntest $^ $(SYSLIBS) $(LTLINKBINOPTS)
 
--- a/src/lib/chemistry/qc/basis/Makefile
+++ b/src/lib/chemistry/qc/basis/Makefile
@@ -50,6 +50,8 @@
       sobasis.h sointegral.h \
       orthog.h gpetite.h distshpair.h
 
+LTLINKLIBOPTS += -llapack
+
 TESTSRC = btest.cc
 TESTOBJ = $(TESTSRC:%.cc=%.$(OBJSUF))
 TESTFILES = btest.kv

Reply via email to