Author Topic: Clean new build from latest trunk (r7945)  (Read 17288 times)

daniloz

  • Guest
Clean new build from latest trunk (r7945)
« on: April 27, 2012, 10:43:55 am »
Hi All,

I'm just trying to make a fresh new clean build from r7945 on Win7 64 using "gcc version 4.5.2 (tdm-1)" 32 bits.

I have three problems:

1- all plugins generate the dll in the right dir, i.e. [trunk]\src\devel\share\CodeBlocks\plugins , but they don't write the manifest ZIP files in [trunk]\src\devel\share\CodeBlocks, so that C::B can't load them at start-up. I've looked and there's no post-build step to make the zip file, as in the contrib-plugins case

2- there's a warning that devel\libcodeblocks.a cannot be found when building the plugins. I see that this dependency was introduced in r7088. Is this lib needed/generated at all on Win systems? An example is below.

Code
-------------- Build: Scripted wizard in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[ 10.0%] Compiling: plugins\scriptedwizard\wiz.cpp
[ 20.0%] Compiling: plugins\scriptedwizard\genericsinglechoicelist.cpp
[ 30.0%] Compiling: plugins\scriptedwizard\buildtargetpanel.cpp
[ 40.0%] Compiling: plugins\scriptedwizard\wizpage.cpp
[ 50.0%] Compiling: plugins\scriptedwizard\infopanel.cpp
[ 60.0%] Compiling: plugins\scriptedwizard\compilerpanel.cpp
[ 70.0%] Compiling: plugins\scriptedwizard\projectpathpanel.cpp
[ 80.0%] Compiling: plugins\scriptedwizard\filepathpanel.cpp
[ 90.0%] Compiling: plugins\scriptedwizard\genericselectpath.cpp
[100.0%] WARNING: Target 'Code::Blocks wx2.8.x - Scripted wizard': Unable to resolve 1 external dependencies:
devel\libcodeblocks.a
Linking dynamic library: devel\share\CodeBlocks\plugins\scriptedwizard.dll
Output size is 2.68 MB
Process terminated with status 0 (2 minutes, 30 seconds)

3- resources.zip is also not automagically generated.

Thanks!

Edit: Added point 3
« Last Edit: April 27, 2012, 10:59:22 am by daniloz »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6079
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Clean new build from latest trunk (r7945)
« Reply #1 on: April 27, 2012, 11:40:46 am »
1- all plugins generate the dll in the right dir, i.e. [trunk]\src\devel\share\CodeBlocks\plugins , but they don't write the manifest ZIP files in [trunk]\src\devel\share\CodeBlocks, so that C::B can't load them at start-up. I've looked and there's no post-build step to make the zip file, as in the contrib-plugins case
The ZIP files of the "normal plugins" are constructed and copied when you run update.bat. I'm not sure why they are different with the contributed plugins. Any one can explain?


Quote
2- there's a warning that devel\libcodeblocks.a cannot be found when building the plugins. I see that this dependency was introduced in r7088. Is this lib needed/generated at all on Win systems? An example is below.

Code
-------------- Build: Scripted wizard in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[ 10.0%] Compiling: plugins\scriptedwizard\wiz.cpp
[ 20.0%] Compiling: plugins\scriptedwizard\genericsinglechoicelist.cpp
[ 30.0%] Compiling: plugins\scriptedwizard\buildtargetpanel.cpp
[ 40.0%] Compiling: plugins\scriptedwizard\wizpage.cpp
[ 50.0%] Compiling: plugins\scriptedwizard\infopanel.cpp
[ 60.0%] Compiling: plugins\scriptedwizard\compilerpanel.cpp
[ 70.0%] Compiling: plugins\scriptedwizard\projectpathpanel.cpp
[ 80.0%] Compiling: plugins\scriptedwizard\filepathpanel.cpp
[ 90.0%] Compiling: plugins\scriptedwizard\genericselectpath.cpp
[100.0%] WARNING: Target 'Code::Blocks wx2.8.x - Scripted wizard': Unable to resolve 1 external dependencies:
devel\libcodeblocks.a
Linking dynamic library: devel\share\CodeBlocks\plugins\scriptedwizard.dll
Output size is 2.68 MB
Process terminated with status 0 (2 minutes, 30 seconds)
I'm also asked about that before, they need to be fixed, but some devs said this is not a big deal. ;)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

daniloz

  • Guest
Re: Clean new build from latest trunk (r7945)
« Reply #2 on: April 27, 2012, 11:47:33 am »
1- all plugins generate the dll in the right dir, i.e. [trunk]\src\devel\share\CodeBlocks\plugins , but they don't write the manifest ZIP files in [trunk]\src\devel\share\CodeBlocks, so that C::B can't load them at start-up. I've looked and there's no post-build step to make the zip file, as in the contrib-plugins case
The ZIP files of the "normal plugins" are constructed and copied when you run update.bat. I'm not sure why they are different with the contributed plugins. Any one can explain?

Ok, fair enough, but when I want to debug CodeBlocks, then it runs from the devel dir, so IMHO it would make sense to generate the zip-files along as a post-build step of each core plugin, as in the case of the contrib plugins, as well as the resources.zip file.

I'd still be able to run/debug it from devel, without compromising my output dir... :-)

What do the devs thinks about it?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6079
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Clean new build from latest trunk (r7945)
« Reply #3 on: April 27, 2012, 11:50:59 am »
so IMHO it would make sense to generate the zip-files along as a post-build step of each core plugin, as in the case of the contrib plugins, as well as the resources.zip file.
I have the same point with you.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Clean new build from latest trunk (r7945)
« Reply #4 on: April 27, 2012, 11:51:49 am »
Just run src/update or src/update.bat and be done with it.
If you really need it provide a patch, but I don't see why it is needed.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

daniloz

  • Guest
Re: Clean new build from latest trunk (r7945)
« Reply #5 on: April 27, 2012, 11:53:18 am »
As I said in my post:
I'd still be able to run/debug it from devel, without compromising my output dir... :-)

Maybe that's just me, but I'd like to keep everything in the output dir the way it is, but still have the zip files there... I'll do a patch and submit...

daniloz

  • Guest
Re: Clean new build from latest trunk (r7945)
« Reply #6 on: May 01, 2012, 04:30:08 pm »
Maybe that's just me, but I'd like to keep everything in the output dir the way it is, but still have the zip files there... I'll do a patch and submit...

I need some help in generating the patch, I have a local git repository (and use git svn reabase to keep in sync with trunk). I know there's a way to generate an SVN compatible patch, but I couldn't find again in the forum.

So, the question, how to do it?


Offline headkase

  • Almost regular
  • **
  • Posts: 159
Re: Clean new build from latest trunk (r7945)
« Reply #8 on: May 01, 2012, 10:19:49 pm »
Hi All,

...<snip>...

2- there's a warning that devel\libcodeblocks.a cannot be found when building the plugins. I see that this dependency was introduced in r7088. Is this lib needed/generated at all on Win systems? An example is below.

...<snip>...


Have you tried rebuilding with a SVN version at or above SVN 7949?  See this thread:

Discussion.

Basically, from SVN 7940 to SVN 7948 there was a regression in file-handling in Code::Blocks.  SVN 7949 fixed the issue.  So, go back to a good SVN, like SVN 7932 Nightly, and build your later version using that.
« Last Edit: May 01, 2012, 10:22:32 pm by headkase »

daniloz

  • Guest
Re: Clean new build from latest trunk (r7945)
« Reply #9 on: May 02, 2012, 08:35:12 am »
So, here is the patch adding a post-build step to make all resources needed, i.e. zip files with manifest's, *.xrc and images inside for each target.

Also below is a script to generate SVN-like scripts from git (also attached as a zip file).
Code
#!/bin/sh
#
# usage: git-svn-diff [files]
# Generate an SVN-compatible diff against the tip of the tracking branch
TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 's/.*:refs\/remotes\///'`
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH)`
git diff --no-prefix $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH) $* |
sed -e "s/^+++ .*/&    (working copy)/" -e "s/^--- .*/&    (revision $REV)/" \
-e "s/^diff --git [^[:space:]]*/Index:/" \
-e "s/^index.*/===================================================================/"

It would be a good idea to have this script and some description somewhere else, for easy access... maybe the Wiki, what do you think? If this is ok, my next question is: can I modify the Wiki, or there's some special permission needed?

Thx,
daniloz

[attachment deleted by admin]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Clean new build from latest trunk (r7945)
« Reply #10 on: May 02, 2012, 07:54:47 pm »
can I modify the Wiki, or there's some special permission needed?
Sure, otherwise it wouldn't be a wiki, right? Just login using your forum's account.
BTW: This script is Linux only... So at least I cannot try.

For the patch: I'll do some testing...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

daniloz

  • Guest
Re: Clean new build from latest trunk (r7945)
« Reply #11 on: May 03, 2012, 01:01:58 pm »
Sure, otherwise it wouldn't be a wiki, right? Just login using your forum's account.
ok, I'll do it in the near future....

BTW: This script is Linux only... So at least I cannot try.
That's true, I use msysgit, so I have a bash shell to run it. :-)

For the patch: I'll do some testing...
Thank you. Btw, this is just the Window's version of it. ;-)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7790
    • My Best Post
Re: Clean new build from latest trunk (r7945)
« Reply #12 on: May 03, 2012, 04:02:51 pm »
Just login using your forum's account.

Unless it has changed the first letter of your username needs to be upper case to login to the wiki page.

So, Daniloz instead of daniloz.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Clean new build from latest trunk (r7945)
« Reply #13 on: May 03, 2012, 04:13:03 pm »
Unless it has changed the first letter of your username needs to be upper case to login to the wiki page.
Mine is the same, no upper case first letter required.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7790
    • My Best Post
Re: Clean new build from latest trunk (r7945)
« Reply #14 on: May 03, 2012, 04:50:19 pm »
Unless it has changed the first letter of your username needs to be upper case to login to the wiki page.
Mine is the same, no upper case first letter required.

So, the original wiki page requirement for a capital has been changed.

Good to know.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org