[Trilinos-Users] [EXTERNAL] Fwd: Trilinos 12.4.2 compilation error on Mac OS X El Capitan 10.11.2

Bradley, Andrew Michael ambradl at sandia.gov
Tue Dec 22 20:43:25 EST 2015


Hi Sai,


The problem you are having is that (i) your system's Fortran compiler evidently prefixes symbols with an underscore (e.g., _cdr1ch_ has a prefixed _), (ii) a number of Fortran-to-C calls happen in packages/seacas, and (iii) the macro decorations for the C functions that are meant to compensate for the Fortran underscore convention are not working in this case.


I believe a complication is that the seacas Fortran-to-C macros are implemented internally in seacas rather than through Trilinos's TriBITS's more flexible cmake-controlled macros.


Depending on what you need from seacas, there are at least two easy workarounds. First, you could simply turn seacas off:

  -D Trilinos_ENABLE_SEACAS:BOOL=OFF \

I suspect you want it on, however, since it is explicitly turned on in your script. In that case, second, disable a subset of seacas subpackages and see if you get past this error:

  -D TPL_ENABLE_X11:BOOL=OFF \

I find that seacas users often don't need the subset associated with X11, so this line is a quick way to disable a fair number of rarely used seacas subpackages.


If you still run into problems, then I think it will be necessary for you to do some reading on your system's Fortran compiler. Ideally, you would be able to pass it a flag (via -D CMAKE_Fortran_FLAGS="...") to make it follow the more typical convention of only suffixing (not prefixing) Fortran symbols with an underscore. Another option, if it ends up being available to us (that is, if the code in question uses the macro in the first place), is to use TriBITS's F77_FUNC lines to decorate the Fortran symbols appropriately.


Andrew


________________________________
From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of Sai P Uppati <uppatis at utexas.edu>
Sent: Tuesday, December 22, 2015 5:43 PM
To: trilinos-users at trilinos.org
Subject: [EXTERNAL] [Trilinos-Users] Fwd: Trilinos 12.4.2 compilation error on Mac OS X El Capitan 10.11.2

I'm using the following cmake configure script:

rm -rf CMakeFiles CMakeCache.txt

MPI_HOME=/usr/local
EXTRA_ARGS=$@

cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr/local/trilinos/ \
  \
  -D MPI_BASE_DIR:PATH=$MPI_HOME \
  \
  -D CMAKE_BUILD_TYPE:STRING=Debug \
  -D CMAKE_Fortran_COMPILER:FILEPATH=/usr/local/bin/mpif90 \
  -D CMAKE_CXX_FLAGS:STRING="-Wno-unused -I/usr/local/include -stdlib=libc++" \
  -D CMAKE_MACOSX_RPATH:BOOL=OFF \
  -D BUILD_SHARED_LIBS:BOOL=ON \
  -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \
  \
  -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
  -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \
  -D Trilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES:BOOL=ON \
  -D Trilinos_ENABLE_Teuchos:BOOL=ON \
  -D Trilinos_ENABLE_Shards:BOOL=ON \
  -D Trilinos_ENABLE_Sacado:BOOL=ON \
  -D Trilinos_ENABLE_Epetra:BOOL=ON \
  -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
  -D Trilinos_ENABLE_Ifpack:BOOL=ON \
  -D Trilinos_ENABLE_AztecOO:BOOL=ON \
  -D Trilinos_ENABLE_Belos:BOOL=ON \
  -D Trilinos_ENABLE_Phalanx:BOOL=ON \
  -D Phalanx_EXPLICIT_TEMPLATE_INSTANTIATION:BOOL=ON \
  -D Trilinos_ENABLE_Zoltan:BOOL=ON \
  -D Trilinos_ENABLE_STK:BOOL=OFF \
  -D Trilinos_ENABLE_SEACAS:BOOL=ON \
  -D Trilinos_ENABLE_SECONDARY_STABLE_CODE:BOOL=ON \
  -D Trilinos_ENABLE_NOX:BOOL=ON \
  -D Trilinos_ENABLE_Intrepid:BOOL=ON \
  -D Trilinos_ENABLE_Isorropia:BOOL=ON \
  -D Trilinos_ENABLE_MueLu:BOOL=OFF \
  -D Trilinos_ENABLE_FEI:BOOL=OFF \
  -D Trilinos_ENABLE_Sundance:BOOL=OFF \
  -D Trilinos_ENABLE_Piro:BOOL=ON \
  -D Trilinos_ENABLE_Pamgen:BOOL=ON \
  -D Trilinos_ENABLE_PyTrilinos:BOOL=OFF \
  \
  -D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \
  -D Trilinos_ENABLE_TESTS:BOOL=OFF \
  \
  -D TPL_ENABLE_MATLAB:BOOL=OFF \
  -D TPL_ENABLE_Matio:BOOL=OFF \
  -D TPL_ENABLE_QT:BOOL=OFF \
  -D TPL_ENABLE_GLM:BOOL=OFF \
  -D TPL_ENABLE_Netcdf:BOOL=ON \
  -D Netcdf_INCLUDE_DIRS:PATH=$MPI_HOME/netcdf/include \
  -D Netcdf_LIBRARY_DIRS:PATH=$MPI_HOME/netcdf/lib \
  -D TPL_ENABLE_MPI:BOOL=ON \
  -D TPL_ENABLE_BLAS:BOOL=ON \
  -D TPL_ENABLE_LAPACK:BOOL=ON \
  -D TPL_LAPACK_LIBRARIES:STRING=/usr/lib/liblapack.dylib \
  -D TPL_ENABLE_Boost:BOOL=ON \
  -D TPL_Boost_INCLUDE_DIRS:PATH=$MPI_HOME/include/boost \
  \
  -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
  -D Trilinos_VERBOSE_CONFIGURE:BOOL=OFF \
  -D Trilinos_ASSERT_MISSING_PACKAGES=OFF \
  \
  $EXTRA_ARGS \
  ..

The configuration seems to complete fine. Once the build files are generated, I start compiling with:

make -j8

Around 12% of the compilation, I get the following error:

[ 12%] Linking Fortran shared library libsvdi_cgi.dylib
[ 12%] Building C object packages/seacas/libraries/exodus/cbind/CMakeFiles/exodus.dir/src/ex_int_get_block_param.c.o
[ 12%] Building C object packages/zoltan/src/CMakeFiles/zoltan.dir/reftree/reftree_coarse_path.c.o
[ 12%] Building C object packages/seacas/libraries/exodus/cbind/CMakeFiles/exodus.dir/src/ex_ne_util.c.o
Undefined symbols for architecture x86_64:
  "_cdr1ch_", referenced from:
      _wpstkl_ in pst_vdipst.f.o
      _wmet05_ in met_vdimet.f.o
      _wmetkl_ in met_vdimet.f.o
  "_cdra2c_", referenced from:
      _wpstix_ in pst_vdipst.f.o
  "_cdrcvt_", referenced from:
      _wpstkl_ in pst_vdipst.f.o
      _wmet05_ in met_vdimet.f.o
      _wmetkl_ in met_vdimet.f.o
  "_cdrela_", referenced from:
      _master.1.wpstmo_ in pst_vdipst.f.o
      _master.1.wmetmo_ in met_vdimet.f.o
  "_cdrgnm_", referenced from:
      _wpstgn_ in pst_vdipst.f.o
      _wmetgn_ in met_vdimet.f.o
  "_cdri2c_", referenced from:
      _wpst13_ in pst_vdipst.f.o
      _wpstcs_ in pst_vdipst.f.o
      _wpstlw_ in pst_vdipst.f.o
      _master.2.wpstls_ in pst_vdipst.f.o
      _wpstii_ in pst_vdipst.f.o
  "_cdrmon_", referenced from:
      _master.1.wpstmo_ in pst_vdipst.f.o
      _master.1.wmetmo_ in met_vdimet.f.o
  "_cdrtbk_", referenced from:
      _wpstle_ in pst_vdipst.f.o
      _wmetle_ in met_vdimet.f.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [packages/seacas/libraries/svdi/libsvdi_cgi.12.4.2.dylib] Error 1
make[1]: *** [packages/seacas/libraries/svdi/CMakeFiles/svdi_cgi.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 12%] Building CXX object packages/pamgen/src/CMakeFiles/pamgen.dir/radial_trisection_inline_mesh_desc.C.o
[ 12%] Building C object packages/seacas/libraries/exodus/cbind/CMakeFiles/exodus.dir/src/ex_open.c.o

I'm not sure what to make of it. I have the following dependencies installed:

1. boost 1.59.0
2. hdf5 1.8.16
3. netcdf 4.3.3.1

Any advice on this issue is appreciated. Thanks!

--
Sai Uppati
UT Austin
[https://mailfoogae.appspot.com/t?sender=adXBwYXRpc0B1dGV4YXMuZWR1&type=zerocontent&guid=1a10c717-0328-4234-bce5-fdf80a4bb1e9]?

[https://mailfoogae.appspot.com/t?sender=adXBwYXRpc0B1dGV4YXMuZWR1&type=zerocontent&guid=94b1b8de-afa8-4be4-b0d3-49c5c722a1ce]?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20151223/003dacdc/attachment.html>


More information about the Trilinos-Users mailing list