Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lkissin2 opened this issue Feb 27, 2018 · 17 comments
Open

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

lkissin2 opened this issue Feb 27, 2018 · 17 comments

Comments

@lkissin2
Copy link

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
Copy link
Member

scopatz commented Feb 27, 2018

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
Copy link
Author

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
Copy link
Member

scopatz commented Feb 28, 2018

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
Copy link
Member

scopatz commented Feb 28, 2018

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
Copy link
Author

lkissin2 commented Mar 1, 2018

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
Copy link
Member

FlanFlanagan commented Mar 1, 2018 via email

@scopatz
Copy link
Member

scopatz commented Mar 1, 2018

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

@FlanFlanagan
Copy link
Member

FlanFlanagan commented Mar 1, 2018 via email

@scopatz
Copy link
Member

scopatz commented Mar 1, 2018

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

@scopatz
Copy link
Member

scopatz commented Mar 1, 2018

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

@chiudaniels
Copy link

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_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

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
Copy link
Member

scopatz commented Mar 6, 2018

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
Copy link

@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
Copy link
Member

katyhuff commented May 8, 2018

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

@bam241
Copy link
Member

bam241 commented May 8, 2018

@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
Copy link
Member

bam241 commented May 8, 2018

sorry i missed that issue ...

@scopatz
Copy link
Member

scopatz commented May 8, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants