News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Clean new build from latest trunk (r7945)

Started by daniloz, April 27, 2012, 10:43:55 AM

Previous topic - Next topic

daniloz

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.


-------------- 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

ollydbg

Quote from: daniloz on April 27, 2012, 10:43:55 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?


Quote2- 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.


-------------- 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

Quote from: ollydbg on April 27, 2012, 11:40:46 AM
Quote from: daniloz on April 27, 2012, 10:43:55 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?

ollydbg

Quote from: daniloz on April 27, 2012, 11:47:33 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.

oBFusCATed

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

As I said in my post:
Quote from: daniloz on April 27, 2012, 11:47:33 AM
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

Quote from: daniloz on April 27, 2012, 11:53:18 AM
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?

MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

headkase

#8
Quote from: daniloz on April 27, 2012, 10:43:55 AM
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.

daniloz

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).

#!/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]

MortenMacFly

Quote from: daniloz on May 02, 2012, 08:35:12 AM
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

daniloz

Quote from: MortenMacFly on May 02, 2012, 07:54:47 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....

Quote from: MortenMacFly on May 02, 2012, 07:54:47 PM
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. :-)

Quote from: MortenMacFly on May 02, 2012, 07:54:47 PM
For the patch: I'll do some testing...
Thank you. Btw, this is just the Window's version of it. ;-)

stahta01

Quote from: MortenMacFly on May 02, 2012, 07:54:47 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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Quote from: stahta01 on May 03, 2012, 04:02:51 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!]

stahta01

Quote from: oBFusCATed on May 03, 2012, 04:13:03 PM
Quote from: stahta01 on May 03, 2012, 04:02:51 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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]