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

The 'install' target fails to install nexus but still succeeds #3720

Closed
yurivict opened this issue Jan 8, 2022 · 6 comments · Fixed by #3725
Closed

The 'install' target fails to install nexus but still succeeds #3720

yurivict opened this issue Jan 8, 2022 · 6 comments · Fixed by #3725

Comments

@yurivict
Copy link

yurivict commented Jan 8, 2022

It prints this:

-- Install configuration: "RELEASE"
install error: problem encountered, see output below
out: b''
err: b'cp: /usr/local/bin/eshdf: Permission denied\ncp: /usr/local/bin/nxs-redo: Permission denied\ncp: /usr/local/bin/nxs-sim: Permission denied\ncp: /usr/local/bin/nxs-test: Permission denied\ncp: /usr/local/bin/qdens: Permission denied\ncp: /usr/local/bin/qdens-radial: Permission denied\ncp: /usr/local/bin/qmc-fit: Permission denied\ncp: /usr/local/bin/qmca: Permission denied\n'
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/qmcpack.settings
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/qmcpack
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/convert4qmc
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/qmc-extract-eshdf-kvectors
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/qmc-get-supercell
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/qmc-check-affinity
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/convertpw4qmc
-- Installing: /disk-samsung/freebsd-ports/science/qmcpack/work/stage/usr/local/bin/qmcfinitesize

It looks like it attempts to install into $PREFIX, not $DESTDIR$PREFIX, so it would always fail to install into the stage directory.

Another bug is that the above error gets lost and install succeeds. This masks the problem.

rev. 0297e87
OS: FreeBSD 13

@yurivict yurivict changed the title The 'install' target fails to install nexus but still succeds The 'install' target fails to install nexus but still succeeds Jan 8, 2022
@prckent
Copy link
Contributor

prckent commented Jan 12, 2022

I was not able to reproduce this on a RHEL box, so likely we have another FreeBSD difference to fix:

Consolidate compiler generated dependencies of target qmcfinitesize
[ 96%] Built target qmcfinitesize
Consolidate compiler generated dependencies of target common
[ 99%] Built target common
Consolidate compiler generated dependencies of target ppconvert
[100%] Built target ppconvert
Consolidate compiler generated dependencies of target test_tools
[100%] Built target test_tools
Install the project...
-- Install configuration: "RELEASE"
Nexus installation not complete.  Please add the following paths to .bashrc:
export PATH=/home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin:$PATH
export PYTHONPATH=/home/pk7/projects/qmc/git_QMCPACK_prckent/qmcpack/nexus/lib:$PYTHONPATH

-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmcpack.settings
-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmcpack
-- Set runtime path of "/home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmcpack" to ""
-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/convert4qmc
-- Set runtime path of "/home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/convert4qmc" to ""
-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmc-extract-eshdf-kvectors
-- Set runtime path of "/home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmc-extract-eshdf-kvectors" to ""
-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmc-get-supercell
-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmc-check-affinity
-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/convertpw4qmc
-- Set runtime path of "/home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/convertpw4qmc" to ""
-- Installing: /home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmcfinitesize
-- Set runtime path of "/home/pk7/projects/qmc/git_QMCPACK_prckent/the_install_dir/bin/qmcfinitesize" to ""

which was the outcome of

cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DQMC_DATA=/scratch/pk7/QMC_DATA_FULL/ -DQMC_NIO_MAX_SIZE=16 -DCMAKE_INSTALL_PREFIX=$HOME/projects/qmc/git_QMCPACK_prckent/the_install_dir  ../qmcpack/
make -j
make install

This also points to some issues in the Nexus installation - it doesn't copy nexus/lib from the source directories, making the installation incomplete.

@yurivict
Copy link
Author

yurivict commented Jan 12, 2022

@prckent But this isn't how stage directory is set.

On FreeBSD the cmake command doesn't set it:

-DCMAKE_C_COMPILER:STRING="cc"  -DCMAKE_CXX_COMPILER:STRING="c++"  -DCMAKE_C_FLAGS:STRING="-O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing "  -DCMAKE_C_FLAGS_DEBUG:STRING="-O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing "  -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing "  -DCMAKE_CXX_FLAGS:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer  -I/usr/local/include/catch2 -isystem /usr/local/include "  -DCMAKE_CXX_FLAGS_DEBUG:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer  -I/usr/local/include/catch2 -isystem /usr/local/include "  -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer  -I/usr/local/include/catch2 -isystem /usr/local/include "  -DCMAKE_EXE_LINKER_FLAGS:STRING=" -Wl,-rpath=/usr/local/lib/gcc10  -L/usr/local/lib/gcc10 -B/usr/local/bin -fstack-protector-strong -L/usr/local/lib "  -DCMAKE_MODULE_LINKER_FLAGS:STRING=" -Wl,-rpath=/usr/local/lib/gcc10  -L/usr/local/lib/gcc10 -B/usr/local/bin -fstack-protector-strong -L/usr/local/lib "  -DCMAKE_SHARED_LINKER_FLAGS:STRING=" -Wl,-rpath=/usr/local/lib/gcc10  -L/usr/local/lib/gcc10 -B/usr/local/bin -fstack-protector-strong -L/usr/local/lib "  -DCMAKE_INSTALL_PREFIX:PATH="/usr/local"  -DCMAKE_BUILD_TYPE:STRING="Release"  -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES  -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES  -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_UNIT_TESTS:BOOL=OFF -DPython_ADDITIONAL_VERSIONS=3.8 -DBOOST_PYTHON_SUFFIX:STRING=38

Then stage directory is set during the install target: DESTDIR=/disk-samsung/freebsd-ports/science/qmcpack/work/stage

@prckent
Copy link
Contributor

prckent commented Jan 12, 2022

Thanks Yuri. I needed to learn about DESTDIR and CMake's multiple ways of setting these directories.

@yurivict
Copy link
Author

You're welcome. -)
You should be able to reproduce this problem on Linux.

@yurivict
Copy link
Author

yurivict commented Jan 13, 2022

@prckent
The current revision a6ecd88 still doesn't install nexus/lib.
It should probably be installed into lib/pythonN.N/site-packages/nexus.

@prckent
Copy link
Contributor

prckent commented Jan 13, 2022

@yurivict We are having an off-GitHub discussion about this as we also have #3685 to deal with. Discussions are continuing but we are currently leaning towards $installdir/lib or $installdir/nexus/lib for simplicity. A lot of science codes have some variant of this but not the full site-packages route you mention.

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

Successfully merging a pull request may close this issue.

2 participants