Closed brettviren closed 4 years ago
I do a kludge fix:
$ spack install --keep-stage appfwk@1.1.0
$ cd ..
$ git clone https://github.com/DUNE-DAQ/daq-buildtools.git
$ cd -
$ spack install --dont-restage --keep-stage appfwk@1.1.0
This gets further but then fails with:
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetmodules-1.04.00-tobenw2r7cz2hi7jvd6zzudjdhxmckcn
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/ers-1.0.1-fxyefdbyqnhftfu6l4huaiy562gyn6ct
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/double-conversion-3.1.5-7qs54ki7thse264pdetwa2qbzrobvw2d
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/glog-0.4.0-msv5ykowywngmupozut5skcjxbcms55o
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-except-MVP1a-4kq3oq4rotkykvgubxpx7otw6hn5fxzu
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/hep-concurrency-MVP1a-hqjlcwe2bakkxnov5k5ycozx6aippovb
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/folly-2020.08.17.00-jaaauyqxwc5pj44je5rmniljzypclf7s
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-MVP1a-p43u4r2dm6sucfk43k3lzewrik3z6niy
==> Installing appfwk
==> No binary for appfwk found: installing from source
==> appfwk: Executing phase: 'cmake'
==> Error: ProcessError: Command exited with status 1:
'cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF' '-DCMAKE_INSTALL_RPATH:STRING=/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/lib64;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/boost-1.73.0-j56askccclhf5dzoh5fs3fxi3ofk5gbi/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/bzip2-1.0.8-s5fqt5fcwqk5wwydk6cv3gfqyn5s5c7x/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/zlib-1.2.11-7eulqntecjdbh3yw7s3g44vdiqoltcci/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-MVP1a-p43u4r2dm6sucfk43k3lzewrik3z6niy/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/catch2-2.3.0-piq3odyxdjbphgxpvnzad475ya25a653/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-except-MVP1a-4kq3oq4rotkykvgubxpx7otw6hn5fxzu/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/hep-concurrency-MVP1a-hqjlcwe2bakkxnov5k5ycozx6aippovb/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cppunit-1.14.0-zx7zwz3whxopvwu232z4kvr5j4jpqbwx/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/intel-tbb-2020.2-sjoi4tsawhxyx65a3etkvv3772ycgpsw/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/openssl-1.1.1g-jkm3t4xd6knuz7kji3st5pgi7skeduez/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/perl-5.30.3-yxl4sm4laer2cbffzaxpct3ershif6ow/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/gdbm-1.18.1-ybvoc7tivkn4igv5cugs6ruht7b3ebsb/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/readline-8.0-w7m2cexr6ttiakflsgt4qkpaiudqlx7l/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/ncurses-6.2-dahan7qgh6rc7k32r57rku6e26dnc2uf/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/sqlite-3.31.1-4sqldzve4snz4muqewxocn7rq4s4bm2j/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/daq-buildtools-1.1.6-6a4rzv6dxzxj5gbbv6o3h5ocu45bg3fb/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/ers-1.0.1-fxyefdbyqnhftfu6l4huaiy562gyn6ct/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/folly-2020.08.17.00-jaaauyqxwc5pj44je5rmniljzypclf7s/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/double-conversion-3.1.5-7qs54ki7thse264pdetwa2qbzrobvw2d/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/fmt-7.0.3-672tt2a6erdpqhypyjgy4eq4bbelrngm/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/gflags-2.2.2-xn5qqaemgrjiigafnfmekrcxgexxx7gu/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/glog-0.4.0-msv5ykowywngmupozut5skcjxbcms55o/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/libevent-2.1.12-kr6wsvjogwj54ep36n6oyyruers47h25/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/nlohmann-json-3.7.2-ij4v5smulotjc6zdczzr3snbycggz7lc/lib' '-DCMAKE_PREFIX_PATH:STRING=/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cmake-3.17.3-wblbxkyvvmhsrb6uviwe3nmvxl7u4tp4;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/daq-buildtools-1.1.6-6a4rzv6dxzxj5gbbv6o3h5ocu45bg3fb;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/boost-1.73.0-j56askccclhf5dzoh5fs3fxi3ofk5gbi;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/folly-2020.08.17.00-jaaauyqxwc5pj44je5rmniljzypclf7s;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/trace-stable-fjho5tpoyacscxqlsgdwfxjfl4v44lzm;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-MVP1a-p43u4r2dm6sucfk43k3lzewrik3z6niy;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/ers-1.0.1-fxyefdbyqnhftfu6l4huaiy562gyn6ct;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/nlohmann-json-3.7.2-ij4v5smulotjc6zdczzr3snbycggz7lc' '/srv/bv/spack/stage/spack-stage-appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/spack-src'
1 error found in build log:
>> 4 CMake Error at /srv/bv/spack/stage/spack-stage-appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/daq-buildtools/cmake/Findcetlib.cmake:
1 (if):
5 Maximum recursion depth of 1000 exceeded
6 Call Stack (most recent call first):
7 /srv/bv/spack/stage/spack-stage-appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/daq-buildtools/cmake/Findcetlib.cmake:10 (find_package)
8 /srv/bv/spack/stage/spack-stage-appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/daq-buildtools/cmake/Findcetlib.cmake:10 (find_package)
9 /srv/bv/spack/stage/spack-stage-appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/daq-buildtools/cmake/Findcetlib.cmake:10 (find_package)
10 /srv/bv/spack/stage/spack-stage-appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy/daq-buildtools/cmake/Findcetlib.cmake:10 (find_package)
I think I missed a commit initially. Can you pull the latest (9d575ab) and build appfwk@spack-build
?
That Findcetlib.cmake
seems to be a tumor.
I get further after:
$ spack cd appfwk
$ cd ..
$ git clone https://github.com/DUNE-DAQ/daq-buildtools.git
$ cd daq-buildtools
$ git checkout v1.1.0
$ rm cmake/Findcetlib.cmake
$ cd -
Then, with the finish line in sight:
==> Installing appfwk
==> No binary for appfwk found: installing from source
==> appfwk: Executing phase: 'cmake'
==> appfwk: Executing phase: 'build'
==> appfwk: Executing phase: 'install'
==> Error: InstallError: Install failed for appfwk. Nothing was installed!
/home/bv/dev/spack/lib/spack/spack/package.py:1519, in sanity_check_prefix:
1516 installed.difference_update(
1517 spack.store.layout.hidden_file_paths)
1518 if not installed:
>> 1519 raise InstallError(
1520 "Install failed for %s. Nothing was installed!" % self.name)
This is due to more brokenness in daq_buildtools
which is explicitly setting the install prefix. Here is a patch including the removal of the tumor described above.
diff --git a/cmake/DAQ.cmake b/cmake/DAQ.cmake
index 526ae58..4b397b7 100644
--- a/cmake/DAQ.cmake
+++ b/cmake/DAQ.cmake
@@ -91,7 +91,7 @@ function(daq_install)
cmake_parse_arguments(DAQ_INSTALL "" "" TARGETS ${ARGN} )
- set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/../install/${PROJECT_NAME} CACHE PATH "No comment" FORCE)
+ # set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/../install/${PROJECT_NAME} CACHE PATH "No comment" FORCE)
set(exportset ${PROJECT_NAME}Targets)
set(cmakedestination ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake)
@@ -121,4 +121,4 @@ function(daq_install)
endfunction()
-####################################################################################################
\ No newline at end of file
+####################################################################################################
diff --git a/cmake/Findcetlib.cmake b/cmake/Findcetlib.cmake
deleted file mode 100644
index 3ad6a20..0000000
--- a/cmake/Findcetlib.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-if(EXISTS $ENV{CETLIB_LIB})
- # UPS
- include_directories($ENV{CETLIB_INC})
- include_directories($ENV{CETLIB_EXCEPT_INC})
- find_library(CETLIB NAMES libcetlib.so)
- find_library(CETLIB_EXCEPT NAMES libcetlib_except.so)
- set(cetlib_FOUND TRUE)
-else()
- # Spack
- find_package(cetlib REQUIRED)
- set(CETLIB cetlib)
- set(CETLIB_EXCEPT cetlib_except)
-endif()
With that finally comes some joy:
==> Installing appfwk
==> No binary for appfwk found: installing from source
==> appfwk: Executing phase: 'cmake'
==> appfwk: Executing phase: 'build'
==> appfwk: Executing phase: 'install'
[+] /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/appfwk-1.1.0-c6hhcvadjkocl6h6h2gzhvnj4tblxffy
You've just retraced my steps :-). Can you try the latest in appfwk-externals
, with appfwk@spack-build
? It should work
Oops, @philiprodrigues I just saw your comments. Trying spack install appfwk@spack-build
. I get similar failures related to daq_buildtools
as above:
$ spack install appfwk@spack-build
...
[+]
==> Installing appfwk
==> No binary for appfwk found: installing from source
==> appfwk: Executing phase: 'cmake'
==> Error: ProcessError: Command exited with status 1:
'cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/appfwk-spack-build-jmrldhz5xkasl22ssn5vqiknph67m4fx' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF' '-DCMAKE_INSTALL_RPATH:STRING=/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/appfwk-spack-build-jmrldhz5xkasl22ssn5vqiknph67m4fx/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/appfwk-spack-build-jmrldhz5xkasl22ssn5vqiknph67m4fx/lib64;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/boost-1.73.0-j56askccclhf5dzoh5fs3fxi3ofk5gbi/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/bzip2-1.0.8-s5fqt5fcwqk5wwydk6cv3gfqyn5s5c7x/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/zlib-1.2.11-7eulqntecjdbh3yw7s3g44vdiqoltcci/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-MVP1a-p43u4r2dm6sucfk43k3lzewrik3z6niy/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/catch2-2.3.0-piq3odyxdjbphgxpvnzad475ya25a653/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-except-MVP1a-4kq3oq4rotkykvgubxpx7otw6hn5fxzu/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/hep-concurrency-MVP1a-hqjlcwe2bakkxnov5k5ycozx6aippovb/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cppunit-1.14.0-zx7zwz3whxopvwu232z4kvr5j4jpqbwx/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/intel-tbb-2020.2-sjoi4tsawhxyx65a3etkvv3772ycgpsw/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/openssl-1.1.1g-jkm3t4xd6knuz7kji3st5pgi7skeduez/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/perl-5.30.3-yxl4sm4laer2cbffzaxpct3ershif6ow/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/gdbm-1.18.1-ybvoc7tivkn4igv5cugs6ruht7b3ebsb/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/readline-8.0-w7m2cexr6ttiakflsgt4qkpaiudqlx7l/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/ncurses-6.2-dahan7qgh6rc7k32r57rku6e26dnc2uf/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/sqlite-3.31.1-4sqldzve4snz4muqewxocn7rq4s4bm2j/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/daq-buildtools-spack-build-emjj3igo775a33qdcflofkhluhbkn6xw/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/ers-1.0.1-fxyefdbyqnhftfu6l4huaiy562gyn6ct/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/folly-2020.08.17.00-7s4bsqpmkfmj2ertuoat643rvzd5y7py/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/double-conversion-3.1.5-7qs54ki7thse264pdetwa2qbzrobvw2d/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/fmt-7.0.3-672tt2a6erdpqhypyjgy4eq4bbelrngm/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/gflags-2.2.2-sspzvqvyrrnkj5mnjyzhgzbj2e6z7ngh/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/glog-0.4.0-vb7vssxdui6an5dkd6aughubi5pd3cf3/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/libevent-2.1.12-kr6wsvjogwj54ep36n6oyyruers47h25/lib;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/nlohmann-json-3.7.2-ij4v5smulotjc6zdczzr3snbycggz7lc/lib' '-DCMAKE_PREFIX_PATH:STRING=/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cmake-3.17.3-wblbxkyvvmhsrb6uviwe3nmvxl7u4tp4;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/daq-buildtools-spack-build-emjj3igo775a33qdcflofkhluhbkn6xw;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/boost-1.73.0-j56askccclhf5dzoh5fs3fxi3ofk5gbi;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/folly-2020.08.17.00-7s4bsqpmkfmj2ertuoat643rvzd5y7py;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/trace-stable-fjho5tpoyacscxqlsgdwfxjfl4v44lzm;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/cetlib-MVP1a-p43u4r2dm6sucfk43k3lzewrik3z6niy;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/ers-1.0.1-fxyefdbyqnhftfu6l4huaiy562gyn6ct;/home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/nlohmann-json-3.7.2-ij4v5smulotjc6zdczzr3snbycggz7lc' '/srv/bv/spack/stage/spack-stage-appfwk-spack-build-jmrldhz5xkasl22ssn5vqiknph67m4fx/spack-src'
2 errors found in build log:
11 -- Check for working CXX compiler: /home/bv/dev/spack/lib/spack/env/gcc/g++
12 -- Check for working CXX compiler: /home/bv/dev/spack/lib/spack/env/gcc/g++ - works
13 -- Detecting CXX compiler ABI info
14 -- Detecting CXX compiler ABI info - done
15 -- Detecting CXX compile features
16 -- Detecting CXX compile features - done
>> 17 CMake Error at /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/daq-buildtools-spack-build-emjj3igo775a33qdcflofkh
luhbkn6xw/lib/cmake/daq-buildtools/daq-buildtoolsConfig.cmake:40 (include):
18 include could not find load file:
19
20 /home/bv/dev/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-8.4.0/daq-buildtools-spack-build-emjj3igo775a33qdcflofkhluhbkn6xw/l
ib64/cmake/daq-buildtools/DAQ.cmake
21 Call Stack (most recent call first):
22 CMakeLists.txt:5 (find_package)
23
24
>> 25 CMake Error at CMakeLists.txt:7 (daq_setup_environment):
26 Unknown CMake command "daq_setup_environment".
27
28
29 -- Configuring incomplete, errors occurred!
30 See also "/srv/bv/spack/stage/spack-stage-appfwk-spack-build-jmrldhz5xkasl22ssn5vqiknph67m4fx/spack-build/CMakeFiles/CMakeOutput.l
og".
(edit: fix paste)
Oh, this seems to be due to something hard-wiring RHEL-specific lib64/
convention.
In daq_buildtools
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
index 05c8291..c1fc4dd 100644
--- a/cmake/Config.cmake.in
+++ b/cmake/Config.cmake.in
@@ -12,7 +12,7 @@ include(CMakeFindDependencyMacro)
# set_and_check(targets_file ${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
# include(${targets_file})
-list(APPEND CMAKE_MODULE_PATH ${PACKAGE_PREFIX_DIR}/lib64/cmake/daq-buildtools)
-include(${PACKAGE_PREFIX_DIR}/lib64/cmake/daq-buildtools/DAQ.cmake)
+list(APPEND CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/daq-buildtools)
+include(@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/daq-buildtools/DAQ.cmake)
check_required_components(@PROJECT_NAME@)
With this and replacing lib64/
with lib/
in dunedaq-spack-repo/packages/daq-buildtools/package.py
I'm able to get through the buildign of appfwk
.
However, the patch above will lead a full hard-wired path making the resulting daq-buildtools
installation not portable.
My feeling is that this whole *.in
file is somehow wrong to try to use any platform-specific and installation-specific path information.
Okay, there were two broken things fighting each other.
I think these two patches should be applied. One to daq-buildtools
and one to this repo. I'll do some fresh-start test and make PRs against your forks of d-b and a-e, but in order not to lose the thread I'll drop them here too. First daq_buildtools
:
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
index 05c8291..4eb2c3a 100644
--- a/cmake/Config.cmake.in
+++ b/cmake/Config.cmake.in
@@ -12,7 +12,7 @@ include(CMakeFindDependencyMacro)
# set_and_check(targets_file ${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
# include(${targets_file})
-list(APPEND CMAKE_MODULE_PATH ${PACKAGE_PREFIX_DIR}/lib64/cmake/daq-buildtools)
-include(${PACKAGE_PREFIX_DIR}/lib64/cmake/daq-buildtools/DAQ.cmake)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+include(DAQ)
check_required_components(@PROJECT_NAME@)
diff --git a/cmake/DAQ.cmake b/cmake/DAQ.cmake
index 2030e23..906ffe5 100644
--- a/cmake/DAQ.cmake
+++ b/cmake/DAQ.cmake
@@ -29,8 +29,6 @@ macro(daq_setup_environment)
# Want find_package() to be able to locate packages we've installed in the
# local development area via daq_install(), defined later in this file
- set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../install )
-
add_compile_options( -g -pedantic -Wall -Wextra )
enable_testing()
and then the Spack recipe can now drop it's special fiddling with Spack's built-in CMake support:
diff --git a/dunedaq-spack-repo/packages/daq-buildtools/package.py b/dunedaq-spack-repo/packages/daq-buildtools/package.py
index 245f373..0e22779 100644
--- a/dunedaq-spack-repo/packages/daq-buildtools/package.py
+++ b/dunedaq-spack-repo/packages/daq-buildtools/package.py
@@ -43,17 +43,3 @@ class DaqBuildtools(CMakePackage):
version('1.1.4', sha256='4e330230f850e0322885a2a602d121cacad1c390123d05b7c40b79a10ebba72a')
version('1.1.5', sha256='dcf5345fbb2a3ffd6de029c58ea24fa261a53e7a6f67ae858d06619f1c701efd')
version('1.1.6', sha256='1364ae589fc5484b4312893d9d5d278296e4403bd17649c4414f3547994640f4')
-
- def setup_dependent_build_environment(self, env, dependent_spec):
- env.append_path('CMAKE_MODULE_PATH', '{0}/lib64/cmake'
- .format(self.prefix))
-
- def setup_dependent_run_environment(self, env, dependent_spec):
- env.append_path('CMAKE_MODULE_PATH', '{0}/lib64/cmake'
- .format(self.prefix))
-
- def setup_run_environment(self, env):
- env.append_path('CMAKE_MODULE_PATH', '{0}/lib64/cmake'
- .format(self.prefix))
-
-
See PR's philiprodrigues/appfwk-externals#4 and philiprodrigues/daq-buildtools#2. If they look good I think this issue is fixed.
PRs are merged. Thanks for the fixes!
For both the
develop
and1.1.0
versions ofappfwk
Spackpackage.py
I get a cmake error below.This is on Ubuntu 18.04 with #2 applied. I don't think the failure is due to using Ubuntu as the build host, but maybe.
Any ideas?