cyclus / cyclus.github.com

Landing page repository
http://fuelcycle.org
Other
8 stars 30 forks source link

Installation Errors in Archetype Developer Tutorial "Hello, Cyclus!" #280

Open lkissin2 opened 6 years ago

lkissin2 commented 6 years ago

I am attempting to complete the hello, cyclus tutorial for @kdhuff, but I am unable to build cycstub. This is on Ubuntu 16.04 with cyclus and cycamore installed from source. Both pass all unit tests. I installed the dependencies with apt and, after encountering this error, attempted to reinstall with conda install -c conda-forge cyclus-build-deps

This is the error message when I run python install.py --clean-build in the tutorial directory, which is a clone of /arfc/cycstub:

lou@arfc~/tutorial$ python install.py --clean-build

CMake Warning at /home/lou/anaconda3/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106501
Call Stack (most recent call first):
  /home/lou/anaconda3/share/cmake-3.5/Modules/FindBoost.cmake:762 (_Boost_COMPONENT_DEPENDENCIES)
  /home/lou/anaconda3/share/cmake-3.5/Modules/FindBoost.cmake:1309 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:92 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!
See also "/home/lou/tutorial/build/CMakeFiles/CMakeOutput.log".
See also "/home/lou/tutorial/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "install.py", line 137, in <module>
    main()
  File "install.py", line 134, in main
    install(args)
  File "install.py", line 62, in install
    shell=(os.name == 'nt'))
  File "/home/lou/anaconda3/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/lou/tutorial', '-DCMAKE_INSTALL_PREFIX=/home/lou/.local', '-DCYCLUS_ROOT_DIR=/home/lou/.local']' returned non-zero exit status 1.

Here is the error when I run python install.py --clean-build in the cyclus directory, which is a clone of /cyclus/cyclus:

lou@arfc:~/cyclus$ python install.py --clean-build
/home/lou/anaconda3/bin/cmake

CMake Error at /home/lou/anaconda3/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find HDF5 (missing: HDF5_LIBRARIES) (found version "1.10.1")
Call Stack (most recent call first):
  /home/lou/anaconda3/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /home/lou/anaconda3/share/cmake-3.5/Modules/FindHDF5.cmake:398 (find_package_handle_standard_args)
  CMakeLists.txt:195 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!
See also "/home/lou/cyclus/build/CMakeFiles/CMakeOutput.log".
See also "/home/lou/cyclus/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "install.py", line 223, in <module>
    main()
  File "install.py", line 219, in main
    install_cyclus(args)
  File "install.py", line 94, in install_cyclus
    shell=(os.name == 'nt'))
  File "/home/lou/anaconda3/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/lou/cyclus', '-DCMAKE_INSTALL_PREFIX=/home/lou/.local', '-DDEFAULT_ALLOW_MILPS=FALSE']' returned non-zero exit status 1.

Finally, here is the error when I type cycstub --type facility /home/lou/tutorial:mylib:myfacility in the tutorial directory:

lou@arfc:~/tutorial$ cycstub --type facility /home/lou/tutorial:mylib:myfacility
/usr/local/bin/cyclus
Traceback (most recent call last):
  File "/usr/local/bin/cycstub", line 126, in <module>
    prevlibpath, prevlibname, _ = read_cmake_spec()
  File "/usr/local/bin/cycstub", line 33, in read_cmake_spec
    _, spec = s[0].split('::')
ValueError: not enough values to unpack (expected 2, got 1)
scopatz commented 6 years ago

Hi @lkissin2 thanks for reporting. Have you added the conda-forge channel to your condarc (via conda config --add channels conda-forge) and updated all of the dependencies with conda update --all --update-deps? What does conda list cmake say?

lkissin2 commented 6 years ago

I have added the channel and updated the dependencies. conda list cmake gives me

# packages in environment at /home/lou/anaconda3:
#
# Name                    Version                   Build  Channel
cmake                     3.5.0                         3    conda-forge
scopatz commented 6 years ago

That is quite odd. It should give

scopatz@artemis ~ $ conda list cmake
# packages in environment at /home/scopatz/miniconda:
#
cmake                     3.10.0                        4    conda-forge
scopatz commented 6 years ago

Do you have a repo or a script that demonstrates the errors? I think that might help me debug. I can't tell if it is a problem with your system somehow, with cycstub, with the build system, or with some combo of those.

lkissin2 commented 6 years ago

Sorry, I'm not quite sure what you mean. Do you mean the commands I ran to get the libraries?

I first did:

sudo apt-get install -y cmake make libboost-all-dev libxml2-dev libxml++2.6-dev \
libsqlite3-dev libhdf5-serial-dev libbz2-dev coinor-libcbc-dev coinor-libcoinutils-dev \
coinor-libosi-dev coinor-libclp-dev coinor-libcgl-dev libblas-dev liblapack-dev g++ \
libgoogle-perftools-dev python3-dev python3-tables python3-pandas python3-numpy python3-nose \
python3-jinja2 cython3

to get the build deps (later I tried conda install -c conda-forge cyclus-build-deps, which just told me my files were updated)

Then I cloned cyclus:

git clone https://github.com/cyclus/cyclus .
git fetch
git checkout master

then cyclus_unit_tests, which told me all tests passed I then ran 'cyclus example.xml` and got a succesful cyclus run Next I cloned cycstub:

$ cd tutorial

Then I changed Tick{} and Tock{} to print "Hello, Cyclus!", and ran python install.py and got the errors from the first message.

I hope that helped, but if not let me know what you meant so I can give you the right info.

Thanks

FlanFlanagan commented 6 years ago

Unless I'm mistaken CycStub is no longer supported and not how you should be building new modules. This should be updated to bring that inline with 1.5.3.

You can also try building a module with Python. http://fuelcycle.org/arche/tutorial_py/index.html

On Thu, Mar 1, 2018 at 12:35 PM, Louis Kissinger notifications@github.com wrote:

Sorry, I'm not quite sure what you mean. Do you mean the commands I ran to get the libraries?

I first did:

sudo apt-get install -y cmake make libboost-all-dev libxml2-dev libxml++2.6-dev \ libsqlite3-dev libhdf5-serial-dev libbz2-dev coinor-libcbc-dev coinor-libcoinutils-dev \ coinor-libosi-dev coinor-libclp-dev coinor-libcgl-dev libblas-dev liblapack-dev g++ \ libgoogle-perftools-dev python3-dev python3-tables python3-pandas python3-numpy python3-nose \ python3-jinja2 cython3

to get the build deps (later I tried conda install -c conda-forge cyclus-build-deps, which just told me my files were updated)

Then I cloned cyclus:

git clone https://github.com/cyclus/cyclus . git fetch git checkout master

then cyclus_unit_tests, which told me all tests passed I then ran 'cyclus example.xml` and got a succesful cyclus run Next I cloned cycstub:

$ cd tutorial

Then I changed Tick{} and Tock{} to print "Hello, Cyclus!", and ran python install.py and got the errors from the first message.

I hope the helped but if not let me know what you meant so I can give you the right info.

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cyclus/cyclus.github.com/issues/280#issuecomment-369664423, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtCa8MGpdCr8SiJgl13M74WhJNmLfw3ks5taC4sgaJpZM4SVcfP .

-- Robert Flanagan Ph.D. Post Doctoral Fellow Department of Mechanical Engineering University of South Carolina in Columbia

scopatz commented 6 years ago

I thought it was that cloning from the cycstub repo wasn't supported but that command line utility is

FlanFlanagan commented 6 years ago

I think he cloned the arfc/cycstub repo?

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Mar 1, 2018 at 2:06 PM, Anthony Scopatz notifications@github.com wrote:

I thought it was that cloning from the cycstub repo wasn't supported but that command line utility is

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cyclus/cyclus.github.com/issues/280#issuecomment-369696248, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtCawdhfiBJ2CrEMOL4tUR5sg2Oxc4Xks5taEadgaJpZM4SVcfP .

-- Robert Flanagan Ph.D. Post Doctoral Fellow Department of Mechanical Engineering University of South Carolina in Columbia

scopatz commented 6 years ago

Oh you are right, @lkissin2 did do a clone.

scopatz commented 6 years ago

maybe @gonuke or @katyhuff or @bam241 can comment, since I haven't touched cycstub in many years.

chiudaniels commented 6 years ago

I am also running into a similar problem while attempting initiate the install.py. My system is running on ubuntu 17.10 and I am getting the error

/usr/local/lib/libcyclus.so: undefined reference to boost::archive::xml_iarchive_impl::load_override(boost::archive::class_name_type&, int)' collect2: error: ld returned 1 exit status src/CMakeFiles/TutorialFacility_unit_tests.dir/build.make:191: recipe for target 'bin/TutorialFacility_unit_tests' failed make[2]: [bin/TutorialFacility_unit_tests] Error 1 CMakeFiles/Makefile2:127: recipe for target 'src/CMakeFiles/TutorialFacility_unit_tests.dir/all' failed make[1]: [src/CMakeFiles/TutorialFacility_unit_tests.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 Traceback (most recent call last): File "install.py", line 137, in main() File "install.py", line 134, in main install(args) File "install.py", line 68, in install shell=(os.name == 'nt')) File "/home/daniel/anaconda2/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2

Additionally, unless I am misinterpreting the purpose of the install.py, I was thinking that since I already have cyclus installed on my system (through conda), I would try to go through the tutorial and run cyclus on the example.xml anyways, I get the error:

ERROR(core ):No module found for path tutorial/libTutorialFacility.so

scopatz commented 6 years ago

Hi @chiudaniels - It seems that you are attempting to install to you root system environment. Perhaps this is because you are using your system Python, rather than the one that comes from conda. In any event, the error is because some part of boost isn't installed via apt.

I would highly recommend against installing cyclus to your root system. (The default is to install it to userspace after all.) Can you please send the commands you are using AND the errors that you are seeing? Thanks!

chiudaniels commented 6 years ago

@scopatz Hi! I used the command

python install.py

which prompted the

/usr/local/lib/libcyclus.so: undefined reference to boost::archive::xml_iarchive_implboost::archive::xml_iarchive::load_override(boost::archive::class_name_type&, int)' collect2: error: ld returned 1 exit status src/CMakeFiles/TutorialFacility_unit_tests.dir/build.make:191: recipe for target 'bin/TutorialFacility_unit_tests' failed make[2]: [bin/TutorialFacility_unit_tests] Error 1 CMakeFiles/Makefile2:127: recipe for target 'src/CMakeFiles/TutorialFacility_unit_tests.dir/all' failed make[1]: [src/CMakeFiles/TutorialFacility_unit_tests.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 Traceback (most recent call last): File "install.py", line 137, in main() File "install.py", line 134, in main install(args) File "install.py", line 68, in install shell=(os.name == 'nt')) File "/home/daniel/anaconda2/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2

After, I tried to continue the tutorial despite the error and initiated

cyclus input/example.xml

and received the error

ERROR(core ):No module found for path tutorial/libTutorialFacility.so

I think your suggestion is correct in that I'm using the system Python when I installed cyclus with conda. I'll continue to test and update if if I find a solution.

katyhuff commented 6 years ago

@lkissin2 if you want to @ include me, you'll have to use my github username, @katyhuff. (not kdhuff)

bam241 commented 6 years ago

@scopatz @FlanFlanagan I believed, that the cycstub repo is supposed to be deprecated.

a cycstub binary is shipped with cyclus, and supposed to be used to generate a new folder to host new archetypes development.

$> cycstub --help                                                                                                                                                                                                                                                                     usage: cycstub [-h] [--type {region,inst,facility}] spec

positional arguments:
  spec                  [path]:[library-name]:[archetype-name]

optional arguments:
  -h, --help            show this help message and exit
  --type {region,inst,facility}
                        the type of archetype to generate
bam241 commented 6 years ago

sorry i missed that issue ...

scopatz commented 6 years ago

Yeah I thought cycstub was deprecated too. We should change the readme to say something along those lines and modify the command to only print a message about how it is deprecated rather than trying to do anything real.