Author Topic: Changing the build enviornment  (Read 18318 times)

RShadow

  • Guest
Changing the build enviornment
« on: June 25, 2005, 04:06:35 pm »
First let me say that I'm really excited about Code::Blocks.  For the past couple of months I have been working on a cross platform IDE just like this.  Orginaly I was developing the application with Qt.  After being just annoyed at Qt because of their licencing I decided to give a second look to wxWidgets.. anyways Code::Blocks is being developed in the same fashion that I was developing.  A moduled framework around existing development tools.  So I'm excited to jump into the code and start contributing.

However I think that Code::Blocks is a good example of why plain Makefile's are not a good solution for a complex project.  There is a lot of greif in compiling Code::Blocks at the moment. (Maybe not for some people) but I haven't got a working compile yet (Linux, wxWidgets 2.6.1, with unicode support).  I'm also running an AMD64 chip.  All of this amounts to me having to edit the Makefile and other build files to compile (unicode aside as that is a code issue).

The point here is that I think the project needs to move to sane build enviornment.  On a linux machine a Autoconf and other Autotools would do the trick.. but this presents a problem since Code::Blocks (to my knowledge) is supposed to be a cross platform code base.  

So my suggestion.  SCons.  It is a cross platform building script based around python.  Now I'm not a huge python fan, but SCons does the trick rather nicely.  Using SCons would allow the project to configure it's self for different version of wxWidgets, Different O.S., and in the future different build options for various *features* that may become available in the future.  

As an initiative I'm will construct a SCon's file to build the current CVS tree (this will require me to recompile wxGTK without unicode support :( , but I will make that sacrifice).

Any other suggestions?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Changing the build enviornment
« Reply #1 on: June 25, 2005, 05:16:54 pm »
First of all, welcome :)

I really hate autotools. I believe they bring more problems than they solve. But hey, that's just me.

If you think you can contribute a scons build system, I 'd be more than happy to use it.
You might also want to take a look at bakefile and cmake. AFAIK they 're very much respected, although I didn't have any time to look at them. If you 're volunteering, take a look at them too ;)

Yiannis.
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Changing the build enviornment
« Reply #2 on: July 03, 2005, 11:26:35 pm »
Yes, please don't use SCons, and use bakefile, as for some reason (don't know exactly), the wxWidgets team droped the SCons files in favor of bakefiles because they had problems.

http://bakefile.sourceforge.net/

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Changing the build enviornment
« Reply #3 on: July 04, 2005, 12:14:14 am »
I agree with mandrav...

Quote
I really hate autotools.


That's exactly what made me reject Anjuta and KDevelop when I was playing with Linux (they forced me to make my projects that way) even the most simple, little and single source file.

I'm really more used to develop my projects using project files for a specific IDE and be able to compile code snippets without having to create a whole project for it and a bunch of files around, which could explain why I don't like autotools, but anyway, I'm pretty sure some people love them and do really prefer them, so why not to offer both? Everybody happy :)

Which one? For those who love it let them decide, code it and voilĂ .

RShadow

  • Guest
Changing the build enviornment
« Reply #4 on: July 04, 2005, 06:07:07 am »
Quote from: takeshimiya
Yes, please don't use SCons, and use bakefile, as for some reason (don't know exactly), the wxWidgets team droped the SCons files in favor of bakefiles because they had problems.

http://bakefile.sourceforge.net/


I will look into bakefile's, however SCons is a great tool.  I have nearly completed a build enviornment with SCon's and thus far it is working very well. (I can build C::B with multiple version of wxWidgets).  Just because wxWidgets dropped SCon's does not identify SCon's as a poor choice.  However I will build an enviornment with Bakefile's as well and then we can see what is easier to use, and what one give's the most flexability.

Quote from: Ceniza

That's exactly what made me reject Anjuta and KDevelop when I was playing with Linux (they forced me to make my projects that way) even the most simple, little and single source file.

I'm really more used to develop my projects using project files for a specific IDE and be able to compile code snippets without having to create a whole project for it and a bunch of files around, which could explain why I don't like autotools, but anyway, I'm pretty sure some people love them and do really prefer them, so why not to offer both? Everybody happy  

Which one? For those who love it let them decide, code it and voilĂ .


I agree with you on your first point.  However i'm not talking about using SCon's (or bakefiles) to build projects created with C::B (Although I am working on a plugin to do just this). I'm talking about building C::B it's self (which is not just some snippits of code).  A complex project (such as C::B) requires a complex build enviornment.  I personaly don't like the autotool's myself, however being a linux user I have grown familiar with them.  The problem is outside of Linux they are really not a good choice.  A lot of linux projects have moved to SCon's and other systems (KDE is the most recent I can think of).. partly because cross platform development has become a big issue.

Anyways as to your second point, having both systems, I disagree.  First haiving both systems will be difficult to maintain.  Second; using a system such as SCon's allows use to provide multiple choices.  I'm not sure about Bakefile's but with Scon's it can build the code tree it's self, and it can also build project files for specefic IDE's such as MSVC.  With a little bit of work we can extend the system to build C::B project files.

Offline fiammy

  • Multiple posting newcomer
  • *
  • Posts: 46
    • Nebulagame
Changing the build enviornment
« Reply #5 on: July 04, 2005, 11:16:47 am »
Hello,

I would be very interested to have a look at your SCons build project, as I'm struggling for some time to get something working with my toolset (mingw with wx2.6.0). I got a bit lost on Windows getting to run C::B with my compiled version of wxWidgets. A SCons file would be a big step in the good direction...

On the other hand, I have the impression that the Bakefiles are some sort of meta-makefiles, that just generate makefiles.

@takeshimiya : the SCons system must be not all bad, given the fact that id Software used it for their game Doom3

RShadow

  • Guest
Changing the build enviornment
« Reply #6 on: July 04, 2005, 02:40:24 pm »
Quote from: fiammy
Hello,

I would be very interested to have a look at your SCons build project, as I'm struggling for some time to get something working with my toolset (mingw with wx2.6.0). I got a bit lost on Windows getting to run C::B with my compiled version of wxWidgets. A SCons file would be a big step in the good direction...

On the other hand, I have the impression that the Bakefiles are some sort of meta-makefiles, that just generate makefiles.

@takeshimiya : the SCons system must be not all bad, given the fact that id Software used it for their game Doom3


I should have everything done after this 4 day weekend.  Right now I have SCon's able to build each component... Now I just need to tie the system together and do some autoconf type checking.  As for bakefile's I checked it out.  I don't like the choice because as you said Bakefile's are just metafiles that generate makefiles.  I like having a full scripting language that is extensible.  Second Bakefile's use a XML like structure.  This is great for automation tools, but leaves a lot to be desired hand coding them.  Just my 2 cents.

On any additonal note.  Once the system is complete I will upload both a patch set and a full zipped copy.  I don't have access to the CVS server.. and I don't know CVS anyways... personaly I would love it if mandrav would switch to subversion.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Changing the build enviornment
« Reply #7 on: July 04, 2005, 03:04:37 pm »
Quote
On any additonal note. Once the system is complete I will upload both a patch set and a full zipped copy. I don't have access to the CVS server.. and I don't know CVS anyways... personaly I would love it if mandrav would switch to subversion.

Like it's my choice...
Sourceforge doesn't support subversion yet. If it did, we 'd be using it from day one :)
Just as a little background, C::B initially was started at tigris.org for this reason: Subversion...
But for many reasons, including slow access times for many people from US, I had to move the project to sourceforge.
Now, sourceforge promised that it 'll be providing subversion repositories, but I wouldn't expect it to happen any time soon...

Yiannis.
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Changing the build enviornment
« Reply #8 on: July 04, 2005, 05:04:18 pm »
>Correct me if I'm wrong, but SCons actually does actually the making, it supports different compilers/linkers but you require SCons to be installed to run the script and build the project.

Bakefile is different in that it generates native makefiles/script/projects, maybe it could generate a SCons script (but I don't think it does at the moment).  The idea as I see it (and what I like) is that the developers maintain a generating script(s) and run bakefile on it to create the files that are actually used to build the project.  This means it is relatively easy to maintain i.e after if you decide to change pa_win_wmme.c to pa_win_mme.c and add some_utils_1.c you would just update one file and then generate the makefiles/projects rather than having to update all n that are supplied.
 You would not be forcing the user of the library to use bakefile to make it as you would supply the generated makefile/projects and they could use their favorite tools (so long as it is generated by bakefile that is!).

Anyways, any contribution is very apreciated!

RShadow

  • Guest
Changing the build enviornment
« Reply #9 on: July 04, 2005, 05:30:31 pm »
Quote from: mandrav
Like it's my choice...
Sourceforge doesn't support subversion yet. If it did, we 'd be using it from day one :)
Just as a little background, C::B initially was started at tigris.org for this reason: Subversion...
But for many reasons, including slow access times for many people from US, I had to move the project to sourceforge.
Now, sourceforge promised that it 'll be providing subversion repositories, but I wouldn't expect it to happen any time soon...

Yiannis.


Is it possible to do development at tigris or berlios and use SF as the mirror/download site?  I don't know if this is feasable or not.. but an idea.

Quote from: takeshimiya

Bakefile is different in that it generates native makefiles/script/projects, maybe it could generate a SCons script (but I don't think it does at the moment). The idea as I see it (and what I like) is that the developers maintain a generating script(s) and run bakefile on it to create the files that are actually used to build the project. This means it is relatively easy to maintain i.e after if you decide to change pa_win_wmme.c to pa_win_mme.c and add some_utils_1.c you would just update one file and then generate the makefiles/projects rather than having to update all n that are supplied.
You would not be forcing the user of the library to use bakefile to make it as you would supply the generated makefile/projects and they could use their favorite tools (so long as it is generated by bakefile that is!).


I see your point, however the problem is still with the Makefile's themselves (IMHO).  I am not seeing how using SCon's or Bakefiles or whatever prevents user from using C::B?  or their "favorite tools."  Most IDE's use a proprietory format.  Most also as an alternative produce a Makefile.. that must be run from the command line..

scons -Q SHARED=1  CBINSTALL=/usr/local/bin WXVER=2.6.1

make -f Makefile.unix.wx2.6
..pray..
dos2unix update
chmod 755 update
./update
cd output
cp *.so /usr/lib64
mv codeblocks.exe /usr/local/bin/codeblocks/codeblocks
mv run.sh /usr/local/bin/codeblocks/run.sh

SCon's seems more simple to me.  For unix folks the chances of Python being installed is very high.  For windows users there is a bin executable of SCon's that doesn't require python to be installed.  

However, I am going to create a Bakefile script;  However somebody will need to maintain it... handwriting xml code make my head hurt...

RShadow

  • Guest
Changing the build enviornment
« Reply #10 on: July 09, 2005, 08:49:10 am »
as an update.  I have a build enviorment completed.  I'm just polishing it up and verifing there are no errors when building on the windows platform.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Changing the build enviornment
« Reply #11 on: July 09, 2005, 09:51:39 am »
Quote from: RShadow
as an update.  I have a build enviorment completed.  I'm just polishing it up and verifing there are no errors when building on the windows platform.

I suppose you 're talking about scons.
Any chance for us mortals to test-run it?  :lol:

Yiannis.
Be patient!
This bug will be fixed soon...

RShadow

  • Guest
Changing the build enviornment
« Reply #12 on: July 09, 2005, 11:10:17 am »
Quote from: mandrav
Quote from: RShadow
as an update.  I have a build enviorment completed.  I'm just polishing it up and verifing there are no errors when building on the windows platform.

I suppose you 're talking about scons.
Any chance for us mortals to test-run it?  :lol:

Yiannis.

lol.. Yup I'm talking about SCon's.. I should be able to post it tonight.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Changing the build enviornment
« Reply #13 on: July 09, 2005, 12:14:43 pm »
Cool, thanks :)

Yiannis.
Be patient!
This bug will be fixed soon...

zieQ

  • Guest
Changing the build enviornment
« Reply #14 on: July 12, 2005, 04:16:20 pm »
takeshimiya advocate for bakefile, I advocate for CMake which is a great tool, simple but powerful and much more mature ! It does not require anything to be installed except itself (no python stuff !), project files are text (no tool needed to edit them). These are big advantages over other tools.