Author Topic: CVS changes  (Read 19160 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
CVS changes
« on: September 04, 2005, 10:54:28 pm »
Some things have changed in CVS:

  • Code::Blocks is now using the GNU build system (autoconf/automake), at least for non-windows platforms :D
  • All provided makefiles are now gone :shock:
  • Many doc files have been moved from src/ to the top-level folder (COPYING, AUTHORS, etc)

Well, how does Code::Blocks build now?
I will update the relevant README files but until I do, here goes:

Windows
Download latest stable Code::Blocks if you don't already have it (shame on you!)
Open with it the CodeBlocks.cbp (wx2.4) or CodeBlocks.wx2.6.cbp (wx2.6) project file, edit the project's custom variables (to point to your wx installation) and build it.

Unix
The very first time you unpack the source (or checkout from CVS), you need to run ./bootstrap. This will create a sane building environment.
Then just do the usual stuff:
Code
mkdir -p build/release
cd build/release
../../configure
make
sudo make install

or

Code
mkdir -p build/debug
cd build/debug
../../configure --enable-debug
make
sudo make install

Use 'configure --help' to see what things you can enable/disable.

With that said, it works for me but I 'd like to know if people are having problems with it.
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Re: CVS changes
« Reply #1 on: September 05, 2005, 06:20:32 am »
Reporting in from Debian (SimpleMepis 3.3.1), wx2.6.1, NonUnicode, Code::Blocks HEAD.

It stops at make with errors: Makefile:429: .deps/Managers.Plo: No such file or directory and so on.

BTW, what is a ".Plo"?

See the attached file.

[attachment deleted by admin]

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CVS changes
« Reply #2 on: September 05, 2005, 09:10:03 am »
Sorry about that. There are a couple of files missing. I will add them ASAP.

I forgot to add: the build system is not yet complete. The make 'install' and 'uninstall' targets work. What doesn't work yet is 'clean', 'dist' and 'distclean'. Don't try those because it will erase files from your working copy!!!
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CVS changes
« Reply #3 on: September 05, 2005, 09:44:28 am »
Done, missing files added :)
Be patient!
This bug will be fixed soon...

grv575

  • Guest
Re: CVS changes
« Reply #4 on: September 05, 2005, 09:37:13 pm »
running ./bootstrap:
Code
aclocal:configure.in:147: warning: macro `AM_PATH_WXCONFIG' not found in library
configure.in:147: error: possibly undefined macro: AM_PATH_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
root:/usr/src/codeblocks# wx-config --prefix
/opt/wx/2.6

grv575

  • Guest
Re: CVS changes
« Reply #5 on: September 05, 2005, 10:10:21 pm »
This seems to work for me:

Code
#echo `wx-config --prefix`/share/aclocal >> `aclocal --print-ac-dir`/dirlist

which creates on my system:
Code
# cat /usr/share/aclocal/dirlist
/opt/wx/2.6/share/aclocal

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CVS changes
« Reply #6 on: September 05, 2005, 10:52:20 pm »
There is hardcoded path in bootstrap (left by accident).
Edit it and change 'aclocal -I /usr/local/share/aclocal' to 'aclocal' (or update the path for your system).
This is already fixed in CVS.
Be patient!
This bug will be fixed soon...

grv575

  • Guest
Re: CVS changes
« Reply #7 on: September 06, 2005, 12:55:39 am »
one more thing:

Code
make[4]: Entering directory `/usr/src/codeblocks/src/sdk/resources'
cd . && \
        zip -j manager_resources.zip *.xrc images/*.png > /dev/null
mv ./manager_resources.zip .
mv: `./manager_resources.zip' and `./manager_resources.zip' are the same file
make[4]: *** [manager_resources.zip] Error 1
make[4]: Leaving directory `/usr/src/codeblocks/src/sdk/resources'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/codeblocks/src/sdk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/codeblocks/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/codeblocks'
make: *** [all] Error 2

the Makefile in codeblocks/src/sdk/resources should probably use
mv -f
for after it zips the manager_resources (my $srcdir = .)

grv575

  • Guest
Re: CVS changes
« Reply #8 on: September 06, 2005, 03:20:11 am »
This part is failing now (same problem):
Code
resources.zip:
        cd $(top_srcdir)/src/src/resources && \
                zip  resources.zip *.xrc images/*.png images/16x16/*.png > /dev/
null
        mv -f $(top_srcdir)/src/src/resources/resources.zip .

start_here.zip:
        cd $(top_srcdir)/src/src/resources/start_here && \
                zip start_here.zip *.htm* *.jpg > /dev/null
        mv -f $(top_srcdir)/src/src/resources/start_here/start_here.zip .

I had to change those mv commands to mv -f
to get it to work.

I think this applies to all the resources directories (src/plugins/astyle/resources is the same).

(you're doing mkdir build; cd build; ../configure.  I'm calling configure from the codeblocks directory...)



Edit: changing mv to mv -f doesn't actually work (same error).  It was just not giving an error again since I was fixing the Makefiles as they failed and then running make again (which just reported nothing to do for that directory...)
« Last Edit: September 06, 2005, 04:09:23 am by grv575 »

takeshimiya

  • Guest
Re: CVS changes
« Reply #9 on: September 06, 2005, 03:59:21 am »
Hi!

Now compiles ok  :), but doesn't run. :|

Debian (SimpleMepis 3.3.1), wx2.6.1 with GTK 2.6.8, NonUnicode, Code::Blocks HEAD.

---------------------------------------------------------------------------------

root@1[codeblocks]# ./bootstrap
aclocal: configure.in: 147: macro `AM_PATH_WXCONFIG' not found in library

---------------------------------------------------------------------------------

configure: apparently without  errors
make: apparently without errors
make install: apparently without errors

---------------------------------------------------------------------------------

root@1[debug]# codeblocks

(codeblocks:14397): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed

(codeblocks:14397): Gtk-CRITICAL **: gtk_box_pack_start: assertion `GTK_IS_WIDGET (child)' failed
Segmentation fault

---------------------------------------------------------------------------------

running codeblocks with GDB:

(codeblocks:15588): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed

(codeblocks:15588): Gtk-CRITICAL **: gtk_box_pack_start: assertion `GTK_IS_WIDGET (child)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1224390976 (LWP 15588)]
0xb74c170a in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0

---------------------------------------------------------------------------------

grv575

  • Guest
Re: CVS changes
« Reply #10 on: September 06, 2005, 04:11:07 am »
I get the same thing.  BT

Edit: line #s

Code
#0  0x42a1e72a in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#1  0x00000175 in ?? ()
#2  0x42a45034 in __PRETTY_FUNCTION__.1 () from /usr/lib/libgtk-x11-2.0.so.0
#3  0x42a44226 in __PRETTY_FUNCTION__.0 () from /usr/lib/libgtk-x11-2.0.so.0
#4  0x0825a268 in ?? ()
#5  0xb7e31150 in ?? () from /opt/wx/2.6/lib/libwx_gtk2-2.6.so.0
#6  0xb7e31150 in ?? () from /opt/wx/2.6/lib/libwx_gtk2-2.6.so.0
#7  0x00000000 in ?? ()
#8  0xb7bc6d76 in wxNotebook::SetPageImage ()
   from /opt/wx/2.6/lib/libwx_gtk2-2.6.so.0
#9  0xb7f3e4cd in MessageManager::DoAddLog (this=0x825a268, type=mltLog,
    log=0x829e710) at messagemanager.cpp:254
#10 0xb7f3d370 in MessageManager (this=0x825a268, parent=0x8180568)
    at messagemanager.cpp:104
#11 0xb7f3c44d in MessageManager::Get (parent=0x8180568)
    at messagemanager.cpp:60
#12 0xb7f3b273 in Manager::GetMessageManager (this=0x823d710)
    at manager.cpp:299
#13 0xb7f3a896 in Manager::Get (appWindow=0x8180568, notebook=0x823b8f0,
    clientWin=0x0) at manager.cpp:110
#14 0x08066519 in MainFrame::CreateIDE (this=0x8180568) at main.cpp:440
#15 0x0806547d in MainFrame (this=0x8180568, lang=@0x80a0850, parent=0x0)
    at main.cpp:372
#16 0x0805c259 in CodeBlocksApp::InitFrame (this=0x80a07f0) at app.cpp:183

---
erorr is:

Starting program: /usr/local/bin/codeblocks
[Thread debugging using libthread_db enabled]
[New Thread -1217038528 (LWP 30259)]

(codeblocks:30259): Gtk-CRITICAL **: file gtkpixmap.c: line 104 (gtk_pixmap_new)
: assertion `val != NULL' failed

(codeblocks:30259): Gtk-CRITICAL **: file gtkbox.c: line 373 (gtk_box_pack_start
): assertion `GTK_IS_WIDGET (child)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1217038528 (LWP 30259)]
0x42a1e72a in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
« Last Edit: September 06, 2005, 06:34:12 pm by grv575 »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CVS changes
« Reply #11 on: September 06, 2005, 08:40:38 am »
the Makefile in codeblocks/src/sdk/resources should probably use
mv -f
for after it zips the manager_resources (my $srcdir = .)


Yes, I can see it failing for in-place builds (I build out-of-place).
I 'll fix it. Thanks.
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CVS changes
« Reply #12 on: September 06, 2005, 08:43:24 am »
Hi!

Now compiles ok  :), but doesn't run. :|

Can you verify that /usr/local/share/codeblocks (if you used the default prefix) contains the codeblocks data files?
IIRC, I had this kind of error when some data was missing (which reminds me to find what's wrong and test for it properly :P)...
Be patient!
This bug will be fixed soon...

grv575

  • Guest
Re: CVS changes
« Reply #13 on: September 06, 2005, 06:33:46 pm »
Code
root:/usr/local/share/codeblocks# ls
astyle.zip              images                 start_here.zip
class_wizard.zip        lexers                 templates
code_completion.zip     manager_resources.zip  tips.txt
compiler_gcc.zip        plugins                todo.zip
debugger_gdb.zip        plugin_wizard.zip
defaultmimehandler.zip  resources.zip
root:/usr/local/share/codeblocks# ls images/codecompletion/
class_folder.png    enumerator.png        preproc_folder.png
class.png           enum.png              preproc.png
ctor_private.png    enums_folder.png      symbols_folder.png
ctor_protected.png  method_private.png    var_private.png
ctor_public.png     method_protected.png  var_protected.png
dtor_private.png    method_public.png     var_public.png
dtor_protected.png  namespace.png
dtor_public.png     others_folder.png

grv575

  • Guest
Re: CVS changes
« Reply #14 on: September 06, 2005, 10:42:28 pm »
No clue what changed in latest cvs configure script but it's not working on my system:

Code
*** ./configure: line 22858: syntax error near unexpected token `ac_header'
*** ./configure: line 22858: `for ac_header in X11/Intrinsic.h'

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (gtkglextmm-1.0 libgl
ademm-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable
if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (gtkglextmm-1.0 libglademm-2.0) not me
t; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries
 are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi
;;

for ac_header in X11/Intrinsic.h
do

If those ;; semicolons are removed it doesn't error out there, but the if branches above don't work somehow (it doesn't include the libs it was looking for -  Library requirements (gtkglextmm-1.0 libglademm-2.0) not met;).  Not sure why configure seems to be broken (syntax errors :/ ).  I am compiling against wx ansi debug if that makes a difference.

Edit: went back and set wx-config back to the non-debug version of wx, reran bootstrap and configure (no flags this time) and same error msg.  configure worked yesterday with the same settings  :(

looking at cvs it looks like it happens here:
Code
checking for dlopen in -ldl... yes
checking for pthread_create in -lpthread... yes
checking for snprintf... yes
checking for vsnprintf... yes
./configure: line 22858: syntax error near unexpected token `ac_header'
./configure: line 22858: `for ac_header in X11/Intrinsic.h'

---

 AC_CHECK_LIB(dl, dlopen)
   AC_CHECK_LIB(pthread, pthread_create)
   AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF,,snprintf))
   AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF,,vsnprintf))

**********************************
   
   dnl versioning info for libtool
   dnl Note this is the ABI version which is not the same as our actual library version
   CODEBLOCKS_CURRENT=0
   CODEBLOCKS_REVISION=1
   CODEBLOCKS_AGE=1
   CODEBLOCKS_VERSION_INFO=$CODEBLOCKS_CURRENT:$CODEBLOCKS_REVISION:$CODEBLOCKS_AGE
   AC_SUBST(CODEBLOCKS_VERSION_INFO)
   
   CODEBLOCKS_GET_PLATFORM
   CODEBLOCKS_ENABLE_SETTINGS
   
 dnl AM_OPTIONS_WXCONFIG  AC_SUBST(CXXFLAGS)
   AC_SUBST(CFLAGS)
   
   AM_OPTIONS_WXCONFIG

Maybe it's the CODEBLOCKS_GET_PLATFORM ?

Code
if test "${with_platform+set}" = set; then
  withval="$with_platform"
  CODEBLOCKS_PLATFORM=$withval
else
  CODEBLOCKS_PLATFORM=gtk
fi;


  PLATFORM_CFLAGS=""
  PLATFORM_LIBS=""

    case $CODEBLOCKS_PLATFORM in
    gtk)

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with a
rgs.
set dummy pkg-config; ac_word=$2

Does that case statement look right?
« Last Edit: September 06, 2005, 11:12:21 pm by grv575 »