Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: janknepper on January 30, 2006, 08:21:46 pm

Title: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate targets
Post by: janknepper on January 30, 2006, 08:21:46 pm
Running: "Build jan 15 2006 14:33:46 - wx2.6.2 (FreeBSD ANSI)
SVN'ed Code::Blocks sources.
Load: CodeBlocks-unix.cbp
Rebuild...
g++: `wx-config: No such file or directory.
cc1plus: error: unrecognized command line option "-fcflags"

When I changed to use GMAKE I get duplicate targets and the build will not run either.
Any idea's?

Thanks!
Jan
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: takeshimiya on January 30, 2006, 11:07:19 pm
It appears that you don't have installed the wx-config script.
It may come in a package called wx-common or something like that (depending on your distro).
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: janknepper on January 30, 2006, 11:22:48 pm
It appears that you don't have installed the wx-config script.
It may come in a package called wx-common or something like that (depending on your distro).

Nop! wx-config runs just fine from the command line.

Thanks!
Jan
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: takeshimiya on January 30, 2006, 11:59:20 pm
Are you sure you put the two backticks aroung wx-config?

in
Code
Rebuild...
g++: `wx-config: No such file or directory.
I can only see one backtick.

It would be something like `wx-config --cflags`
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: janknepper on January 31, 2006, 12:10:37 am
Are you sure you put the two backticks aroung wx-config?

in
Code
Rebuild...
g++: `wx-config: No such file or directory.
I can only see one backtick.

It would be something like `wx-config --cflags`

As I wrote (I think) I loaded the CodeBlocks-unix.cbp file in Code::Blocks and hit Rebuild... I tried this as-is (which indeed gives there error wx-config not found as I would guess that the build system does not *expand* the `wx-config ...`. When I change the Compiler setup to use GMAKE I get duplicate targets...

Is it actually possible to build Code::Blocks from within Code::Blocks???

Thanks!
Jan
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: takeshimiya on January 31, 2006, 12:24:36 am
wx-config not found as I would guess that the build system does not *expand* the `wx-config ...`.
The expansion is done by the shell, so it should work. I guess you're using Bourne Shell, which supports backticks. (In Windows the expansion is emulated).

To know if the expansion is working, please switch to full command line (see the screenshot), and post it back the build log.

(http://img71.imageshack.us/img71/8613/fullcommandline9nq.png) (http://imageshack.us)


When I change the Compiler setup to use GMAKE I get duplicate targets...
This might be a bug (I don't know what does gmake).

Is it actually possible to build Code::Blocks from within Code::Blocks???
Of course. Indeed, it is the build method most commonly used.
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: janknepper on January 31, 2006, 01:12:58 am
wx-config not found as I would guess that the build system does not *expand* the `wx-config ...`.
The expansion is done by the shell, so it should work. I guess you're using Bourne Shell, which supports backticks. (In Windows the expansion is emulated).

To know if the expansion is working, please switch to full command line (see the screenshot), and post it back the build log.

(http://img71.imageshack.us/img71/8613/fullcommandline9nq.png) (http://imageshack.us)


When I change the Compiler setup to use GMAKE I get duplicate targets...
This might be a bug (I don't know what does gmake).

Is it actually possible to build Code::Blocks from within Code::Blocks???
Of course. Indeed, it is the build method most commonly used.
Already had "Full command line" shown... I like to see what is happening....
There is the log:
Project   : Code::Blocks - Unix
Compiler  : GNU GCC Compiler (called directly)
Directory : /eng/codeblocks/trunk/src/
--------------------------------------------------------------------------------
Switching to target: AutoRevision
g++     -I/usr/include -c tools/autorevision/autorevision.cpp -o .objs/tools/autorevision/autorevision.o
g++   -L/usr/lib -o tools/autorevision/auto_revision .objs/tools/autorevision/autorevision.o    -s   
Switching to target: ConsoleRunner
g++  -Os    -I/usr/include -c tools/ConsoleRunner/main.cpp -o .objs/tools/ConsoleRunner/main.o
g++   -L/usr/lib -o tools/ConsoleRunner/console_runner .objs/tools/ConsoleRunner/main.o     
Switching to target: tinyXML
g++   -Wall -g `wx-config --cflags` -fmessage-length=0 -fexceptions -Winvalid-pch -DcbDEBUG -DCB_PRECOMP    -Isdk/wxscintilla/include  -I/usr/include -c sdk/tinyxml/tinystr.cpp -o .objs/sdk/tinyxml/tinystr.o
g++: `wx-config: No such file or directory
cc1plus: error: unrecognized command line option "-fcflags`"
Process terminated with status 1 (0 minutes, 5 seconds)
0 errors, 0 warnings

Here the same on the shell command line:
$ g++   -Wall -g `wx-config --cflags` -fmessage-length=0 -fexceptions -Winvalid-pch -DcbDEBUG -DCB_PRECOMP    -Isdk/wxscintilla/include  -I/usr/include -c sdk/tinyxml/tinystr.cpp -o .objs/sdk/tinyxml/tinystr.o

No errors or warnings what-so-ever.

My guess is that for what ever reason the build system is *not* expanding the `wx-config --cflags`

Thanks!
Jan
 
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate targets
Post by: mandrav on January 31, 2006, 08:36:07 am
In the screenshot posted by Takeshi, do you see the "Shell to run compiler" ?
Change it to a shell in your system that evaluates backtick'd expressions. Try bash for example...
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: janknepper on January 31, 2006, 01:15:49 pm
In the screenshot posted by Takeshi, do you see the "Shell to run compiler" ?
Change it to a shell in your system that evaluates backtick'd expressions. Try bash for example...

Do not have that particular line, but changed the line "Terminal to run console programs".
The result is exactly the same as I do not think that I actually can set this.
(Code::Blocks Version 1.0 RC2)

Thanks!
Jan
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: tiwag on January 31, 2006, 01:34:05 pm
(Code::Blocks Version 1.0 RC2)
that's the problem,

you need to check out a recent svn version and build that using the autotools
try it, it's not very difficult, ( when you have all necessary tools installed...)

./bootstrap
./configure
make
make install

with this generated version the `wx-config` works well,
then you can use this version in order to build
CodeBlocks with codeblock-unix.cbp
(before building delete the precompiled header *.gch)
and you get a new CodeBlocks version in src/devel
then run
src/update
and you have a working version of codeblocks installed in src/output
which you run with the ./run.sh

copy this version to your preferred ~/usr/bin or whereever you like
and use it as your working version from now on (dont forget to edit the run.sh there )

you may consider to uninstall the autotools generated version,
as you'll not need it anymore from this point on.
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: janknepper on February 03, 2006, 03:42:47 pm
(Code::Blocks Version 1.0 RC2)
that's the problem,

you need to check out a recent svn version and build that using the autotools
try it, it's not very difficult, ( when you have all necessary tools installed...)

./bootstrap
./configure
make
make install

with this generated version the `wx-config` works well,
then you can use this version in order to build
CodeBlocks with codeblock-unix.cbp
(before building delete the precompiled header *.gch)
and you get a new CodeBlocks version in src/devel
then run
src/update
and you have a working version of codeblocks installed in src/output
which you run with the ./run.sh

copy this version to your preferred ~/usr/bin or whereever you like
and use it as your working version from now on (dont forget to edit the run.sh there )

you may consider to uninstall the autotools generated version,
as you'll not need it anymore from this point on.

OK... I have been battling with this since the last post for a couple of hours.
I am running FreeBSD 6.0-STABLE amd64
A couple of things I have come across...

After that (from the top of my head) ./bootstrap and ./configure run.

Make failed on me 2 times so far. In both cases I had to add -fPIC to the Makefile for tinyxml and wxscintilla. I realize that this should be done in the autoconf/automake stuff, but I am a programmer not a build expert.. :-( sorry...

Oh... The build system refers to /usr/local/lib/libcodeblocks.so instead of the libcodeblocks.so generated by the build. The newly build one of course is not being copied to the proper location until after successful build.

Currently I am stuck with a couple of unresolved externals from from AngelScript (as) library which seems to be a relatively new addition to Code::Blocks. The problem here seems to be that the build is conditional whether i386 is pre-defined or not, which does not seem to be the case for amd64 builds. I have not been able to find a solution for this problem yet.

If anyone has any idea's I sure would like to know.

Hope these comments help anyone else here making Code::Blocks better.

Thanks!
Jan
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: takeshimiya on February 03, 2006, 09:16:03 pm
Currently I am stuck with a couple of unresolved externals from from AngelScript (as) library which seems to be a relatively new addition to Code::Blocks. The problem here seems to be that the build is conditional whether i386 is pre-defined or not, which does not seem to be the case for amd64 builds. I have not been able to find a solution for this problem yet.

If anyone has any idea's I sure would like to know.

Define AS_MAX_PORTABILITY in as_config.h.

You might want to read here: http://forums.codeblocks.org/index.php?topic=2096.0
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: janknepper on February 06, 2006, 05:59:17 pm
Currently I am stuck with a couple of unresolved externals from from AngelScript (as) library which seems to be a relatively new addition to Code::Blocks. The problem here seems to be that the build is conditional whether i386 is pre-defined or not, which does not seem to be the case for amd64 builds. I have not been able to find a solution for this problem yet.

If anyone has any idea's I sure would like to know.

Define AS_MAX_PORTABILITY in as_config.h.

You might want to read here: http://forums.codeblocks.org/index.php?topic=2096.0

Yep! That seems to fix the build problem...
However, now when I install and than start codeblocks, it comes up with the compiler selection and than asserts with:

Assertion failed (r>=0), function RegisterAnyObject, file ./source/as_anyobject.cpp, line 138.

Funny enough line 138 is in a #ifndef AS_MAX_PORTABILITY / #endif block so I suspect it really is line 122.

Any idea's?

Thanks!
Jan
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: takeshimiya on February 06, 2006, 07:11:32 pm
For a quick "it'll work but it's not the good way" remove all the Assertions (r>=0) in the src\sdk\as\bindings.
Title: Re: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate target
Post by: janknepper on February 06, 2006, 08:30:01 pm
For a quick "it'll work but it's not the good way" remove all the Assertions (r>=0) in the src\sdk\as\bindings.

;-) I know that is the Q&D way... (Quick and Dirty)...
And I will try to do that for now. However, I figured it would be good to have a record of this here in the forum.

Thanks!
Jan