[Trilinos-Users] [EXTERNAL] Re: Error building trilinos on MacOS

Bradley, Andrew Michael ambradl at sandia.gov
Fri Jun 10 18:34:04 EDT 2016


Hi Rick,


Also, it seems to me that somehow both STKs (classic and mainline) are being enabled. In the first email, I see this:

    make[2]: *** [packages/stk/stk_util/stk_util/util/CMakeFiles/stk_util_util.dir/PageAlignedAllocator.cpp.o] Error 1

which looks like mainline STK. In the most recent, I see

    make[2]: *** [packages/stk/stk_classic/stk_util/stk_util/diag/libstkclassic_util_diag.12.7.dylib] Error 1

which looks like classic STK. Is there maybe something up in the config script that's turning on both?


Andrew



________________________________
From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of Jonathan Hu <jhu at sandia.gov>
Sent: Friday, June 10, 2016 4:27 PM
To: trilinos-users at trilinos.org
Subject: [EXTERNAL] Re: [Trilinos-Users] Error building trilinos on MacOS

Hi Rick,

    You could try keeping Boost enabled but disabe STKClassic:

-D Trilinos_ENABLE_STKClassic:BOOL=OFF

Jonathan

Muller, Richard wrote on 06/10/2016 03:21 PM:
Thanks to some help from Andrew, I’ve progressed, but I’m still not able to compile everything.

Here’s what I’ve learned:

1. Building and installing the boost library works better (in terms of being recognized by the CMAKE configurator) than either just unpacking the directory or using the boost that’s available in macports.

2. The syntax that seems to work is to send the boost directory prefix without the trailing “/include” to the configurator, i.e.
BOOSTDIR=/usr/local
 and then passing
-D Boost_INCLUDE_DIRS:FILEPATH="$BOOSTDIR" \
-D TPL_ENABLE_BoostLib=ON \
-D BoostLib_INCLUDE_DIRS:FILEPATH="$BOOSTDIR" \
-D BoostLib_LIBRARY_DIRS:FILEPATH="$BOOSTDIR/lib" \
to CMAKE (rather than, for example, $BOOTDIR/include). Don’t know why this would work better, maybe there’s something in the root directory that CMAKE needs. Recall there being some comment to that effect after I built boost.

However, I’m still not able to build under macos. When I turn on BoostLib (-D TPL_ENABLE_BoostLib=ON), I get the error:

[ 63%] Linking CXX shared library libstkclassic_util_diag.dylib
clang: warning: argument unused during compilation: '-ansi'
Undefined symbols for architecture x86_64:
  "stk_classic::parallel_machine_rank(int)", referenced from:
      stk_classic::diag::printTimersTable(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, stk_classic::diag::Timer, unsigned long, bool, int) in PrintTimer.cpp.o
  "stk_classic::parallel_machine_size(int)", referenced from:
      stk_classic::diag::printTimersTable(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, stk_classic::diag::Timer, unsigned long, bool, int) in PrintTimer.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [packages/stk/stk_classic/stk_util/stk_util/diag/libstkclassic_util_diag.12.7.dylib] Error 1
make[1]: *** [packages/stk/stk_classic/stk_util/stk_util/diag/CMakeFiles/stkclassic_util_diag.dir/all] Error 2
make: *** [all] Error 2

When I turn off BoostLib (-D TPL_ENABLE_BoostLib=OFF), I get the error:

[ 69%] Linking CXX shared library libstk_util_env.dylib
clang: warning: argument unused during compilation: '-ansi'
Undefined symbols for architecture x86_64:
  "null_streambuf::null_streambuf()", referenced from:
      stk::EnvData::EnvData() in EnvData.cpp.o
  "null_streambuf::~null_streambuf()", referenced from:
      stk::EnvData::EnvData() in EnvData.cpp.o
      stk::EnvData::~EnvData() in EnvData.cpp.o
  "stk::get_heap_used()", referenced from:
      stk::diag::Trace::Trace(stk::diag::Writer&, char const*, int, bool) in Trace.cpp.o
      stk::diag::Trace::~Trace() in Trace.cpp.o
  "stk::all_write_string(int, std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
(continues at some length).

Any suggestions on other things to try?

Rick

On 6/10/16, 1:46 PM, "Bradley, Andrew Michael" <<mailto:ambradl at sandia.gov>ambradl at sandia.gov<mailto:ambradl at sandia.gov>> wrote:


STK does in general use libs, but maybe not in this case. You can try running w/o the LIBRARY line; I have no idea what will happen.


In case you didn't remember this, there's a config script that we worked out back in March on skybridge:

    /ascldap/users/ambradl/Trilinos/build-static

TPLs are here:

    /ascldap/users/ambradl/tpl
Doesn't help you for your local mac build, but it might serve as a guide.


________________________________
From: Muller, Richard
Sent: Friday, June 10, 2016 1:43 PM
To: Bradley, Andrew Michael
Subject: Re: [EXTERNAL] [Trilinos-Users] Error building trilinos on MacOS

The boostlib stuff isn’t configuring. Do I need to have built and installed the libraries first? (Dumb question?)

On 6/10/16, 1:39 PM, "Bradley, Andrew Michael" <ambradl at sandia.gov<mailto:ambradl at sandia.gov>> wrote:


Just to be clear, I mean like this:


   -D TPL_ENABLE_BoostLib=ON \
   -D BoostLib_INCLUDE_DIRS:PATH=[stuff] \
   -D BoostLib_LIBRARY_DIRS:PATH=[stuff if using libs and not just headers] \


________________________________
From: Bradley, Andrew Michael
Sent: Friday, June 10, 2016 1:38 PM
To: Muller, Richard
Subject: Re: [EXTERNAL] [Trilinos-Users] Error building trilinos on MacOS


Right, ok. Go back to the original line (I was wrong about adding "include") and try the BoostLib idea.


________________________________
From: Muller, Richard
Sent: Friday, June 10, 2016 1:37 PM
To: Bradley, Andrew Michael
Subject: Re: [EXTERNAL] [Trilinos-Users] Error building trilinos on MacOS

Here’s the output configuring using:

    -D Boost_INCLUDE_DIRS:FILEPATH="/Users/rmuller/Programs/boost/boost_1_61_0/include" \
    -D Trilinos_VERBOSE_CONFIGURE:BOOL=ON \


Processing enabled TPL: Boost (enabled explicitly, disable with -DTPL_ENABLE_Boost=OFF)
-- Searching for headers in Boost_INCLUDE_DIRS='/Users/rmuller/Programs/boost/boost_1_61_0/include'
-- Searching for a header file in the set "boost/version.hpp":
--   Searching for header 'boost/version.hpp' ...
-- ERROR: Could not find a header file in the set "boost/version.hpp"
-- Searching for a header file in the set "boost/mpl/at.hpp":
--   Searching for header 'boost/mpl/at.hpp' ...
-- ERROR: Could not find a header file in the set "boost/mpl/at.hpp"
-- ERROR: Could not find the include directories for TPL 'Boost'!
-- TIP: If the TPL 'Boost' is on your system then you can set:
     -DBoost_INCLUDE_DIRS='<dir0>;<dir1>;...'
   to point to directories where these header files may be found.
   Or, just set:
     -DTPL_Boost_INCLUDE_DIRS='<dir0>;<dir1>;...'
   to point to the include directories which will bypass any search for
   header files and these include directories will be used without
   question in the build.  (But this will result in a build-time error
   obviously if the necessary header files are not found in these
   include directories.)
-- ERROR: Failed finding all of the parts of TPL 'Boost' (see above), Aborting!

-- NOTE: The find module file for this failed TPL 'Boost' is:
     /Users/rmuller/Programs/trilinos/TrilinosGit/cmake/tribits/common_tpls/FindTPLBoost.cmake
   which is pointed to in the file:
     /Users/rmuller/Programs/trilinos/TrilinosGit/TPLsList.cmake

TIP: Even though the TPL 'Boost' was explicitly enabled in input,
it can be disabled with:
  -DTPL_ENABLE_Boost=OFF
which will disable it and will recursively disable all of the
downstream packages that have required dependencies on it.
When you reconfigure, just grep the cmake stdout for 'Boost'
and then follow the disables that occur as a result to see what impact
this TPL disable has on the configuration of Trilinos.

CMake Error at cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake:127 (MESSAGE):
  ERROR: TPL_Boost_NOT_FOUND=TRUE, aborting!
Call Stack (most recent call first):
  cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1561 (TRIBITS_PROCESS_ENABLED_TPL)
  cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:209 (TRIBITS_PROCESS_ENABLED_TPLS)
  cmake/tribits/core/package_arch/TribitsProject.cmake:93 (TRIBITS_PROJECT_IMPL)
  CMakeLists.txt:93 (TRIBITS_PROJECT)


On 6/10/16, 1:33 PM, "Bradley, Andrew Michael" <<mailto:ambradl at sandia.gov>ambradl at sandia.gov<mailto:ambradl at sandia.gov>> wrote:


Right, so that's where sending the output from

    -D Trilinos_VERBOSE_CONFIGURE:BOOL=ON
would help.


________________________________
From: Muller, Richard
Sent: Friday, June 10, 2016 1:32 PM
To: Bradley, Andrew Michael
Subject: Re: [EXTERNAL] [Trilinos-Users] Error building trilinos on MacOS

Okay, it *doesn’t* configure if I add the “/include" to the end of the path.

On 6/10/16, 1:28 PM, "Bradley, Andrew Michael" <<mailto:ambradl at sandia.gov>ambradl at sandia.gov<mailto:ambradl at sandia.gov>> wrote:


Hi Rich,

Add
    -D Trilinos_VERBOSE_CONFIGURE:BOOL=ON
to your Trilinos config and send the output. I'd like to see what it thinks boost is.


In addition, you might try

    -D Boost_INCLUDE_DIRS:FILEPATH="/Users/rmuller/Programs/boost/boost_1_61_0/include"
if that is indeed the include directory; the original line might just be off by that.

Cheers,
Andrew

________________________________
From: Trilinos-Users <<mailto:trilinos-users-bounces at trilinos.org>trilinos-users-bounces at trilinos.org<mailto:trilinos-users-bounces at trilinos.org>> on behalf of Muller, Richard <<mailto:rmuller at sandia.gov>rmuller at sandia.gov<mailto:rmuller at sandia.gov>>
Sent: Friday, June 10, 2016 1:25 PM
To: <mailto:trilinos-users at trilinos.org> trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>
Subject: [EXTERNAL] [Trilinos-Users] Error building trilinos on MacOS

I’m trying to build trilinos on MacOS 10.11.5 (El Capitan). Building from the github archive. Got the error:

[ 68%] Building CXX object packages/stk/stk_util/stk_util/util/CMakeFiles/stk_util_util.dir/PageAlignedAllocator.cpp.o
In file included from /Users/rmuller/Programs/trilinos/TrilinosGit/packages/stk/stk_util/stk_util/util/PageAlignedAllocator.cpp:35:
/Users/rmuller/Programs/trilinos/TrilinosGit/packages/stk/stk_util/stk_util/util/PageAlignedAllocator.hpp:37:10: fatal error:
      'boost/type_traits/is_same.hpp' file not found
#include <boost/type_traits/is_same.hpp>  // for is_same
         ^
1 error generated.
make[2]: *** [packages/stk/stk_util/stk_util/util/CMakeFiles/stk_util_util.dir/PageAlignedAllocator.cpp.o] Error 1
make[1]: *** [packages/stk/stk_util/stk_util/util/CMakeFiles/stk_util_util.dir/all] Error 2
make: *** [all] Error 2

I’m using boost 1.61 (also tried with v1.59). The file /Users/rmuller/Programs/boost/boost_1_61_0/boost/type_traits/is_same.hpp exists on my computer, and in my CMAKE configuration file I have:
    -D Boost_INCLUDE_DIRS:FILEPATH="/Users/rmuller/Programs/boost/boost_1_61_0"
defined.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


Any suggestions for how to get around this?




_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at trilinos.org<mailto:Trilinos-Users at trilinos.org>
https://trilinos.org/mailman/listinfo/trilinos-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160610/e7a63942/attachment.html>


More information about the Trilinos-Users mailing list