Electrostatics / apbs

Software for biomolecular electrostatics and solvation calculations
http://www.poissonboltzmann.org/
Other
91 stars 24 forks source link

Configuration/Build Error under Ubuntu and CentOS #222

Closed nsoblath closed 2 years ago

nsoblath commented 2 years ago

Hi,

I'm getting the same error on both Ubuntu 20 and CentOS 7 with umfpack installed. It looks like BLAS is being built too although it is installed as well.

$ git clone https://github.com/Electrostatics/apbs
$ cd apbs
$ mkdir build; cd $_
$ cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Install prefix: /data/Misc/apbs/build
-- 
-- APBS Static build: ON
-- Building shared libs: OFF
-- Find-library suffixes: .a;.so;.a
-- 
-- Building FETK from commit 857a0cf6ae40410471ea10f0e67e370cbd8ed6a3
-- FETK set_basic_vars_and_paths: FALSE, FETK
-- Setting project paths
-- Install prefix: /data/Misc/apbs/build
-- FETK static build: ON
-- Building shared libs: OFF
-- Find-library suffixes: .a;.a;.so;.a
Configuring build for MALOC
-- FETK set_basic_vars_and_paths: FALSE, maloc
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of mode_t
-- Check size of mode_t - done
-- Check size of pid_t
-- Check size of pid_t - done
-- Check size of size_t
-- Check size of size_t - done
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file sys/socket.h
-- Looking for include file sys/socket.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/un.h
-- Looking for include file sys/un.h - found
-- Looking for include file sys/wait.h
-- Looking for include file sys/wait.h - found
-- Looking for include file netinet/in.h
-- Looking for include file netinet/in.h - found
-- Looking for include file arpa/inet.h
-- Looking for include file arpa/inet.h - found
-- Looking for include file netdb.h
-- Looking for include file netdb.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file rpc/rpc.h
-- Looking for include file rpc/rpc.h - found
-- Looking for getcwd
-- Looking for getcwd - found
-- Looking for O_NONBLOCK
-- Looking for O_NONBLOCK - found
-- Type: INTERNAL_HEADERS
-- Items: /data/Misc/apbs/build/_deps/fetk-build/maloc/src/maloccf.h
-- Type: SOURCES
-- Items: maloc_base.c
-- Type: EXTERNAL_HEADERS
-- Items: maloc/maloc.h;maloc/maloc_base.h
-- Type: INTERNAL_HEADERS
-- Items: maloc_base_p.h
-- Type: SOURCES
-- Items: psh.c;vcom.c;vmp.c;vmpi.c
-- Type: EXTERNAL_HEADERS
-- Items: maloc/psh.h;maloc/vcom.h;maloc/vmp.h;maloc/vmpi.h
-- Type: INTERNAL_HEADERS
-- Items: psh_p.h;vcom_p.h;vmpi_p.h;vmp_p.h
-- Type: SOURCES
-- Items: vlex.c;vpars.c;vpup.c;vsh.c;vyacc.c
-- Type: EXTERNAL_HEADERS
-- Items: maloc/vsh.h
-- Type: INTERNAL_HEADERS
-- Items: vpup.h;vsh_p.h;vyacc.h
-- Type: SOURCES
-- Items: vio.c;viofb.c;vmem.c;vnm.c;vnmfb.c;vpred.c;vset.c;ziofb.c
-- Type: EXTERNAL_HEADERS
-- Items: maloc/vio.h;maloc/vmem.h;maloc/vnm.h;maloc/vset.h;maloc/vsys.h;maloc/vpred.h
-- Type: INTERNAL_HEADERS
-- Items: vio_p.h;vmem_p.h;vnm_p.h;vpred_p.h;vset_p.h
Configuring build for PUNC
-- FETK set_basic_vars_and_paths: FALSE, punc
-- Will build vf2c
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Could NOT find BLAS (missing: BLAS_LIBRARIES) 
-- Will build BLAS
-- Building vf2c
-- Type: EXTERNAL_HEADERS
-- Items: punc/varpack.h;punc/vblas.h;punc/vcgcode.h;punc/vlapack.h;punc/vpmg.h;punc/vf2c.h
-- Type: INTERNAL_HEADERS
-- Items: f2c.h;fio.h;fmt.h;fp.h;lio.h;rawio.h;signal1.h;sysdep1.h
-- Type: SOURCES
-- Items: f77vers.c;i77vers.c;s_rnge.c;abort_.c;exit_.c;getarg_.c;iargc_.c;getenv_.c;signal_.c;s_stop.c;s_paus.c;system_.c;cabs.c;derf_.c;derfc_.c;erf_.c;erfc_.c;sig_die.c;uninit.c;pow_ci.c;pow_dd.c;pow_di.c;pow_hh.c;pow_ii.c;pow_ri.c;pow_zi.c;pow_zz.c;c_abs.c;c_cos.c;c_div.c;c_exp.c;c_log.c;c_sin.c;c_sqrt.c;z_abs.c;z_cos.c;z_div.c;z_exp.c;z_log.c;z_sin.c;z_sqrt.c;r_abs.c;r_acos.c;r_asin.c;r_atan.c;r_atn2.c;r_cnjg.c;r_cos.c;r_cosh.c;r_dim.c;r_exp.c;r_imag.c;r_int.c;r_lg10.c;r_log.c;r_mod.c;r_nint.c;r_sign.c;r_sin.c;r_sinh.c;r_sqrt.c;r_tan.c;r_tanh.c;d_abs.c;d_acos.c;d_asin.c;d_atan.c;d_atn2.c;d_cnjg.c;d_cos.c;d_cosh.c;d_dim.c;d_exp.c;d_imag.c;d_int.c;d_lg10.c;d_log.c;d_mod.c;d_nint.c;d_prod.c;d_sign.c;d_sin.c;d_sinh.c;d_sqrt.c;d_tan.c;d_tanh.c;i_abs.c;i_dim.c;i_dnnt.c;i_indx.c;i_len.c;i_mod.c;i_nint.c;i_sign.c;lbitbits.c;lbitshft.c;h_abs.c;h_dim.c;h_dnnt.c;h_indx.c;h_len.c;h_mod.c;h_nint.c;h_sign.c;l_ge.c;l_gt.c;l_le.c;l_lt.c;hl_ge.c;hl_gt.c;hl_le.c;hl_lt.c;ef1asc_.c;ef1cmc_.c;f77_aloc.c;s_cat.c;s_cmp.c;s_copy.c;dtime_.c;etime_.c;backspac.c;close.c;dfe.c;dolio.c;due.c;endfile.c;err.c;fmt.c;fmtlib.c;ftell_.c;iio.c;ilnw.c;inquire.c;lread.c;lwrite.c;open.c;rdfmt.c;rewind.c;rsfe.c;rsli.c;rsne.c;sfe.c;sue.c;typesize.c;uio.c;util.c;wref.c;wrtfmt.c;wsfe.c;wsle.c;wsne.c;xwsne.c;main.c
-- Building cgcode
-- Type: INTERNAL_HEADERS
-- Items: vcgcode.h
-- Type: SOURCES
-- Items: scgdrv.c;scg.c;scr.c;scrind.c;spcg.c;scgnr.c;scgne.c;spcgnr.c;spcgne.c;sppcg.c;spcgca.c;sdpchb.c;scbfix.c;sckchb.c;scgchk.c;sonest.c;msstop.c;r1mach.c;sratqr.c;dcgdrv.c;dcg.c;dcr.c;dcrind.c;dpcg.c;dcgnr.c;dcgne.c;dpcgnr.c;dpcgne.c;dppcg.c;dpcgca.c;ddpchb.c;dcbfix.c;dckchb.c;dcgchk.c;donest.c;mdstop.c;d1mach.c;dratqr.c;depsln.c
-- Building pmg
-- Type: INTERNAL_HEADERS
-- Items: vpmg.h
-- Type: SOURCES
-- Items: buildAd.c;buildBd.c;buildGd.c;buildPd.c;cgd.c;cgmgd.c;cgmgdrvd.c;gsd.c;matvecd.c;mblasd.c;mgcsd.c;mgdrvd.c;mgfasd.c;mgsubd.c;mikpckd.c;mlinpckd.c;ncgd.c;ncgdrvd.c;newdrvd.c;newtond.c;ngsd.c;ngsdrvd.c;ninterpd.c;nrchd.c;nrchdrvd.c;nsmoothd.c;nsord.c;nsordrvd.c;nwjd.c;nwjdrvd.c;powerd.c;rchd.c;smoothd.c;sord.c;wjd.c
-- Building blas
-- Type: INTERNAL_HEADERS
-- Items: vblas.h
-- Type: SOURCES
-- Items: lsame.c;xerbla.c;isamax.c;sasum.c;saxpy.c;scopy.c;sdot.c;snrm2.c;srot.c;srotg.c;sscal.c;sswap.c;idamax.c;dasum.c;daxpy.c;dcopy.c;ddot.c;dnrm2.c;drot.c;drotg.c;dscal.c;dswap.c;scasum.c;scnrm2.c;icamax.c;caxpy.c;ccopy.c;cdotc.c;cdotu.c;csscal.c;crotg.c;cscal.c;cswap.c;dcabs1.c;dzasum.c;dznrm2.c;izamax.c;zaxpy.c;zcopy.c;zdotc.c;zdotu.c;zdscal.c;zrotg.c;zscal.c;zswap.c;sgemv.c;sgbmv.c;ssymv.c;ssbmv.c;sspmv.c;strmv.c;stbmv.c;stpmv.c;strsv.c;stbsv.c;stpsv.c;sger.c;ssyr.c;sspr.c;ssyr2.c;sspr2.c;dgemv.c;dgbmv.c;dsymv.c;dsbmv.c;dspmv.c;dtrmv.c;dtbmv.c;dtpmv.c;dtrsv.c;dtbsv.c;dtpsv.c;dger.c;dsyr.c;dspr.c;dsyr2.c;dspr2.c;cgemv.c;cgbmv.c;chemv.c;chbmv.c;chpmv.c;ctrmv.c;ctbmv.c;ctpmv.c;ctrsv.c;ctbsv.c;ctpsv.c;cgerc.c;cgeru.c;cher.c;chpr.c;cher2.c;chpr2.c;zgemv.c;zgbmv.c;zhemv.c;zhbmv.c;zhpmv.c;ztrmv.c;ztbmv.c;ztpmv.c;ztrsv.c;ztbsv.c;ztpsv.c;zgerc.c;zgeru.c;zher.c;zhpr.c;zher2.c;zhpr2.c;sgemm.c;ssymm.c;ssyrk.c;ssyr2k.c;strmm.c;strsm.c;dgemm.c;dsymm.c;dsyrk.c;dsyr2k.c;dtrmm.c;dtrsm.c;cgemm.c;csymm.c;csyrk.c;csyr2k.c;ctrmm.c;ctrsm.c;chemm.c;cherk.c;cher2k.c;zgemm.c;zsymm.c;zsyrk.c;zsyr2k.c;ztrmm.c;ztrsm.c;zhemm.c;zherk.c;zher2k.c;sdsdot.c;dsdot.c;srotm.c;srotmg.c;drotm.c;drotmg.c;csrot.c;zdrot.c
-- Building arpack
-- Type: INTERNAL_HEADERS
-- Items: varpack.h
-- Type: SOURCES
-- Items: sgetv0.c;slaqrb.c;sstqrb.c;ssortc.c;ssortr.c;sstatn.c;sstats.c;snaitr.c;snapps.c;snaup2.c;snaupd.c;snconv.c;sneigh.c;sngets.c;ssaitr.c;ssapps.c;ssaup2.c;ssaupd.c;ssconv.c;sseigt.c;ssgets.c;sneupd.c;sseupd.c;ssesrt.c;dgetv0.c;dlaqrb.c;dstqrb.c;dsortc.c;dsortr.c;dstatn.c;dstats.c;dnaitr.c;dnapps.c;dnaup2.c;dnaupd.c;dnconv.c;dneigh.c;dngets.c;dsaitr.c;dsapps.c;dsaup2.c;dsaupd.c;dsconv.c;dseigt.c;dsgets.c;dneupd.c;dseupd.c;dsesrt.c;cnaitr.c;cnapps.c;cnaup2.c;cnaupd.c;cneigh.c;cneupd.c;cngets.c;cgetv0.c;csortc.c;cstatn.c;znaitr.c;znapps.c;znaup2.c;znaupd.c;zneigh.c;zneupd.c;zngets.c;zgetv0.c;zsortc.c;zstatn.c;cmout.c;cvout.c;dmout.c;dvout.c;icnteq.c;icopy.c;iset.c;iswap.c;ivout.c;second.c;smout.c;svout.c;zmout.c;zvout.c
CMake Warning (dev) at build/_deps/superlu-src/CMakeLists.txt:11 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

Process XSDK defaults ...
USE_XSDK_DEFAULTS = 'FALSE'
-- SuperLU will be built as a static library.
-- Did not find or specify BLAS so configure to build internal CBLAS ...
CMake Error at build/_deps/superlu-src/CBLAS/CMakeLists.txt:82 (add_library):
  add_library cannot create target "blas" because another target with the
  same name already exists.  The existing target is a static library created
  in source directory "/data/Misc/apbs/build/_deps/fetk-src/punc/src/blas".
  See documentation for policy CMP0002 for more details.

-- Type: INTERNAL_HEADERS
-- Items: /data/Misc/apbs/build/_deps/fetk-build/punc/src/punccf.h
-- Type: SOURCES
-- Items: punc_base.c
-- Type: EXTERNAL_HEADERS
-- Items: punc/punc.h;punc/punc_base.h
-- Type: INTERNAL_HEADERS
-- Items: punc_base_p.h
Configuring build for GAMER
-- FETK set_basic_vars_and_paths: FALSE, gamer
-- Type: INTERNAL_HEADERS
-- Items: /data/Misc/apbs/build/_deps/fetk-build/gamer/src/gamercf.h
-- Type: SOURCES
-- Items: gamer_base.c
-- Type: EXTERNAL_HEADERS
-- Items: gamer/gamer.h;gamer/gamer_base.h
-- Type: INTERNAL_HEADERS
-- Items: gamer_base_p.h
-- Type: SOURCES
-- Items: triangle.c
-- Type: EXTERNAL_HEADERS
-- Items: gamer/triangle.h
-- Type: INTERNAL_HEADERS
-- Items: triangle_p.h
-- Type: SOURCES
-- Items: predicates.cpp;tetgen.cpp
-- Type: EXTERNAL_HEADERS
-- Items: gamer/tetgen.h
-- Type: INTERNAL_HEADERS
-- Items: tetgen_p.h
-- Type: SOURCES
-- Items: CorrectNormals.C;GenerateSphereMesh.C;MarchingCube.C;PDB2Mesh.C;PDB2Volume.C;ReadLattice.C;ReadPDB.C;ReadWriteMesh.C;RegionGrowing.C;SurfaceMesh.C;SurfExtract.C;SurfRefine.C;SurfSmooth.C
-- Type: EXTERNAL_HEADERS
-- Items: gamer/biom.h
-- Type: INTERNAL_HEADERS
-- Items: MarchingCube.h;PDB2Volume.h
Configuring build for MC
-- FETK set_basic_vars_and_paths: FALSE, mc
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find UMFPACK (missing: UMFPACK_INCLUDES UMFPACK_LIBRARIES
  UMFPACK_LIBDIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  build/_deps/fetk-src/cmake/FindUMFPACK.cmake:36 (find_package_handle_standard_args)
  build/_deps/fetk-src/mc/CMakeLists.txt:37 (find_package)

-- Configuring incomplete, errors occurred!
See also "/data/Misc/apbs/build/CMakeFiles/CMakeOutput.log".
See also "/data/Misc/apbs/build/CMakeFiles/CMakeError.log".

Originally posted by @rokdev in https://github.com/Electrostatics/apbs/issues/218#issuecomment-1098123550

nsoblath commented 2 years ago

OK, I got a bit of progress with this. Looking at your Docker file helped. The missing libraries on Ubuntu are: libsuitesparse-dev and libopenblas-serial-dev. After installing these the configuration succeeds. However, the make step fails with this:

[100%] Linking CXX static library libapbs_routines.a
[100%] Built target apbs_routines
Scanning dependencies of target apbs
[100%] Building C object src/CMakeFiles/apbs.dir/main.c.o
[100%] Linking CXX executable apbs
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libcholmod.a(cholmod_metis.o): in function `cholmod_metis_bisector': (.text+0x229): undefined reference to `METIS_ComputeVertexSeparator'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libcholmod.a(cholmod_metis.o): in function `cholmod_metis': (.text+0x72b): undefined reference to `METIS_NodeND'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/apbs.dir/build.make:127: src/apbs] Error 1
make[1]: *** [CMakeFiles/Makefile2:1999: src/CMakeFiles/apbs.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Although METIS is listed as an optional component during cmake.

I did not get past the cmake step on CentOS even with openblas-devel and suitesparse-devel installed.

I must say, the installation process seems very fragile right now.

Originally posted by @rokdev in https://github.com/Electrostatics/apbs/issues/218#issuecomment-1098326762

nsoblath commented 2 years ago

@rokdev I moved your comments to a new issue, here, since they appear to be at least partially distinct from the error reported in #218.

nsoblath commented 2 years ago

We now have a working CentOS build using Dockerfile.centos in branch nsoblath/issue_222.

Additionally, we fixed the Ubuntu Docker build by switching to a shared-library build. There's likely a conflict between the way libpython.a was compiled and how APBS is being compiled. It's probably possible to fix the static build by matching the flags used for libpython.a, but there's no strong motivation for it at this point.

nsoblath commented 2 years ago

@rokdev I hope the additional Docker build (Dockerfile.centos) can help you figure out what's missing from your own CentOS-based build.

I do agree that the installation process is a bit fragile, in particular being sensitive to the dependencies that are installed. Working on this issue has helped us understand some of those considerations.

We're going to move ahead with the PR (#223) that includes these changes. If there's a particular feature that you need that's not supported, or something else in the configuration and build that's not working, please let us know in a new issue.

rokdev commented 2 years ago

Thanks, this is very useful! I can now confirm Centos 7 builds OK.

Thank you!