Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Need help building for Mac OS X

(1/5) > >>


I am currently trying to build C::B on Mac but..... it fails   :-\

As I saw that frankofrank has made a build with wx-3.1.0, I tried with a recently updated git clone of wx-3.1.1
I've made a dynamic build of wxWidgets, and made a copy of wx-config in /usr/local/bin so it callable from any terminal window.

Then I have:

* created a copy of the C::B svn repo
* called bootstrap
* created a "buildtest" sub folder and "cd" into it
* made a call to ../configure --with-platform=macosxThe configure script stopped while checking for zlib :

--- Code: ---../configure: line 17846: syntax error near unexpected token `zlib,'
../configure: line 17846: `PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)'
--- End code ---

I've tried to "brew install zlib" but after installing, brew said that osx already have this package:

--- Quote from: brew ---This formula is keg-only, which means it was not symlinked into /usr/local.

macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/zlib/lib
    CPPFLAGS: -I/usr/local/opt/zlib/include
    PKG_CONFIG_PATH: /usr/local/opt/zlib/lib/pkgconfig
--- End quote ---
And the configure script always fails.

Any idea ?
I also saw that the wxWidgets build process hasn't found it, and used the built-in version.


Does the build-in version provide pkg-config file for it?


my OSX is 10.11.6

for wxWidgets I have:

$ ACLOCAL=/usr/local/bin/aclocal-1.15  AUTOMAKE=/usr/local/bin/automake-1.15  CC=clang     CXX=clang++  ./configure  --prefix=/usr/local/Cellar/wxmac/3.1.1  --with-platform=macosx --with-osx_cocoa --with-macosx-version-min=10.11 --enable-debug

Configured wxWidgets 3.1.1 for `x86_64-apple-darwin15.6.0'

  Which GUI toolkit should wxWidgets use?                 osx_cocoa
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no

$ pkg-config --debug zlib


Looking for package 'zlib'
Looking for package 'zlib-uninstalled'
Reading 'zlib' from file '/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.11/zlib.pc'
Parsing package file '/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.11/zlib.pc'
 Variable declaration, 'prefix' has value '/usr'
 Variable declaration, 'exec_prefix' has value '/usr'
 Variable declaration, 'libdir' has value '/usr/lib'
 Variable declaration, 'sharedlibdir' has value '/usr/lib'
 Variable declaration, 'includedir' has value '/usr/include'
  line>Name: zlib
  line>Description: zlib compression library
  line>Version: 1.2.5
  line>Libs: -L${libdir} -L${sharedlibdir} -lz
  line>Cflags: -I${includedir}

file zlib.h exists in



Have you solved this issue?
I got the same problem when build the cb in MacOSX 10.12.


--- Quote from: iceant on August 14, 2017, 06:31:16 am ---Have you solved this issue?
I got the same problem when build the cb in MacOSX 10.12.

--- End quote ---
Yes I did (but I don't know how  :-\ )
I've just cleaned my own build sub dir, re-ran bootstrap and configure :

--- Code: ---cd buildtest
../configure --with-platform=macosx
--- End code ---

The configure process gave me the following result :

--- Code: ---*************************************************
* Code::Blocks source tree has been configured. *

You can now build Code::Blocks by issuing 'make'.
When the build is complete, become root and install
it by issuing 'make install'.

   CFLAGS:     -O2 -ffast-math  -fPIC -std=c90
   CXXFLAGS:   -O2 -ffast-math  -Winvalid-pch -fPIC -fexceptions
   CPPFLAGS:   -DCB_AUTOCONF  -DCB_PRECOMP -DPIC -I$(top_srcdir)/src/include/tinyxml -DTIXML_USE_STL=YES
   CXX:        g++ -std=c++11
   CC:         gcc

--- End code ---

I've launched the make process, but I had an error :

--- Code: ---../../../src/sdk/configmanager.cpp:1515:98: error: no member named 'GetInstallPrefix' in 'wxStandardPaths'
            ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetInstallPrefi...
                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../../src/sdk/configmanager.cpp:1520:102: error: no member named 'GetInstallPrefix' in 'wxStandardPaths'
                ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetInstallP...
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.
--- End code ---

If I comment these 2 lines (they are non-osx related), the build process seems to be ok.
Edit: I tried again with wx-3.0.3 (the previous steps were with wx-3.1.1) and I was able to uncomment these lines.

The next step will be to create a bundle but I didn't tried this yet.



[0] Message Index

[#] Next page

Go to full version