这是编译和链接一个静态库(所以只有一个构建时间依赖),源是从一个存储库中提取(就像主程序的源代码)在Ubuntu的启动板构建机器人。如何从pbuilder env debian/rules脚本中使用cmake的'make install'?
目前我在做什么:
#!/usr/bin/make -f
export PREFIX=/usr
export CFLAGS= -O3 -fomit-frame-pointer -flto -fwhole-program
export CXXFLAGS= -O3 -fomit-frame-pointer -flto -fwhole-program
%:
dh [email protected]
override_dh_auto_configure:
cd src/munt;cmake -DCMAKE_CXX_FLAGS="-O3 -fomit-frame-pointer -flto" mt32emu;make;make install
#...compile of the program that depends on mt32emu...
但它失败:
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libmt32emu.a
CMake Error at cmake_install.cmake:36 (FILE):
file INSTALL cannot copy file
"/tmp/buildd/dosbox-0.74+20121225/src/munt/libmt32emu.a" to
"/usr/local/lib/libmt32emu.a".
make[2]: *** [install] Error 1
make[2]: Leaving directory `/tmp/buildd/dosbox-0.74+20121225/src/munt'
make[1]: *** [override_dh_auto_configure] Error 2
make[1]: Leaving directory `/tmp/buildd/dosbox-0.74+20121225'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package
I: unmounting /var/cache/pbuilder/ccache filesystem
I: unmounting dev/pts filesystem
I: unmounting proc filesystem
I: cleaning the build env
I: removing directory /var/cache/pbuilder/build//2751 and its subdirectories
的想法是要安装没有打包在Ubuntu软件库在Launchpad中pbuilder静态库的依赖env,因此可以像使用系统依赖一样使用它。
如果我尝试做'sudo make install'(并且在debian/control中为build-deps添加sudo),它会在本地测试时询问'pbuilder'的密码,机器上的Ubuntu的buildbots。
编辑:它实际上在buildbots上失败,因为'没有指定tty present和没有askpass程序'。