czmq icon indicating copy to clipboard operation
czmq copied to clipboard

Differences in the list of installed header files between builds made using cmake and autotools

Open dwrobel opened this issue 3 years ago • 2 comments
trafficstars

Building/installing czmq provides different list of installed header files depending whether cmake or autotools is being used.

I did a build/install of czmq-4.2.1.tar.gz using both cmake:

mkdir build && cd build
cmake ..
make -j$(getconf _NPROCESSORS_ONLN)
make install DESTDIR=$PWD/out

and autotools:

./configure --prefix=$PWD/out
make -j$(getconf _NPROCESSORS_ONLN)
make install

Then I list files installed in the include directory and compare them:

$ diff -u installed-files.autotools installed-files.cmake 
--- installed-files.autotools	2022-08-17 15:24:20.890743054 +0200
+++ installed-files.cmake	2022-08-17 15:24:24.685760115 +0200
@@ -2,6 +2,11 @@
 ./czmq.h
 ./czmq_library.h
 ./czmq_prelude.h
+./readme.txt
+./sha1.h
+./sha1.inc_c
+./slre.h
+./slre.inc_c
 ./zactor.h
 ./zarmour.h
 ./zauth.h
@@ -16,8 +21,11 @@
 ./zdir_patch.h
 ./zfile.h
 ./zframe.h
+./zgossip_engine.inc
 ./zgossip.h
+./zgossip_msg.h
 ./zhash.h
+./zhash_primes.inc
 ./zhashx.h
 ./ziflist.h
 ./zlist.h
@@ -29,6 +37,7 @@
 ./zproxy.h
 ./zrex.h
 ./zsock.h
+./zsock_option.inc
 ./zstr.h
 ./zsys.h
 ./zuuid.h

It looks that cmake based build install much more files.

The real problem with those extra files I have is that Fedora is using cmake to build czmq and when I've tried to package and install libmd library then I'm receiving conflict of duplicated files:

Error: Transaction test error:
  file /usr/include/sha1.h from install of libmd-devel-1.0.4-1.fc36.x86_64 conflicts with file from package czmq-devel-4.2.1-4.fc36.x86_64

My guess is that those superfluous files installed when building using cmake are not needed and shouldn't be installed?

dwrobel avatar Aug 17 '22 13:08 dwrobel

any suggestions for a fix? The build scripts are generated by zproject so it needs fixing there then

sphaero avatar Sep 21 '22 08:09 sphaero

This is still an issue. See also #2197

smac89 avatar Jul 27 '23 19:07 smac89