-
Notifications
You must be signed in to change notification settings - Fork 72
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
Built binaries contain reference to source directory #765
Comments
Dear @mueslo, We do not hardcode paths to the either the source directory or the build directory into any of the files It seems further that you are building TRIQS directly in the source directory
This is bad practice and should not be done. Please follow the steps on our installation page, which outline how to build TRIQS with a separate source and build directory. |
True, but beside the point.
This is evidently wrong. Even if I change the building steps to
The resulting files still contain references to the source directory headers and source files: $ grep -lr "$srcdir" ~/.cache/pikaur/build/triqs/pkg/triqs/ (With these build steps, there is no longer any reference to the build directory, so that that part of my initial report is wrong) [Regarding |
Dear @mueslo, You are indeed correct! The proper course of action would be to strip the source directory from these File-Paths. Regarding the |
fs = std::filesystem |
// includer of filesystem for clang compiled against gcc < 8
#if __has_include(<filesystem>)
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif``` |
@Wentzell To solve the link pb with your remove source_root solution |
Description
I would like to build a package of triqs for my Linux distribution of choice. However, I noticed that upon compilation, TRIQS hardcodes a lot of build and source directory paths into the built binaries, and files etc. This is not good practice and should be fixed.
Steps to Reproduce
Expected behavior: No results.
Actual behavior: Results for
/path/to/build/triqs/usr/bin/triqs++
/path/to/build/triqs/usr/share/cmake/Modules/run_test.cmake
/path/to/build/triqs/usr/share/cmake/Modules/FindTriqsTest.cmake
/path/to/build/triqs/usr/share/cpp2pyvars.sh
/path/to/build/triqs/usr/share/triqsvars.sh
/path/to/build/triqs/usr/lib/cmake/triqs/triqs-targets.cmake
/path/to/build/triqs/usr/lib/cmake/triqs/TRIQSConfig.cmake
/path/to/build/triqs/usr/lib/cmake/cpp2py/Cpp2PyConfig.cmake
/path/to/build/triqs/usr/lib/cmake/cpp2py/cpp2py-targets.cmake
/path/to/build/triqs/usr/lib/libtriqs.so.2.2
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/magic.py
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/gf/meshes.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/gf/gf_fnt.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/gf/wrapped_aux.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/gf/gf_factories.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/operators/util/extractors.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/operators/operators.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/atom_diag/atom_diag.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/arrays/block_matrix.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/lattice/lattice_tools.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/statistics/histograms.so
/path/to/build/triqs/usr/lib/python2.7/site-packages/pytriqs/random_generator/random_generator.so
Furthermore, references to the python binary location are saved in:
$ grep -lr "/path/to/python/virtualenv/" $builddir
/path/to/build/triqs/usr/bin/triqs++
/path/to/build/triqs/usr/lib/cmake/cpp2py/Cpp2PyConfig.cmake
/path/to/build/triqs/usr/lib/python2.7/site-packages/cpp2py/libclang_config.py
Versions
2.2.1 release
The text was updated successfully, but these errors were encountered: