Debian/Ubuntu package installs cmake file in wrong directory
Currently:, /usr/share/cmake/seqan-config.cmake
This is apparently not searched by cmake :disappointed:
The manual states that these dirs are searched:
<prefix>/(lib/<arch>|lib|share)/cmake/<name>*/ (U)
<prefix>/(lib/<arch>|lib|share)/<name>*/ (U)
<prefix>/(lib/<arch>|lib|share)/<name>*/(cmake|CMake)/ (U)
So the following would be ok for example:
/usr/share/cmake/seqan/seqan-config.cmake
/usr/share/seqan/seqan-config.cmake
/usr/share/seqan/cmake/seqan-config.cmake
@mr-c Are you specifying the target directory manually? Since #2058 we are using GNUInstallDirs which supposedly helps get distribution specific paths right (it was requested by the Gentoo poeple) so IMHO it should already be placed in the correct Debian system path :thinking:
@h-2 Yes, I had to manually specify util/cmake/seqan-config.cmake usr/share/cmake/ as otherwise it didn't install.
Hm, I have looked at the Debian scripts, and it seems you are doing most of the actual packaging manually by copying the files and doing sed on some of them. Is there a particular reason for not using the cmake-targets?
E.G. for libseqan2-dev, it would be SEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY. It ensures that all the CMAKE variables are replaced in the files and also uses the aforementioned GNUInstallDirs to figure out all the correct target directories for the distribution. It seems this would be less to maintain / more robust, but maybe I am overlooking something (I know that Debian is quite particular about stuff – often for good reasons, but resulting in more work :wink:).
CMake can even directly generate .deb files if you call make package, but that will quite likely not include the correct metadata.
Is there a particular reason for not using the cmake-targets? E.G. for libseqan2-dev, it would be SEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY.
No particular reason; I think too much else was "on fire" to polish that. I'm trying that out now, so far it looks good, thanks!
From https://buildd.debian.org/status/fetch.php?pkg=seqan2&arch=mips&ver=2.4.0%2Bdfsg-3&stamp=1518109921&raw=0 which has no build parallelism
[ 16%] Building CXX object tests/seeds/CMakeFiles/test_seeds_banded_chain_alignment_interface.dir/test_banded_chain_alignment_interface.cpp.o cd /<<BUILDDIR>>/seqan2-2.4.0+dfsg/obj-mips-linux-gnu/tests/seeds && /usr/bin/c++ -DSEQAN_DISABLE_VERSION_CHECK -DSEQAN_ENABLE_TESTING=1 -DSEQAN_HAS_BZIP2=1 -DSEQAN_HAS_EXECINFO=1 -DSEQAN_HAS_OPENMP=1 -DSEQAN_HAS_ZLIB=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/<<BUILDDIR>>/seqan2-2.4.0+dfsg/include -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/seqan2-2.4.0+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -mxgot -DNDEBUG -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -W -Wall -pedantic -fopenmp -DSEQAN_GLOBAL_EXCEPTION_HANDLER=1 -o CMakeFiles/test_seeds_banded_chain_alignment_interface.dir/test_banded_chain_alignment_interface.cpp.o -c /<<BUILDDIR>>/seqan2-2.4.0+dfsg/tests/seeds/test_banded_chain_alignment_interface.cpp
cc1plus: out of memory allocating 3021224 bytes after a total of 77643776 bytes tests/seeds/CMakeFiles/test_seeds_banded_chain_alignment_interface.dir/build.make:65: recipe for target 'tests/seeds/CMakeFiles/test_seeds_banded_chain_alignment_interface.dir/test_banded_chain_alignment_interface.cpp.o' failed
FYI: something really odd has happened to the build memory requirements...
@h-2 Ah, I remember the problem now. We can't combine -DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY and -DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_APPS in a single build :-/
But can't you make two successive builds? Or even two independent ones? I mean, I have no strong feelings either way, I just thought it could reduce the maintenance overhead.
In any case the install path of the cmake file needs to be adapted!
@h-2 Not really. Could we have another SEQAN_BUILD_SYSTEM that does it all?
I've fixed the path of the cmake file already: https://tracker.debian.org/media/packages/s/seqan2/changelog-2.4.0dfsg-4
I think this issue can be closed: https://packages.debian.org/sid/amd64/libseqan2-dev/filelist
@h-2 Not really. Could we have another SEQAN_BUILD_SYSTEM that does it all?
We have the DEVELOP target that builds everything, but it doesn't install :disappointed:
I would prefer not to make any more structural changes in the Seqan2-build-system
I think this issue can be closed:
Cool, thanks!
Actually, no. The cmake file is still: /usr/share/cmake/seqan-config.cmake
As noted in my initial post, this directory is not searched.
Finally fixed in https://packages.debian.org/sid/any/libseqan2-dev/filelist
Now you are installing two:
/usr/share/cmake/seqan-config.cmake
/usr/share/cmake/seqan/seqan-config.cmake
Is that intentional?
@h-2, yeah I saw that. Not intentional, but I'm not in a hurry to fix it either. Trying not to wear down our build machines 😂
And the mips* builds are restored thanks to Adrian Bunk [email protected] by reducing the amount of debugging symbols preserved with -g1 on those platforms.
@mr-c Is the double config install fixed? Can I close this issue? Thanks!