Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to package a shared library using debuild to build the .deb file. In runnign dh_make the library option was selected. Have been following this guide Having managed to build the library, i'm getting the foillowing error:

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

I looked inside the directory listed in the error, e.g. ~/mylibrary-1.0/debian/mylibrary-dev/usr/lib/ and it empty. The shared libraries are actually in: ~/mylibrary-1.0/debian/tmp/usr/lib/ However there are no *.a libs in there. The mylibrary-dev.install file list the following:

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

For some reason an extra package is listed in the control file.

Source: mylibrary
Priority: extra
Maintainer: satpal <satpal@unknown>
Build-Depends: debhelper (>= 7.0.50~), autotools-dev
Standards-Version: 3.8.4
Section: libs
Homepage: <insert the upstream URL, if relevant>

Package: mylibrary-dev
Section: libdevel
Architecture: any
Depends: mylibrary1 (= ${binary:Version})
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>

Package: mylibrary1
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>

Following the helloworld example used in the guide, it only comes up with Source and a single package

Sorry for long post, just wanted ensure there was enough info.

Thanks

EDIT (@Gilles) my rules file is:

#!/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 $@

I don't know howto attached an archive, or if i have enough rep to attached one.

share|improve this question
    
Every shared library must be packaged separately, so that you can install several versions simultaneously in case you have programs that depend on them. So the control file looks normal. Your build scripts aren't building the .a file. Post your debian/rules file, and preferably a complete archive with enough source code (not your whole source, just a tiny program that compiles) and build scripts to reproduce your problem. –  Gilles Aug 12 '11 at 23:19
    
You can add a link to a tarball somewhere, or (possibly better) put it on a hosting site like bitbucket or github and give the link to that. If you can't strip down your example, at least provide complete instructions on how to reproduce your error. –  Faheem Mitha Aug 16 '11 at 9:01
add comment

1 Answer 1

up vote 1 down vote accepted

I re-read Gilles comment on my orignal post and managed to work out why I had no .a files. It was because I had actually stopped the creation of the static library in the configure.ac with the flag:

AM_DISABLE_STATIC

A big D'oh on my part.

Thanks for your help.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.