LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Error building a DEB library package (http://www.linuxquestions.org/questions/programming-9/error-building-a-deb-library-package-4175430904/)

towheedm 10-06-2012 09:14 PM

Error building a DEB library package
 
I've asked this on the Debian Forums site also.

I have successfully (at several times) build a single binary package with dh_make and debuild. I'm now trying to build a library package but have been stuck with different errors.

I'm presently trying to build the library package for libexcfeutil-4.10.0. I've debianized the source with dh_make -l and edited the respective files in the debian directory. This is my control file:
Code:

Source: libxfce4util
Priority: optional
Maintainer: Towheed Mohammed <e-mail edited>
Build-Depends: debhelper (>= 7.0.50~), autotools-dev
Standards-Version: 3.9.1
Section: xfce
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://git.debian.org/collab-maint/libxfce4util.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/libxfce4util.git;a=summary

Package: libxfce4util-dev
Section: libdevel
Architecture: any
Depends: libxfce4util6 (= ${binary:Version})
Description: This package contains the header files for libxfce4util6
 A long summanry.

Package: libxfce4util6
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: This package contains the lib files
 Another long summary.

And my rules file:
Code:

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
    dh_testdir
    dh_auto_clean
    dh_clean
    dh_testdir
    dh_auto_configure -- --disable-debug
    dh_auto_build
    dh_auto_test
    dh_testdir
    dh_testroot
    dh_installchangelogs
    dh_installdocs
    dh_installdirs
    dh_auto_install
    dh_install
    dh_compress
    dh_fixperms
    dh_strip
    dh_makeshlibs
    dh_shlibdeps
    dh_installdeb
    dh_gencontrol
    dh_md5sums
    dh_builddeb

After running:
Code:

debuild -us -uc
the build fails with the following error:
Code:

dh_install
dh_install: libxfce4util-dev missing files (usr/lib/lib*.a), aborting
make: *** [clean] Error 255
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
debuild: fatal error at line 1325:
dpkg-buildpackage -rfakeroot -D -us -uc failed

After much searching and reading:
http://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html#ftn.id249924
http://myitcorner.com/blog/?p=217
https://wiki.ubuntu.com/MOTU/School/LibraryPackaging
together with the usual Debian docs, I've found this post:
http://unix.stackexchange.com/questi...-libraries-deb

After reading that post, I changed the dh_auto_configure line in the rules file to:
Code:

    dh_auto_configure -- --disable-debug --enable-static
But now after debuild I get this error:
Code:

dh_install
dh_install: libxfce4util-dev missing files (usr/share/pkgconfig/*), aborting
make: *** [clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
debuild: fatal error at line 1325:
dpkg-buildpackage -rfakeroot -D -us -uc failed

So I set my PKG_CONFIG_PATH env var to:
Code:

export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"
but I get the same error.

This is my debian/libxfce4util-dev.install file:
Code:

usr/include/*
usr/lib/lib*.a
usr/lib/lib*.so
usr/lib/pkgconfig/*
usr/lib/*.la
usr/share/pkgconfig/*

I've been at this for the last week and now I'm at my wits end.

I'd really appreciate any help and/or guidance in solving this.

Thanks.

bts 10-12-2012 11:59 AM

Hi,

It's been a while since I built a debian library package, but you can check your debian/libxfce4util-dev.install file and make sure you don't try to install files that don't exist, e.g. *.a files are not in a dynamic library so you can remove that line.

BR
Tommy


All times are GMT -5. The time now is 03:05 PM.