seqan icon indicating copy to clipboard operation
seqan copied to clipboard

Debian/Ubuntu package installs cmake file in wrong directory

Open h-2 opened this issue 7 years ago • 16 comments

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 avatar Feb 07 '18 15:02 h-2

@h-2 Yes, I had to manually specify util/cmake/seqan-config.cmake usr/share/cmake/ as otherwise it didn't install.

mr-c avatar Feb 08 '18 14:02 mr-c

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.

h-2 avatar Feb 08 '18 16:02 h-2

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!

mr-c avatar Feb 08 '18 17:02 mr-c

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

mr-c avatar Feb 08 '18 17:02 mr-c

@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 :-/

mr-c avatar Feb 08 '18 17:02 mr-c

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 avatar Feb 09 '18 13:02 h-2

@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

mr-c avatar Feb 10 '18 18:02 mr-c

I think this issue can be closed: https://packages.debian.org/sid/amd64/libseqan2-dev/filelist

mr-c avatar Feb 16 '18 13:02 mr-c

@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

h-2 avatar Feb 16 '18 18:02 h-2

I think this issue can be closed:

Cool, thanks!

h-2 avatar Feb 16 '18 18:02 h-2

Actually, no. The cmake file is still: /usr/share/cmake/seqan-config.cmake

As noted in my initial post, this directory is not searched.

h-2 avatar Feb 16 '18 18:02 h-2

Finally fixed in https://packages.debian.org/sid/any/libseqan2-dev/filelist

mr-c avatar Feb 18 '18 13:02 mr-c

Now you are installing two:

/usr/share/cmake/seqan-config.cmake
/usr/share/cmake/seqan/seqan-config.cmake

Is that intentional?

h-2 avatar Feb 18 '18 18:02 h-2

@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 😂

mr-c avatar Feb 19 '18 06:02 mr-c

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 avatar Feb 19 '18 07:02 mr-c

@mr-c Is the double config install fixed? Can I close this issue? Thanks!

h-2 avatar Nov 19 '18 17:11 h-2