Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm new to package creation and I'm trying to create a .deb package and keep getting 'unstripped-binary-or-object' on all my libraries and executables.

I have everything setup in the directory tree where I want them to end up (and a DEBIAN folder with the control file) and then do

fakeroot dpkg-deb --build ./mypackage

when I lint with lintian mypackage.deb

I get that error.

Any ideas or suggestions?

Thanks

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Use objcopy or strip from binutils to strip debug symbols from the binaries that you are building. I would, however, suggest that you either keep an unstripped copy of the binaries or - in case of using objcopy - simply split off the debug symbols into a separate file that can later be used with a debugger.

Often the *-devel packages come with symbols of the corresponding * package, by the way. So you may want to consider creating one of those in addition, if this is something you release to the general public.

For strip a common use is to only strip the debugging symbols:

strip -S -o [stripped-file] [input-file]

The switch corresponding to strip -S for is objcopy -g or simply use the long form that works for both (but not on all platforms on which I had to use strip): --strip-debug.

For the described use of splitting the debug symbols using objcopy, check out the option --only-keep-debug in man objcopy.

share|improve this answer
    
Great. Thanks, that solved my problem –  Jaime Nov 15 '12 at 18:17
    
For me calling objcopy --strip-debug was not sufficient to please lintian. I also had to add --strip-unneeded: objcopy --strip-debug --strip-unneeded –  abergmeier Jul 5 '13 at 8:00
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.