I'm trying to package an already compiled set of binaries including doc, header files, usage examples, etc...

The installation instruction of the original binaries recommends to just copy all files to a directory below /usr

So I've made the following debian/install:

bin/* /usr/tigcc/bin
doc/* /usr/tigcc/doc
examples/* /usr/tigcc/examples
include/* /usr/tigcc/include
lib/* /usr/tigcc/lib
projects/* /usr/tigcc/projects

Now I'm using debuild -uc -us -sa to generate the .deb file. I'm confronted with this error:

 dpkg-genchanges -sa >../tigcc_0.95-0ubuntu2_amd64.changes
dpkg-genchanges: Fehler: Dateienliste-Datei kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
#translation: error: couldn't read file list file: File or directory not found

Why am I getting this error? What am I doing wrong?

Edit: debian/rules

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

export DH_VERBOSE=1

        dh $@

(default from some packaging guide)

Edit: ls -lhR debian

total 36K
-rw-rw-r-- 1 sebastian sebastian  147 Feb 22 15:45 changelog
-rw-rw-r-- 1 sebastian sebastian    2 Feb 21 23:46 compat
-rw-rw-r-- 1 sebastian sebastian  454 Feb 23 12:43 control
-rw-rw-r-- 1 sebastian sebastian 1.2K Feb 23 12:19 copyright
-rw-rw-r-- 1 sebastian sebastian  148 Feb 26 21:39 install
-rw-rw-r-- 1 sebastian sebastian  102 Feb 23 12:13 postinst
-rw-rw-r-- 1 sebastian sebastian   79 Feb 23 12:13 preinst
-rwxr-xr-x 1 sebastian sebastian   85 Feb 26 21:39 rules
drwxrwxr-x 2 sebastian sebastian 4.0K Feb 21 23:11 source

total 4.0K
-rw-rw-r-- 1 sebastian sebastian 12 Feb 21 23:11 format

EDIT: I tried to create a file debian/files, just because I somehow thought it might help. The error vanished, but debuild just said "nothing to build" a few times and finished without generating a package at all.

Edit: Following the request of one of the people trying to help me, I'm now supplying links to the files used.

The original binaries can be found here, the stuff below debian here.

NOTE: These link point directly to tar archives.

  • How did you obtain the compiled files? Perhaps you want this: askubuntu.com/questions/140998/… .
    – landroni
    Feb 26, 2014 at 17:18
  • I've downloaded the binaries from TIGCC's website and asked the developers what should be installed where
    – s3lph
    Feb 26, 2014 at 19:16
  • you need a debian/rules file. Do you have that?
    – landroni
    Feb 26, 2014 at 19:55
  • Please post the output of ls -lhR debian.
    – landroni
    Mar 4, 2014 at 14:27
  • What is in debian/compat exactly?
    – dobey
    Mar 4, 2014 at 18:50

2 Answers 2


Remove the preceding / character in the /usr/tigcc/… statements in the install file.

Also, you should either make that be opt/tigcc/… or remove the tigcc bit and install them properly integrated into the FHS standard paths, depending on what the binaries are compiled to expect exactly.

Also, add --fail-missing as an argument to dh, like:

    dh $@ --fail-missing

This will cause the build to fail when installed files are not included in the package.

  • So it's only usr/tigcc/bin etc. Instead of /usr...?
    – s3lph
    Feb 26, 2014 at 20:36
  • removing the leading /s didn't have an effect. Still the same error: cannot read files list file: No such file or directory
    – s3lph
    Feb 26, 2014 at 20:41

OK, I will suggest a hackish workaround. Make a backup, then get rid of install, postinstall, preinstall. Then in rules add the following at the end of the file:

    mkdir debian/packagename
    mv bin/* debian/packagename/usr/tigcc/bin
    mv doc/* debian/packagename/usr/tigcc/doc
    mv examples/* debian/packagename/usr/tigcc/examples
    mv include/* debian/packagename/usr/tigcc/include
    mv lib/* debian/packagename/usr/tigcc/lib
    mv projects/* debian/packagename/usr/tigcc/projects

Then make a copy of the entire dir containing the debian folder and the rest of the pre-compiled binaries, and on that try to build binaries by using debuild -b -us -uc. I suspect that this should work, but make sure that all the paths are correct and that all file move operations proceed as expected.


I played with the linked binaries and debian dir. I had to adjust the file names, the folder structure and the control and rules directives.

To reproduce the .deb, you need to unpack the binary archive, unpack the debian dir within the extracted tigcc dir, then run debuild -b -us -uc from within the debian folder. Put both archives in a temporary folder, then:

bzip2 -d -c "tigcc-0.95_orig.tar.bz2" | tar -xf - 
cd tigcc/
tar -zxf  "../tigcc-debian.tar.gz"
cd debian/
debuild -b -us -uc
ls -l ../../*deb

Unless you have some missing dependencies, I don't see why this wouldn't work.

  • It shows the same error...
    – s3lph
    Mar 5, 2014 at 15:14
  • OK, then you need to provide a link to the pre-compiled binaries, and to the tar.gz of the debian dir. Otherwise it's a lot of guesswork, and perhaps something is simply to placed in the correct dir.
    – landroni
    Mar 5, 2014 at 15:36
  • @the_Seppi I've now posted the .deb and the archives with the necessary folder/file structure to make it work. Inspect at leisure and feel free to ask questions.
    – landroni
    Mar 6, 2014 at 13:56
  • Followed all your instructions, still dpkg-genchanges: error: cannot read files list file: No such file or directory
    – s3lph
    Mar 6, 2014 at 20:18
  • See updated post.
    – landroni
    Mar 6, 2014 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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