How-to 'make install' a static library from debian/rules to be used on the main program compile as a dependency?

Asked by i30817

The idea is to nest/merge a (static) library on the launchpad recipe i'm trying to build (launchpad uses pbuilder) and then build it from source and 'make install' so that the dependency that the main program needs is installed in the build env even though it it still not on the ubuntu repositories.

Doing it like this:

    #!/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 $@
        cd src/munt;cmake -DCMAKE_CXX_FLAGS="-O3 -fomit-frame-pointer -flto" mt32emu;make;make install
#...compile of the program that depends on mt32emu...

but it give this error:
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

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

If it try to use 'sudo make install' (and add sudo to the build-deps in debian/control), on the local tests i did, it asks for the 'pbuilder' password, which i don't know, and which will probably fail on launchpad no?

Question information

English Edit question
Ubuntu pbuilder Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

  file INSTALL cannot copy file
  "/tmp/buildd/dosbox-0.74+20121225/src/munt/libmt32emu.a" to

Did you run:

sudo make install


Revision history for this message
actionparsnip (andrew-woodhead666) said :

There is a PPA for the latest DOSBox. Is this not what you want?

Revision history for this message
i30817 (i30817) said :

that ppa is mine. Question can be closed. The solution was that i missed it was possible to 'link as a ppa dependency' another ppa. So that other ppa could build the library and the others that use it 'depend' on it and then the build-deps on their debian/control file would work.