Author Topic: Changes for autotools builds planned  (Read 24770 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Changes for autotools builds planned
« on: July 13, 2007, 04:05:50 pm »
There are a couple of changes planned for autotools-based builds. They 're already implemented and working here for me but I will not commit them just yet because I won't be available during this weekend and so I wouldn't be able fix anything that may go wrong.

  • update-revision.sh will update the version-revision in the debian/changelog too so generated packages will have the correct name (in case you didn't know, update-revision.sh should be run after 'svn update' and before 'make clean-zipfiles').

  • The configure option '--enable-contrib=[yes|no]' is now obsolete. It has been replaced by the '--with-contrib=[all | plugin names separated with comma]'. So now you have the chance to avoid building contrib plugins you never use.

  • Building the debian packages will no longer generate a single codeblocks*.deb package. Instead, 4 packages will be generated: codeblocks (main package), codeblocks-contrib (contrib plugins), codeblocks-dbg (unstripped binaries of codeblocks for debugging) and codeblocks-devel (sdk headers and libraries).
That's about it. These changes will probably be committed on coming Monday.
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Changes for autotools builds planned
« Reply #1 on: July 13, 2007, 04:23:07 pm »
Thanks a lot for the update. :D

Waiting for the commit.
Be a part of the solution, not a part of the problem.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changes for autotools builds planned
« Reply #2 on: July 16, 2007, 01:55:03 pm »
Seeing no comments, I guess there are no objections :).

Another thing I 'd like feedback on is this: should one codeblocks-contrib package be created or one package per contrib-plugin? What do you think?
Be patient!
This bug will be fixed soon...

Offline PsYhLo

  • Almost regular
  • **
  • Posts: 157
Re: Changes for autotools builds planned
« Reply #3 on: July 16, 2007, 02:09:30 pm »
put POLL and will see :)
i'm for one codeblocks-contrib

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Changes for autotools builds planned
« Reply #4 on: July 16, 2007, 02:31:18 pm »
I'm for one codeblocks-contrib package, too.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changes for autotools builds planned
« Reply #5 on: July 16, 2007, 04:12:39 pm »
Changes committed.

--enable-contrib option has been replaced by --with-contrib-plugins=[all|comma-sep. plugin names].

Generated packages are:
  • libcodeblocks0
  • codeblocks
  • codeblocks-contrib
  • codeblocks-dbg
  • codeblocks-devel
  • libwxsmithlib0
  • libwxsmithlib0-devel

lintian has 0 (zero) complaints about the packages :).
« Last Edit: July 22, 2007, 05:06:19 pm by mandrav »
Be patient!
This bug will be fixed soon...

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Changes for autotools builds planned
« Reply #6 on: July 16, 2007, 04:29:46 pm »
Mandrav: is there a wiki entry explaining how to use these things correctly? (even just command lines and required packages for deb/rpm systems)

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: Changes for autotools builds planned
« Reply #7 on: July 16, 2007, 06:27:04 pm »
It seems this update has broken the build on my box
Code
dpkg-buildpackage: source package is codeblocks
dpkg-buildpackage: source version is 1.0svn4266
dpkg-buildpackage: source changed by Yiannis Mandravellos <mandrav@codeblocks.org>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 1.0svn4266
dpkg-checkbuilddeps: Unmet build dependencies: libstdc++6-4.0-dev
dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
libstdc++6-4.1 is installed on my box / Ubuntu7.04

And another one after modifying the control to point to 6-4.1
Code
dh_installexamples
dh_install --fail-missing --sourcedir=debian/tmp
cp: Aufruf von stat für „debian/tmp/usr/lib/libcodeblocks.so.0“ nicht möglich: No such file or directory
dh_install: command returned error code 256
make: *** [binary-arch] Fehler 1
« Last Edit: July 16, 2007, 06:34:33 pm by darthdespotism »

Offline cstudent

  • Almost regular
  • **
  • Posts: 159
    • Cstudent's Help Desk
Re: Changes for autotools builds planned
« Reply #8 on: July 17, 2007, 03:29:21 am »
I was able to successfully build the packages under Ubuntu Edgy using pbuilder and install & run it in Fiesty. I made a couple of tweaks. I changed wx to version 2.8 and I had to add libgtk2.0-dev to build depends. What we need now is a repository that one could add and get automatic updates of the packages.

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: Changes for autotools builds planned
« Reply #9 on: July 17, 2007, 04:10:17 am »
What we need now is a repository that one could add and get automatic updates of the packages.

That would be great  :D

anarxia

  • Guest
Re: Changes for autotools builds planned
« Reply #10 on: July 17, 2007, 05:07:52 am »
Just a few comments for the debian directory:
1. You basically hardcoded all dependencies. That's a big no-no for several reasons. You should use ${shlibs:Depends}.
    I can fix the packages to work correctly with ${shlibs:Depends} if you are interested and send a patch here.
2. The -devel prefix is -dev in the Debian/Ubuntu world.
3. You can build-depend on a specific version of libstdc++-dev, but you should also provide | libstdc++-dev as an alternative for people with
    other versions of g++.
4. You shouldn't install the .la files. All library packages remove those as they cause problems.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changes for autotools builds planned
« Reply #11 on: July 17, 2007, 08:41:36 am »
Just a few comments for the debian directory:
1. You basically hardcoded all dependencies. That's a big no-no for several reasons. You should use ${shlibs:Depends}.
    I can fix the packages to work correctly with ${shlibs:Depends} if you are interested and send a patch here.
2. The -devel prefix is -dev in the Debian/Ubuntu world.
3. You can build-depend on a specific version of libstdc++-dev, but you should also provide | libstdc++-dev as an alternative for people with
    other versions of g++.
4. You shouldn't install the .la files. All library packages remove those as they cause problems.

Thx for the comments. Patches are welcome ;)
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changes for autotools builds planned
« Reply #12 on: July 17, 2007, 02:02:43 pm »
Mandrav: is there a wiki entry explaining how to use these things correctly? (even just command lines and required packages for deb/rpm systems)


These are the generated packages (if one would build them). For installing them, use your distro's package manager(e.g. synaptic, dpkg, etc).
Also, there are dependencies between them so you can't, for example, install the 'codeblocks' package without first installing 'libcodeblocks0'. Your package manager would either install the dependencies automatically or, at the worst case scenario, tell you about what's missing.
Finally, the -dev(el) packages are only needed if you want to use the C::B SDK (w/out having C::B in source form available).
Be patient!
This bug will be fixed soon...

Offline Charon

  • Multiple posting newcomer
  • *
  • Posts: 49
  • fnord
    • charon - where mental illness meets chronic nonsense
Re: Changes for autotools builds planned
« Reply #13 on: July 17, 2007, 02:33:05 pm »
that looks quite nice :)

personally i think i would split the contrib plugins up into a few packages, but create a meta-package which references all of them.

the dev-package is a great idea btw!

greets
Markus
hi, i am a signature virus. please copy me into your sig!
Wish list : no root-node for workspaces, open files and symbols; world domination

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Changes for autotools builds planned
« Reply #14 on: July 17, 2007, 03:23:56 pm »
These are the generated packages (if one would build them)

yes, I want info on building the packages correctly (as opposed to installing them). I asked about dependencies because I assume that to build the packages there are several tools required (such as debhelper). I never did manage to create the deb package with the old setup and I figure I'm not the only person who would be interested in having this info in a readily accessible place

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Changes for autotools builds planned
« Reply #15 on: July 17, 2007, 04:58:57 pm »
is it as simple as this?
http://ubuntuforums.org/showpost.php?p=2039057&postcount=16
(obviously someone needs to update for most recent changes)

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: Changes for autotools builds planned
« Reply #16 on: July 17, 2007, 05:14:12 pm »
You can install Codeblocks like this but when you do this you will be unable to remove CB again vie apt

a simple way to additionally achive this is by installing checkinstall (I don't need to say how to install this right?) and typing sudo checkinstall instead of sudo make install.

Note that you need to change the version number so it doesn't contain any whitespaces any longer. You can do this in the interactive phase of checkinstall, it's quite simple.

A more complex way to build codeblocks is by typing sudo dpkg-buildpackage -uc -us (-b -nc) instead of make and make install and installing the generated *.deb(s).

dpkg-buildpackage doesn't work for me with the new autotools-setup but I hop it soon will. checkinstall and make install may or may not work with this update, you'll simply have to try and eventually check out a older debian/ directory meanwhile

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Changes for autotools builds planned
« Reply #17 on: July 17, 2007, 06:01:59 pm »
You can install Codeblocks like this but when you do this you will be unable to remove CB again vie apt

a simple way to additionally achive this is by installing checkinstall (I don't need to say how to install this right?) and typing sudo checkinstall instead of sudo make install.

he suggested the checkinstall command line in his post (at the bottom)

Quote
Note that you need to change the version number so it doesn't contain any whitespaces any longer. You can do this in the interactive phase of checkinstall, it's quite simple.

this is the sort of info I want in the wiki

Quote
A more complex way to build codeblocks is by typing sudo dpkg-buildpackage -uc -us (-b -nc) instead of make and make install and installing the generated *.deb(s).

dpkg-buildpackage doesn't work for me with the new autotools-setup but I hop it soon will. checkinstall and make install may or may not work with this update, you'll simply have to try and eventually check out a older debian/ directory meanwhile

I coudn't get dpkg-buildpackage to work on the old autotool-setup either, but that might be because is i didn't specify the correct options (i.e. "-uc -us" or "-b -nc"). again this is info that belongs in the wiki.

thanks for the tips

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: Changes for autotools builds planned
« Reply #18 on: July 17, 2007, 06:16:20 pm »
without -uc -us dpkg will try to sign the package and as you don't have Mandrav's keys it will complain but did not stop building.

-b forces dpkg to only build a binary-Package and -nc prevents it from cleaning all the sourcetree. You probably want to clean it however (I don't do it because building everything takes considerably more time).

Offline cstudent

  • Almost regular
  • **
  • Posts: 159
    • Cstudent's Help Desk
Re: Changes for autotools builds planned
« Reply #19 on: July 17, 2007, 06:22:52 pm »
I use dpkg-buildpackage all the time, so I don't know why it won't work for you. If you posted some error message, I might be able to tell you what is going on. I have a old tutorial on my website on how to build the packages, but it is a bit outdated. A person of some intelligence, which I'm sure you all qualify, should be able to use the info and apply to building a new package. One of these days I'm going to update it and include how I'm using pbuilder now to build the packages. pbuilder starts with a clean and lean os in a chroot environment and then forces you to get the depends right. Anyway, I use dpkg-buildpackage -D -S -us -uc -rfakeroot to create a .dsc file which I then use to run 'sudo pbuilder build nameoffile.dsc' to build the packages. I was able to build the new separate packages this way. However, I did make some tweaks to the control file under the debian folder. I changed the build depends section to use c++ 4.1, wx 2.8.4 and added libgtk2.0-dev.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changes for autotools builds planned
« Reply #20 on: July 17, 2007, 07:00:56 pm »
This is what I use to test the deb generation:

Code
fakeroot debian/rules binary

(this helps avoid lengthy recompile times)
(you obviously need to install the fakeroot package too)
Be patient!
This bug will be fixed soon...

anarxia

  • Guest
Re: Changes for autotools builds planned
« Reply #21 on: July 18, 2007, 01:10:20 am »
Just a few comments for the debian directory:
1. You basically hardcoded all dependencies. That's a big no-no for several reasons. You should use ${shlibs:Depends}.
    I can fix the packages to work correctly with ${shlibs:Depends} if you are interested and send a patch here.
2. The -devel prefix is -dev in the Debian/Ubuntu world.
3. You can build-depend on a specific version of libstdc++-dev, but you should also provide | libstdc++-dev as an alternative for people with
    other versions of g++.
4. You shouldn't install the .la files. All library packages remove those as they cause problems.

Thx for the comments. Patches are welcome ;)

I uploaded the patch in the BerliOS site. (patch #002100).

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: Changes for autotools builds planned
« Reply #22 on: July 18, 2007, 06:27:01 pm »
Not sure if it goes here right but the rev-Number should be upgraded in the changelog right?

Here it stays 4268 as is the Version in the Repos.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changes for autotools builds planned
« Reply #23 on: July 18, 2007, 08:18:21 pm »
Not sure if it goes here right but the rev-Number should be upgraded in the changelog right?

Here it stays 4268 as is the Version in the Repos.

It isn't updated automatically. You must run 'update-revision.sh' yourself (after 'svn update').
Be patient!
This bug will be fixed soon...

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: Changes for autotools builds planned
« Reply #24 on: July 18, 2007, 09:20:47 pm »
ok thank you ;)

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Changes for autotools builds planned
« Reply #25 on: July 21, 2007, 07:55:40 pm »
Now that I 'm also struggling with automake, adding a contrib plugin I have an idea on the generation of codeblocks packages. Instead of one codeblocks-contrib break it up in various codeblocks-contrib-<plugin name> and probably when the time comes to add it in a repository create a meta package named codeblocks-contrib that will install the "officially approved" plugins. It was a great help to use the existing automake structure you have for codeblocks to add another contrib but there is no point to creating a codeblocks-contrib including my plugin as the official one will not include it.

Oh and Yianni, in http://forums.codeblocks.org/index.php/topic,6428.msg49530.html#msg49530 you have a little typo that cost me  :lol:
« Last Edit: July 21, 2007, 08:18:56 pm by yop »
Life would be so much easier if we could just look at the source code.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changes for autotools builds planned
« Reply #26 on: July 22, 2007, 05:08:04 pm »
Now that I 'm also struggling with automake, adding a contrib plugin I have an idea on the generation of codeblocks packages. Instead of one codeblocks-contrib break it up in various codeblocks-contrib-<plugin name> and probably when the time comes to add it in a repository create a meta package named codeblocks-contrib that will install the "officially approved" plugins. It was a great help to use the existing automake structure you have for codeblocks to add another contrib but there is no point to creating a codeblocks-contrib including my plugin as the official one will not include it.

Yes, that's what's being planned for later. Separate package for each contrib plugin and a meta-package providing them all :).

Oh and Yianni, in http://forums.codeblocks.org/index.php/topic,6428.msg49530.html#msg49530 you have a little typo that cost me  :lol:

Thx, corrected it :).
Be patient!
This bug will be fixed soon...

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: Changes for autotools builds planned
« Reply #27 on: August 08, 2007, 10:46:56 pm »
I got whole bunch of errors when testing the generated packages using linda. The errors are mainly generated by the platform dependent files i.e. plugins in /usr/share/codeblocks/ directory.

EDIT: Could someone modify the line endings in "debian/control" file to LF only.
« Last Edit: August 09, 2007, 11:28:39 am by artoj »