Author Topic: New devel/codeblocks-devel port for MacPorts  (Read 8126 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
New devel/codeblocks-devel port for MacPorts
« on: July 15, 2007, 09:05:06 pm »
My unofficial/private "codeblocks" port is now the
official "codeblocks-devel" port in MacPorts 1.5...

http://trac.macports.org/projects/macports/browser/trunk/dports/devel/codeblocks-devel

It will build the latest version available, right from
the Subversion Trunk (for either wxMac or wxGTK)

wiki:Installing_Code::Blocks_from_source_on_Mac_OS_X#Install_with_MacPorts

Code
sudo port install codeblocks-devel

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: New devel/codeblocks-devel port for MacPorts
« Reply #1 on: July 31, 2007, 03:04:29 pm »
Well done...!

bnilsson

  • Guest
Re: New devel/codeblocks-devel port for MacPorts
« Reply #2 on: August 04, 2007, 03:35:51 pm »
I have encountered some problems with the port install.

Two things:

1)
Although I have installed wxgtk by "port install wxgtk" as describled in the wiki,
the command "port install codeblocks-devel +x11" installs wxWidgets by dependency.
Is this correct? Should the wxgtk installation be skipped, or is there an error in the fact that wxwidgets is installed?
If the dependency installation of wxwidgets is today's state of affairs, I guess the wiki page sould be updated.

2)
At the codeblocks-devel installation, I get
A
Quote
Tiger:/Users/bnilsson root# port install codeblocks-devel +x11
--->  Fetching codeblocks-devel
--->  Verifying checksum(s) for codeblocks-devel
--->  Extracting codeblocks-devel
--->  Configuring codeblocks-devel
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_codeblocks-devel/work/trunk" && ./bootstrap && ./configure --prefix=/opt/local --enable-contrib " returned error 1
Command output: sed: 1: "debian/changelog": extra characters at the end of d command
You should add the contents of `/opt/local/share/aclocal/libtool.m4' to `aclocal.m4'.
/opt/local/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG
/opt/local/share/aclocal/smpeg.m4:13:   run info '(automake)Extending aclocal'
/opt/local/share/aclocal/smpeg.m4:13:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:80: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
configure.in:81: warning: macro `AM_PATH_WXCONFIG' not found in library
configure.in:9: installing `./missing'
configure.in:9: installing `./install-sh'
src/base/tinyxml/Makefile.am: installing `./depcomp'
configure.in:80: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:81: error: possibly undefined macro: AM_PATH_WXCONFIG

Error: Status 1 encountered during processing.
Note especially
"You should add the contents of `/opt/local/share/aclocal/libtool.m4' to `aclocal.m4'."

I have seen this suggestion in the manual bootstrap/configure/make installation, so I did similar as I used to to correct it:
Quote
cat /opt/local/share/aclocal/libtool.m4 > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_codeblocks-devel/work/trunk/aclocal.m4
After this the build progresses normally...

3)
until it hits this:

Quote
Tiger:/Users/bnilsson root# port install codeblocks-devel +x11
--->  Configuring codeblocks-devel
--->  Building codeblocks-devel with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_codeblocks-devel/work/trunk" && make all " returned error 2
Command output: make[3]: Nothing to be done for `all'.
Making all in propgrid
make[3]: Nothing to be done for `all'.
Making all in wxFlatNotebook
make[3]: Nothing to be done for `all'.
Making all in resources
Making all in lexers
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
make[3]: Nothing to be done for `all-am'.
Making all in src
Making all in wxAUI
make[3]: Nothing to be done for `all'.
Making all in resources
Making all in icons
make[4]: Nothing to be done for `all'.
Making all in images
Making all in 16x16
make[5]: Nothing to be done for `all'.
Making all in settings
make[5]: Nothing to be done for `all'.
make[5]: Nothing to be done for `all-am'.
make[4]: Nothing to be done for `all-am'.
g++ -DHAVE_CONFIG_H -I. -I../../src/include -I/opt/local/lib/wx/include/mac-unicode-release-2.8 -I/opt/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__  -I../../src/include/wxscintilla/include -I../../src/include -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/wxFlatNotebook/include -I../../src/src/wxAUI  -I/opt/local/include -Ulinux -Uunix  -O2 -ffast-math -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT ipc.o -MD -MP -MF .deps/ipc.Tpo -c -o ipc.o ipc.cpp
/usr/include/mach/mach_types.h:114: error: conflicting declaration 'typedef mach_port_t semaphore_t'
ipc.h:25: error: 'semaphore_t' has a previous declaration as 'typedef int semaphore_t'
make[3]: *** [ipc.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Error: Status 1 encountered during processing.



Changing src/src/ipc.h:
Quote
#ifdef __WIN32__
    typedef HANDLE shm_handle_t;
    typedef HANDLE semaphore_t;
#elif __WXMAC__
    typedef int shm_handle_t;
    typedef mach_port_t semaphore_t;
#else
    typedef int shm_handle_t;
    typedef int semaphore_t;
#endif
seemed to fix this problem.

4)
Finally, the created application is NOT using x11/gtk, it is a normal Mac/aqua application.
Assuming "port install codeblocks-devel +x11"  would build a gtk/x11 app, this would be an error.
So the portfile should have a check?

« Last Edit: August 04, 2007, 04:24:36 pm by bnilsson »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: New devel/codeblocks-devel port for MacPorts
« Reply #3 on: August 06, 2007, 03:15:27 pm »
I have encountered some problems with the port install.

You can sound off bugs either here (at CB) or at MacPorts. I'm back from vacation now.

Quote
Two things:

Sounded more like four, but anyway :-)

Quote
1)
Although I have installed wxgtk by "port install wxgtk" as describled in the wiki,
the command "port install codeblocks-devel +x11" installs wxWidgets by dependency.
Is this correct? Should the wxgtk installation be skipped, or is there an error in the fact that wxwidgets is installed?
If the dependency installation of wxwidgets is today's state of affairs, I guess the wiki page sould be updated.

No, it is wrong... The +aqua variant should require the "wxWidgets" port (i.e. wxMac) and the +x11 variant should require the "wxgtk" port (i.e. wxGTK)

Quote
2)
At the codeblocks-devel installation, I get
A
Quote
Tiger:/Users/bnilsson root# port install codeblocks-devel +x11
--->  Fetching codeblocks-devel
--->  Verifying checksum(s) for codeblocks-devel
--->  Extracting codeblocks-devel
--->  Configuring codeblocks-devel
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_codeblocks-devel/work/trunk" && ./bootstrap && ./configure --prefix=/opt/local --enable-contrib " returned error 1
Command output: sed: 1: "debian/changelog": extra characters at the end of d command
You should add the contents of `/opt/local/share/aclocal/libtool.m4' to `aclocal.m4'.
/opt/local/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG
/opt/local/share/aclocal/smpeg.m4:13:   run info '(automake)Extending aclocal'
/opt/local/share/aclocal/smpeg.m4:13:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:80: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
configure.in:81: warning: macro `AM_PATH_WXCONFIG' not found in library
configure.in:9: installing `./missing'
configure.in:9: installing `./install-sh'
src/base/tinyxml/Makefile.am: installing `./depcomp'
configure.in:80: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:81: error: possibly undefined macro: AM_PATH_WXCONFIG

Error: Status 1 encountered during processing.
Note especially
"You should add the contents of `/opt/local/share/aclocal/libtool.m4' to `aclocal.m4'."

I have seen this suggestion in the manual bootstrap/configure/make installation, so I did similar as I used to to correct it:
Quote
cat /opt/local/share/aclocal/libtool.m4 > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_codeblocks-devel/work/trunk/aclocal.m4
After this the build progresses normally...

The ACLOCAL_FLAGS="-I ${prefix}/share/aclocal" is supposed to take care of this.

This seems to be a bug introduced by a later version of the configure script:
Code
sed: 1: "debian/changelog": extra characters at the end of d command
Probably due to different versions of "sed" being used on Linux and Darwin...

Quote
3)
until it hits this:

Quote
Tiger:/Users/bnilsson root# port install codeblocks-devel +x11
--->  Configuring codeblocks-devel
--->  Building codeblocks-devel with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_codeblocks-devel/work/trunk" && make all " returned error 2
Command output: make[3]: Nothing to be done for `all'.
Making all in propgrid
make[3]: Nothing to be done for `all'.
Making all in wxFlatNotebook
make[3]: Nothing to be done for `all'.
Making all in resources
Making all in lexers
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
make[3]: Nothing to be done for `all-am'.
Making all in src
Making all in wxAUI
make[3]: Nothing to be done for `all'.
Making all in resources
Making all in icons
make[4]: Nothing to be done for `all'.
Making all in images
Making all in 16x16
make[5]: Nothing to be done for `all'.
Making all in settings
make[5]: Nothing to be done for `all'.
make[5]: Nothing to be done for `all-am'.
make[4]: Nothing to be done for `all-am'.
g++ -DHAVE_CONFIG_H -I. -I../../src/include -I/opt/local/lib/wx/include/mac-unicode-release-2.8 -I/opt/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__  -I../../src/include/wxscintilla/include -I../../src/include -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/wxFlatNotebook/include -I../../src/src/wxAUI  -I/opt/local/include -Ulinux -Uunix  -O2 -ffast-math -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT ipc.o -MD -MP -MF .deps/ipc.Tpo -c -o ipc.o ipc.cpp
/usr/include/mach/mach_types.h:114: error: conflicting declaration 'typedef mach_port_t semaphore_t'
ipc.h:25: error: 'semaphore_t' has a previous declaration as 'typedef int semaphore_t'
make[3]: *** [ipc.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Error: Status 1 encountered during processing.

Sounds like a bug, yes. (usually easier to handle in Tracker)

Quote
Changing src/src/ipc.h:
Quote
#ifdef __WIN32__
    typedef HANDLE shm_handle_t;
    typedef HANDLE semaphore_t;
#elif __WXMAC__
    typedef int shm_handle_t;
    typedef mach_port_t semaphore_t;
#else
    typedef int shm_handle_t;
    typedef int semaphore_t;
#endif
seemed to fix this problem.

That should be "__APPLE__" and "__MACH__" (Darwin), rather than __WXMAC__.

Quote
4)
Finally, the created application is NOT using x11/gtk, it is a normal Mac/aqua application.
Assuming "port install codeblocks-devel +x11"  would build a gtk/x11 app, this would be an error.
So the portfile should have a check?

Like you say, that's expected for the +aqua variant - but a bug for the +x11 variant...

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: New devel/codeblocks-devel port for MacPorts
« Reply #4 on: August 06, 2007, 09:52:45 pm »
Quote
Quote
Changing src/src/ipc.h:
Quote
#ifdef __WIN32__
    typedef HANDLE shm_handle_t;
    typedef HANDLE semaphore_t;
#elif __WXMAC__
    typedef int shm_handle_t;
    typedef mach_port_t semaphore_t;
#else
    typedef int shm_handle_t;
    typedef int semaphore_t;
#endif
seemed to fix this problem.

That should be "__APPLE__" and "__MACH__" (Darwin), rather than __WXMAC__.

Fixed in r4355.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: New devel/codeblocks-devel port for MacPorts
« Reply #5 on: August 08, 2007, 02:49:31 pm »
All errors should now be fixed in latest MacPorts port and Code::Blocks SVN rev4361.