Author Topic: Building C::B w/C::B on FreeBSD 6.0 amd64 - wx-config NF || duplidate targets  (Read 9213 times)

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
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
ManiaC++
Jan Knepper

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
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).

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
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
ManiaC++
Jan Knepper

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Are you sure you put the two backticks aroung wx-config?

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

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

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
Are you sure you put the two backticks aroung wx-config?

in
Code: [Select]
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
ManiaC++
Jan Knepper

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
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.




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.

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
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.




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
 
ManiaC++
Jan Knepper

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
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...
Be patient!
This bug will be fixed soon...

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
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
ManiaC++
Jan Knepper

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
(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.
« Last Edit: January 31, 2006, 02:02:23 pm by tiwag »

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
(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...
  • /usr/include/malloc.h is included which according to FreeBSD now should be /usr/include/stdlib.h
  • wx-config does exist as wxgtk2-2.6config in /usr/X11R6/bin. A symlink will solve that problem
  • Before running ./bootstrap I had to make sure to prepend PATH with /usr/local/gnu-autotools/bin: setenv PATH /usr/local/gnu-autotools/bin:$PATH
  • Make sure wxwin.m4 can be found: setenv ACLOCAL_FLAGS "-I /usr/X11R6/share/aclocal

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
ManiaC++
Jan Knepper

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
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

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
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
ManiaC++
Jan Knepper

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
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.

Offline janknepper

  • Multiple posting newcomer
  • *
  • Posts: 11
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
ManiaC++
Jan Knepper