dh_install -O--buildsystem=cmake dh_install:缺少文件:usr/lib/*/lib*.so

dh_install -O--buildsystem=cmake dh_install:缺少文件:usr/lib/*/lib*.so

我正在尝试发布我的构建项目在 launchpad 上添加到 ppa。该项目是一个名为“base”的库。

bzr builddeb -- -us -uc -sd尝试虚假安装时失败并出现以下错误dev软件包的版本。

...
...
Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "None"
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so.1.0
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so.1
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/myxml.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/Socket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/ClientSocket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/mycurl.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/mystdlib.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/ServerSocket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/JPEGImage.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/SocketException.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/FerryTimeStamp.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/myconverters.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/baseConfig.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/pkgconfig/libbase.pc
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/share/pkgconfig/libbase.pc
make[1]: Leaving directory '/home/gowtham/Packages/build-area/base-1.1/obj-x86_64-linux-gnu'
  dh_install -O--buildsystem=cmake
dh_install: base-dev missing files: usr/lib/*/lib*.so
dh_install: base-dev missing files: usr/lib/*/pkgconfig/*
dh_install: base1 missing files: usr/lib/*/lib*.so.*
dh_install: missing files, aborting
debian/rules:11: recipe for target 'binary' failed
make: *** [binary] Error 20
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -sd failed
bzr: ERROR: The build failed.

如何builddeb区别dev安装时的软件包版本header files

debian/规则

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

override_dh_auto_test:
override_dh_usrlocal:

%:
    dh $@ --buildsystem=cmake

答案1

base-dev.install和中的路径base1.install是错误的。

dh_install: base-dev missing files: usr/lib/*/lib*.so
dh_install: base-dev missing files: usr/lib/*/pkgconfig/*
dh_install: base1 missing files: usr/lib/*/lib*.so.*

它们将正确如下所示并且可以构建包:

usr/lib/lib*.so
usr/lib/pkgconfig/*

usr/lib/lib*.so.*

但是您会收到对于多架构系统安装来说不安全的lintian消息。/usr/lib/

  • 要么你在源代码级别修复它(作为上游开发人员),然后cmake安装那些文件到/usr/lib/<HOST-ARCH-FOLDER>/。这才是正确的方法。

  • 或者,你可以在包装级别(作为包装者)修复它,通过覆盖安装路径base-dev.installbase1.install

    #!/usr/bin/dh-exec
    
    usr/lib/lib*.so /usr/lib/${DEB_HOST_MULTIARCH}
    usr/lib/pkgconfig/* /usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
    
    usr/lib/lib*.so.* /usr/lib/${DEB_HOST_MULTIARCH}
    

相关内容