prof7bit / LazPackager

Lazarus IDE-plugin: Create a Debian package (.deb) or a Debian source package from your existing Lazarus project and upload to Launchpad PPA for automated building and packaging with one or two mouse clicks
25 stars 10 forks source link

Fatal error #1

Closed dibok closed 12 years ago

dibok commented 12 years ago

Hi,

When I try to build debian package I get errors:

make: *\ [build] Błąd 2 dpkg-buildpackage: błąd: debian/rules build return error 2 debuild: fatal error at line 1350: dpkg-buildpackage -rfakeroot -d -us -uc -b failed

Regards

prof7bit commented 12 years ago

please post the entire output, the error must have happened earlier.

If it had worked before and stopped working after you updated today or yesterday then it most likely because I removed the makefile entirely and do everything with the rules file alone. Then you need to reset the debian/rules template in your project's debian settings because I changed the default significantly (I hope this will be the last incompatible change I made).

dibok commented 12 years ago

I don't used lazpackager before. I downloaded it yesterday first time. This is all output (I translated some messages from polish to english, so they could sound different in original):

dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2 dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro dpkg-buildpackage: source package debian-package-name dpkg-buildpackage: source package version 0.0.0.0-1 dpkg-buildpackage: source changed by John Doe john_doe@example.invalid dpkg-source --before-build debian-package-name-0.0.0.0 dpkg-buildpackage: guest arch amd64 fakeroot debian/rules clean dh clean dh_testdir dh_auto_clean dh_clean debian/rules build dh build dh_testdir dh_auto_configure debian/rules override_dh_auto_build make[1]: Entering directory /home/dibo/programowanie/projects/memory/DEBUILD/debian-package-name-0.0.0.0' lazbuild project1.lpi make[1]: lazbuild: Command not found make[1]: *** [override_dh_auto_build] Error 127 make[1]: leaving directory/home/dibo/programowanie/projects/memory/DEBUILD/debian-package-name-0.0.0.0' make: *\ [build] Error 2 dpkg-buildpackage: błąd: debian/rules build returned error status 2 debuild: fatal error at line 1350: dpkg-buildpackage -rfakeroot -d -us -uc -b failed

prof7bit commented 12 years ago

it cannot find lazbuild in the path. Please create a symlink to lazbuild in /usr/bin

sudo ln -sf /path/to/your/lazarus/directory/lazbuild /usr/bin/lazbuild

The debian packages for installing lazarus would have done this automatically but when you have compiled lazarus yourself from source then the lazbuild tool is only in your lazarus directory and cannot be found from outside. The alternative would be to edit the rules file to use the absolute path of lazbuild on your machine but then you could not make it compile on any other computer anymore (for example on the launchpad build servers), so I think adding the symlink to /usr/bin (doing the same what a regular Lazarus installation would have done) is the best way.

dibok commented 12 years ago

Thanks! I'm using CodetTyphon 2.90 so lazbuild path is different

BTW: Are you planning add free desktop launch menu support? Because now my application doesn't appear in applications menu

prof7bit commented 12 years ago

On , dibok notifications@github.com wrote:

Thanks! I'm using CodetTyphon 2.90 so lazbuild path is different

BTW: Are you planning add free desktop launch menu support? Because now
my application doesn't appear in applications menu

I'm not yet sure, maybe I make it an option. It would need a few more lines
in debian/rules to copy the needed files to $(ROOT)/usr/share/applications
and $(ROOT)/usr/share/pixmaps (and I'm not yet sure whether I should make
it insert these lines automatically or whether the user should insert them,
maybe I could let the user choose between two different default rules files
templates) and IF I do it I would also need to generate the .desktop file
and make sure there alway is an .png icon file there automatically. I'm
still thinking about how I could solve this automatically and elegantly
without making it all too complicated.

If you want to add this manually you can just make an icon, a .desktop
file, put them somewhere next to your source, then on the "Options" page
add the commands to export them along with the source code to the
tempfolder and in the "debian/rules" in the section
override_dh_auto_install add commands to install the files to
$(ROOT)/usr/share/...

Maybe alternatively instead of automating every possible use case I could
instead provide some documentation with a few different
example "debian/rules" files for several different purposes and
explanations what they do and how to use them.

If your project becomes more complex with many more files I recommend
creating your own makefile with your own "all", "clean" and "install"
targets and use the debian/rules file only to call into your own makefile.

prof7bit commented 12 years ago

I'm marking this issue as closed now since I assume the original problem is solved