bright-dev / Bright-lite

Other
1 stars 6 forks source link

Build error finding hdf5.h #15

Closed jbae11 closed 7 years ago

jbae11 commented 7 years ago

Hello, @FlanFlanagan hopefully I found the right version of Bright-lite to try to build.

I am trying to build bright-lite, and it seems like it can't find the hdf5.h..

dkadkf@arfc-100 ~/github/Bright-lite (master) $ python install.py 
/usr/bin/cmake

CMAKE_MODULE_PATH /share/cmake-2.8/Modules;/home/dkadkf/github/Bright-lite/cmake
cyclus bin dir: /home/dkadkf/.local/bin/cyclus
-- Using /home/dkadkf/.local as CYCLUS_ROOT_DIR.
-- Found Cyclus Core Headers : /home/dkadkf/.local/include/cyclus
-- Found Cyclus Core Test Headers : /home/dkadkf/.local/include/cyclus/home/dkadkf/.local/include/cyclus
-- Found Cyclus Core Shared Data : /home/dkadkf/.local/share/cyclus
-- Found Cyclus Core Library : /home/dkadkf/.local/lib/libcyclus.so
-- Found Cyclus Test Libraries : /home/dkadkf/.local/lib/cyclus/libgtest.so/home/dkadkf/.local/lib/cyclus/libbaseagentunittests.so
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3") 
-- Checking for module 'glib-2.0'
--   Found glib-2.0, version 2.48.2
-- Found glib-2.0: /home/dkadkf/anaconda3/include/glib-2.0, /home/dkadkf/anaconda3/lib/libglib-2.0.so
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'sigc++-2.0'
--   Found sigc++-2.0, version 2.6.2
-- Found SigC++ 
-- Checking for module 'glibmm-2.4'
--   Found glibmm-2.4, version 2.46.3
-- Found Glibmm 
-- Checking for module 'libxml++-2.6'
--   Found libxml++-2.6, version 2.40.1
-- Found LibXML++ 
--LIBS: /home/dkadkf/.local/lib/libcyclus.so;/usr/lib/x86_64-linux-gnu/libxml++-2.6.so;/usr/lib/x86_64-linux-gnu/libxml2.so;/usr/lib/x86_64-linux-gnu/libglibmm-2.4.so;/home/dkadkf/anaconda3/lib/libglib-2.0.so;/usr/lib/x86_64-linux-gnu/libsigc-2.0.so
--LD_LIBRARY_PATH: 
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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  
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
    Found LAPACK Libraries: /usr/lib/liblapack.so;/usr/lib/libblas.so
-- Found HDF5: /home/dkadkf/anaconda3/lib/libhdf5_hl.so;/home/dkadkf/anaconda3/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/dkadkf/anaconda3/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so  
    COIN Root Dir: 
-- COIN_ROOT_DIR hint is : 
-- Coin multiple library dependency status:
    COIN Include Dir: /usr/include/coin
    COIN CBC: /usr/lib/x86_64-linux-gnu/libCbc.so
    COIN CBC solver: /usr/lib/x86_64-linux-gnu/libCbcSolver.so
    COIN CGL: /usr/lib/x86_64-linux-gnu/libCgl.so
    COIN CLP: /usr/lib/x86_64-linux-gnu/libClp.so
    COIN UTILS: /usr/lib/x86_64-linux-gnu/libCoinUtils.so
    COIN OSI: /usr/lib/x86_64-linux-gnu/libOsi.so
    COIN OSI CLP: /usr/lib/x86_64-linux-gnu/libOsiClp.so
    COIN ZLIB: /home/dkadkf/anaconda3/lib/libz.so
    COIN BZ2: /usr/lib/x86_64-linux-gnu/libbz2.so
-- Found COIN: /usr/include/coin  
-- Found COIN Include Dirs: /usr/include/coin
-- Starting construction of build files for agent: reactor_facility
-- Executing /home/dkadkf/.local/include/cyclus/../../bin/cycpp.py /home/dkadkf/github/Bright-lite/src/reactor_facility.cc --cpp-path=cpp -o=/home/dkadkf/github/Bright-lite/build/ReactorFacility/reactor_facility.cc --pass3-use-orig -I=:/home/dkadkf/.local/include/cyclus:/usr/include/libxml++-2.6:/usr/include/glibmm-2.4:/usr/lib/x86_64-linux-gnu/glibmm-2.4/include:/home/dkadkf/anaconda3/include/glib-2.0:/usr/lib/x86_64-linux-gnu/glib-2.0/include:/usr/include/sigc++-2.0:/usr/lib/x86_64-linux-gnu/sigc++-2.0/include:/usr/lib/x86_64-linux-gnu/libxml++-2.6/include:/usr/include:/usr/include/coin:/home/dkadkf/.local/include/cyclus:/home/dkadkf/.local/include/cyclus:/home/dkadkf/.local/include/cyclus:/home/dkadkf/github/Bright-lite/src
In file included from /home/dkadkf/.local/include/cyclus/agent.h:15:0,
                 from /home/dkadkf/.local/include/cyclus/context.h:17,
                 from /home/dkadkf/.local/include/cyclus/cyclus.h:9,
                 from /home/dkadkf/github/Bright-lite/src/reactor_facility.h:7,
                 from /home/dkadkf/github/Bright-lite/src/reactor_facility.cc:1:
/home/dkadkf/.local/include/cyclus/pyne.h:349:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
-- Executing /home/dkadkf/.local/include/cyclus/../../bin/cycpp.py /home/dkadkf/github/Bright-lite/src/reactor_facility.h --cpp-path=cpp -o=/home/dkadkf/github/Bright-lite/build/ReactorFacility/reactor_facility.h --pass3-use-orig -I=:/home/dkadkf/.local/include/cyclus:/usr/include/libxml++-2.6:/usr/include/glibmm-2.4:/usr/lib/x86_64-linux-gnu/glibmm-2.4/include:/home/dkadkf/anaconda3/include/glib-2.0:/usr/lib/x86_64-linux-gnu/glib-2.0/include:/usr/include/sigc++-2.0:/usr/lib/x86_64-linux-gnu/sigc++-2.0/include:/usr/lib/x86_64-linux-gnu/libxml++-2.6/include:/usr/include:/usr/include/coin:/home/dkadkf/.local/include/cyclus:/home/dkadkf/.local/include/cyclus:/home/dkadkf/.local/include/cyclus:/home/dkadkf/github/Bright-lite/src
In file included from /home/dkadkf/.local/include/cyclus/agent.h:15:0,
                 from /home/dkadkf/.local/include/cyclus/context.h:17,
                 from /home/dkadkf/.local/include/cyclus/cyclus.h:9,
                 from /home/dkadkf/github/Bright-lite/src/reactor_facility.h:7:
/home/dkadkf/.local/include/cyclus/pyne.h:349:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
  File "/home/dkadkf/.local/include/cyclus/../../bin/cycpp.py", line 2369, in <module>
    main()
  File "/home/dkadkf/.local/include/cyclus/../../bin/cycpp.py", line 2360, in main
    newfile = generate_code(canon if ns.pass3_use_pp else orig, context, superclasses)
  File "/home/dkadkf/.local/include/cyclus/../../bin/cycpp.py", line 2148, in generate_code
    cg.generate(statement, sep)
  File "/home/dkadkf/.local/include/cyclus/../../bin/cycpp.py", line 2115, in generate
    transformed = filter.transform(statement, sep)
  File "/home/dkadkf/.local/include/cyclus/../../bin/cycpp.py", line 2007, in transform
    rtn += f.transform(statement, sep)
  File "/home/dkadkf/.local/include/cyclus/../../bin/cycpp.py", line 952, in transform
    cg.ensure_class_context(classname)
  File "/home/dkadkf/.local/include/cyclus/../../bin/cycpp.py", line 2081, in ensure_class_context
    parents = self.superclasses[classname]
KeyError: 'reactor::ReactorFacility'
-- Copying /home/dkadkf/github/Bright-lite/src/reactor_facility_tests.cc to /home/dkadkf/github/Bright-lite/build/ReactorFacility/reactor_facility_tests.cc.
-- Finished construction of build files for agent: reactor_facility
-- Building agent unit test binary: ReactorFacility_unit_tests
-- Using source: ;/home/dkadkf/github/Bright-lite/build/ReactorFacility/reactor_facility.cc;/home/dkadkf/github/Bright-lite/build/ReactorFacility/reactor_facility_tests.cc
-- And test driver: /home/dkadkf/.local/share/cyclus/cyclus_default_unit_test_driver.cc
-- Configuring done
CMake Warning (dev) at cmake/UseCyclus.cmake:231 (ADD_DEPENDENCIES):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target
  "/home/dkadkf/github/Bright-lite/build/ReactorFacility/reactor_facility.cc"
  of target "ReactorFacility" does not exist.
Call Stack (most recent call first):
  cmake/UseCyclus.cmake:222 (INSTALL_AGENT_LIB_)
  cmake/UseCyclus.cmake:204 (INSTALL_CYCLUS_MODULE)
  src/CMakeLists.txt:14 (install_cyclus_standalone)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/UseCyclus.cmake:231 (ADD_DEPENDENCIES):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target
  "/home/dkadkf/github/Bright-lite/build/ReactorFacility/reactor_facility.h"
  of target "ReactorFacility" does not exist.
Call Stack (most recent call first):
  cmake/UseCyclus.cmake:222 (INSTALL_AGENT_LIB_)
  cmake/UseCyclus.cmake:204 (INSTALL_CYCLUS_MODULE)
  src/CMakeLists.txt:14 (install_cyclus_standalone)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at cmake/UseCyclus.cmake:228 (ADD_LIBRARY):
  Cannot generate a safe runtime search path for target ReactorFacility
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libxml2.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/dkadkf/anaconda3/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  cmake/UseCyclus.cmake:222 (INSTALL_AGENT_LIB_)
  cmake/UseCyclus.cmake:204 (INSTALL_CYCLUS_MODULE)
  src/CMakeLists.txt:14 (install_cyclus_standalone)

CMake Warning at cmake/UseCyclus.cmake:263 (ADD_EXECUTABLE):
  Cannot generate a safe runtime search path for target
  ReactorFacility_unit_tests because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libxml2.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/dkadkf/anaconda3/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  cmake/UseCyclus.cmake:223 (INSTALL_AGENT_TESTS_)
  cmake/UseCyclus.cmake:204 (INSTALL_CYCLUS_MODULE)
  src/CMakeLists.txt:14 (install_cyclus_standalone)

-- Generating done
-- Build files have been written to: /home/dkadkf/github/Bright-lite/build
Scanning dependencies of target brightlite
[  8%] Building CXX object src/CMakeFiles/brightlite.dir/burnupcalc.cpp.o
In file included from /home/dkadkf/.local/include/cyclus/agent.h:15:0,
                 from /home/dkadkf/.local/include/cyclus/context.h:17,
                 from /home/dkadkf/.local/include/cyclus/cyclus.h:9,
                 from /home/dkadkf/github/Bright-lite/src/burnupcalc.h:13,
                 from /home/dkadkf/github/Bright-lite/src/burnupcalc.cpp:1:
/home/dkadkf/.local/include/cyclus/pyne.h:349:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
src/CMakeFiles/brightlite.dir/build.make:62: recipe for target 'src/CMakeFiles/brightlite.dir/burnupcalc.cpp.o' failed
make[2]: *** [src/CMakeFiles/brightlite.dir/burnupcalc.cpp.o] Error 1
CMakeFiles/Makefile2:121: recipe for target 'src/CMakeFiles/brightlite.dir/all' failed
make[1]: *** [src/CMakeFiles/brightlite.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "install.py", line 132, in <module>
    main()
  File "install.py", line 129, in main
    install(args)
  File "install.py", line 66, in install
    shell=(os.name == 'nt'))
  File "/home/dkadkf/anaconda3/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.

I guess this is more a question than an issue, but can you help me out? thanks,

FlanFlanagan commented 7 years ago

I'll look into this today.

FlanFlanagan commented 7 years ago

Can you use https://github.com/flanflanagan/Bright-lite, the 0.9 branch?

jbae11 commented 7 years ago

Thanks for the reply? I get the same error using the 0.9 branch. Maybe it could be something wrong with my computer? But my installed cyclus path does not have hdf5.h but only has hdf5_back.h

FlanFlanagan commented 7 years ago

You aren't getting this issue with Cycamore right?

jbae11 commented 7 years ago

Actually, it seems like there is something wrong with my HDF5 and lapack.. let me try it in my laptop and get back to you?

scopatz commented 7 years ago

Hi all, I think that this is because bright never updated the CMake build system to fix a lot of the issues that have been worked through on cyclus and cycamore. I doubt it is (only) your installation @jbae11

FlanFlanagan commented 7 years ago

That is my impression as well. I should get to this soon

jbae11 commented 7 years ago

Yeah, I got the same error with my laptop. Thanks!

scopatz commented 7 years ago

Also, can we merge the 0.9 branch into master?

scopatz commented 7 years ago

Also note, after fixing the hdf5 issue on my imps branch - which is based off of 0.9 (which I am trying to push up, but the plane internet is slow), I still get the following error:

Scanning dependencies of target brightlite
[  5%] Building CXX object src/CMakeFiles/brightlite.dir/burnupcalc.cpp.o
[ 10%] Building CXX object src/CMakeFiles/brightlite.dir/origenBuilder.cpp.o
/home/scopatz/bright-lite/src/origenBuilder.cpp: In function ‘std::vector<nonActinide> NonActinideReader(std::string)’:
/home/scopatz/bright-lite/src/origenBuilder.cpp:236:36: error: expected primary-expression before ‘.’ token
                 na_iso.sn2n = sn2n;.uin
                                    ^
/home/scopatz/bright-lite/src/origenBuilder.cpp:237:17: error: expected ‘;’ before ‘na_iso’
                 na_iso.snp = snp;
                 ^
make[2]: *** [src/CMakeFiles/brightlite.dir/build.make:87: src/CMakeFiles/brightlite.dir/origenBuilder.cpp.o] Error 1
make[2]: *** Waiting for un
FlanFlanagan commented 7 years ago

Okay, I'll fix this.

FlanFlanagan commented 7 years ago

I merged in the build system improvements. @jbae11 could you try and install again.

I'm getting a libxml2 error

scopatz commented 7 years ago

I'm getting a libxml2 error

Try https://github.com/FlanFlanagan/Bright-lite/pull/37 please

FlanFlanagan commented 7 years ago

You should be able to install off the 0.9 branch now @jbae11 and @scopatz

jbae11 commented 7 years ago

is it working on your machines?

I was able to build it by deleting HL in line 151 of CMakelists.txt (I have no idea what I'm doing, but it built...)

but I can't seem to run it correctly.

The build and error messages are here

scopatz commented 7 years ago

Hi @jbae11 - If it built without HL, that probably means that you don't have the high-level libraries installed (or maybe not the high-level-dev package) on your machine.

jbae11 commented 7 years ago

that's what I thought... but when I add the HL it errors:

-- Found BLAS Libraries: /usr/lib/libblas.so
CMake Error at /home/dkadkf/.local/share/cyclus/cmake/FindHDF5.cmake:170 (message):
  "HL" is not a valid HDF5 component.
Call Stack (most recent call first):
  CMakeLists.txt:151 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!
See also "/home/dkadkf/github/Bright-lite/build/CMakeFiles/CMakeOutput.log".
See also "/home/dkadkf/github/Bright-lite/build/CMakeFiles/CMakeError.log".
Makefile:236: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Traceback (most recent call last):
  File "install.py", line 214, in <module>
    main()
  File "install.py", line 211, in main
    install_cyclus(args)
  File "install.py", line 107, in install_cyclus
    shell=(os.name == 'nt'))
  File "/home/dkadkf/anaconda3/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
scopatz commented 7 years ago

What version of CMake do you have? You should be seeing the same error here as for cyclus...

scopatz commented 7 years ago

Are you doing a fully clean build?

jbae11 commented 7 years ago

yeah that's weird that it didn't show up for cyclus. I may have messed up my cmake configuration while building SCALE. Let me do a clean build of everything and i'll let you know.

jbae11 commented 7 years ago

got it to work on a fresh build! Thanks yall