Author Topic: CodeBlocks being called from hudson (on linux)  (Read 20064 times)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: CodeBlocks being called from hudson (on linux)
« Reply #30 on: January 03, 2011, 12:28:27 pm »
I can wait for your build till tomorrow, no problem.
Have some other stuff to carry out today.
You can now try this one: http://apt.jenslody.de/downloads/codeblocks_con_suse11.3_64.tar.bz2 .

Build on a fresh openSUSE 11.3 install, no special repos.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: CodeBlocks being called from hudson (on linux)
« Reply #31 on: January 03, 2011, 05:58:31 pm »
yes; this is again a step forward, here's the output, where we can see there are still a few little issues :
Code: [Select]
+ /home/killerbot/BurnTemp/output/run_con.sh --personality=hudson --rebuild --target=Debug Arrays/Arrays.cbp
17:51:19: Error: Directory '//.codeblocks/' couldn't be created (error 13: Permission denied)
Scanning for plugins in /home/killerbot/BurnTemp/output/share/codeblocks/plugins

:
The file compiler.zip could not be found.
Please check your installation.
Compiler: loaded
Loaded 1 plugins
Scanning for plugins in /home/killerbot/BurnTemp/output/share/codeblocks/plugins
Loaded 1 plugins
Loading:
Compiler
Added compiler "GNU GCC Compiler"
Added compiler "Intel C/C++ Compiler"
Added compiler "SDCC Compiler"
Added compiler "Tiny C Compiler"
Added compiler "GDC D Compiler"
Added compiler "LLVM D Compiler"
Added compiler "Digital Mars D Compiler"
Added compiler "GNU ARM GCC Compiler"
Added compiler "GNU AVR GCC Compiler"
Added compiler "GNU GCC Compiler for PowerPC"
Added compiler "GNU GCC Compiler for TriCore"
Opening /var/lib/hudson/jobs/ArraysTest/workspace/Arrays/Arrays.cbp
Loading project file...
Parsing project file...
Loading target Debug
Loading target Release
Loading project files...
3 files loaded
Done loading project in 3ms
Project's base path: /var/lib/hudson/jobs/ArraysTest/workspace/Arrays/
Project's common toplevel path: /var/lib/hudson/jobs/ArraysTest/workspace/Arrays/
done
-------------- Clean: Debug in Arrays ---------------
-------------- Build: Debug in Arrays ---------------
Compiling: StructWithConstructor.cpp
Compiling: main.cpp

=== Arrays, Debug ===
In function 'int main()':
/var/lib/hudson/jobs/ArraysTest/workspace/Arrays/main.cpp: In function 'int main()':
error: expected ';' before 'return'
/var/lib/hudson/jobs/ArraysTest/workspace/Arrays/main.cpp:40:2: error: expected ';' before 'return'

* failed creation of directory
* compiler.zip not found

NOTE : the compiler error have been put there on purpose, however in my current setup hudson thinks the build went ok. Could be hudson needs further tuning, or maybe CB doesn't return with an error in case of a compiler failure ?
« Last Edit: January 03, 2011, 06:00:10 pm by killerbot »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: CodeBlocks being called from hudson (on linux)
« Reply #32 on: January 03, 2011, 08:34:30 pm »
It should not try to load compiler.zip, the correct file is con_compiler.zip..
It's hardcoded only to look for con_compiler as plugin and not to load (or try to load) other plugins (at the moment), so I wonder what happens.

The  fact that the .codeblocks folder can not be created is a access problem, but the pcae where it tries to create it is strange.

I will see what happens, if I try it as user without home directory on openSuse.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: CodeBlocks being called from hudson (on linux)
« Reply #33 on: January 04, 2011, 02:27:46 pm »
Next try: http://apt.jenslody.de/downloads/codeblocks_con_suse11.3_64-20110104-1.tar.bz2

fixed:
  • compiler.zip error-message is gone(was my fault)
  • exitcode shoud be corect now (wxWidgets/linux(?) issue), was a little more tricky to debug and fix
  • "Nothing to be done"-message is no longer shown after any run
  • Log messages that go int "Build messages" are no longer shown, just messages for "Build log"

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: CodeBlocks being called from hudson (on linux)
« Reply #34 on: January 04, 2011, 06:28:24 pm »
I can confirm all improvements.
Nice output, which can be parsed by hudson subparsers, CB returns with failure code when compilation failed, so hudson knows the build failed. No other Cb warnings (file access, compiler.zip).

Looks good.

Offline san

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: CodeBlocks being called from hudson (on linux)
« Reply #35 on: January 04, 2011, 10:46:40 pm »
Nice to see you're making progress with this! Does this project still require a x-server? If you want I can test it on "Ubuntu 8.04 Server" and FreeBSD 7.2.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: CodeBlocks being called from hudson (on linux)
« Reply #36 on: January 04, 2011, 11:11:26 pm »
the special stripped build from Jens , no longer needs it. Now it is question how to merge this with full cb, or do we have 2 executables, or ....

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: CodeBlocks being called from hudson (on linux)
« Reply #37 on: January 05, 2011, 06:58:49 am »
Now it is question how to merge this with full cb, or do we have 2 executables, or ....
I wouldn't like to have two executables if possible. Jens: Can you post a patch so that we can see how "easy" it would be to make it e.g. a command line option?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: CodeBlocks being called from hudson (on linux)
« Reply #38 on: January 05, 2011, 07:35:28 am »
I'm not sure whether it's worth the work to put all in one binary, because the whole implementation stuff is different for console apps and gui apps.

The only way would be to create a console app, that parses the commandline and then does the gui initialisation manually (starting the main message loop, loading gui related libs, etc.).
This might be an option for the future, but the first step is to split the relevant files in a base and a gui part, with as less changes to the api as possible (preferred is of course to have no changes), to minmize the work on plugins and other not used parts of the sources (not used for console of course).

The problem is, that the gui-related things are not available (not even defined) for console apps, so an extra build-target, that creates a pure console-app is the easiest way at the moment.

I put the whole sources int a svn-repo on my server : svn://jenslody.de/codeblocks-console/trunk (no websvn, only anonymous read-access, write access is only possible via ssh with publickey authorization).

Be warned: the code is really ugly at the moment. It has a lot of ifdefs and splitting into two parts is in a very early stage (many commented out parts etc.).
No optimization or something similar, just making it work.

By the way, it's only needed for OSes that have real consoles like linux, not for windows, so there are no changes to windows project-file.

And the Makefile.am's are not updated to use the splitted files, but this will come (probably today).


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: CodeBlocks being called from hudson (on linux)
« Reply #39 on: January 05, 2011, 04:56:59 pm »
svn-repo on my server : svn://jenslody.de/codeblocks-console/trunk
Jens, don't you think we should create a branch for this on the main repo?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: CodeBlocks being called from hudson (on linux)
« Reply #40 on: January 05, 2011, 05:14:07 pm »
svn-repo on my server : svn://jenslody.de/codeblocks-console/trunk
Jens, don't you think we should create a branch for this on the main repo?

Of course we can do so.

There have been two reasons to create it on my server:
the first is, that it was not (yet) meant to be published, more as a proof of concept,
the second is, that I wanted to create my own repo to learn how to do it, because it's much easier to maintain my patches, if I have a repo somewhere outside my developping systems, because I can reach it easily from everywhere and from all my (partly virtual) systems.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: CodeBlocks being called from hudson (on linux)
« Reply #41 on: January 05, 2011, 05:36:14 pm »
There have been two reasons to create it on my server: [...]
I see. So just keep it in mind for the future... For community development and browsing/tracking of the changes BerliOS would be better IMHO.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline san

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: CodeBlocks being called from hudson (on linux)
« Reply #42 on: January 06, 2011, 10:26:40 am »
It seems that there still is a dependency on wxWidgets for codeblocks-console. I don't have wxWidgets installed on my FreeBSD machine and if it's possible like to keep it this way.

Bootstrap returns with the following error (I get a lot of warnings).
Code: [Select]
#./bootstrap
[...]
configure.in:77: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:78: error: possibly undefined macro: AM_PATH_WXCONFIG

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: CodeBlocks being called from hudson (on linux)
« Reply #43 on: January 06, 2011, 10:36:20 am »
It seems that there still is a dependency on wxWidgets for codeblocks-console. I don't have wxWidgets installed on my FreeBSD machine and if it's possible like to keep it this way.

Bootstrap returns with the following error (I get a lot of warnings).
Code: [Select]
#./bootstrap
[...]
configure.in:77: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:78: error: possibly undefined macro: AM_PATH_WXCONFIG


Not without rewriting great parts of C::B from scratch.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: CodeBlocks being called from hudson (on linux)
« Reply #44 on: February 12, 2011, 10:27:20 am »
There have been two reasons to create it on my server: [...]
I see. So just keep it in mind for the future... For community development and browsing/tracking of the changes BerliOS would be better IMHO.
Okay, it was nice to play with, but it is really hard to keep in sync with trunk, so a possible merge (if it ever happens) will be quite difficult.

Is it enough if I do a "svn copy ..." to create a new branch, or do I need special rights on the berlios server ?