Author Topic: Need help building for Mac OS X  (Read 909 times)

Offline Xaviou

  • Almost regular
  • **
  • Posts: 240
    • X@v's Web
Need help building for Mac OS X
« on: December 27, 2016, 05:04:07 pm »
Hi.

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=macosx
The configure script stopped while checking for zlib :
Code: [Select]
../configure: line 17846: syntax error near unexpected token `zlib,'
../configure: line 17846: `PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)'

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
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.

Regards
Xav'
The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : http://x.psoud.free.fr/

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10061
Re: Need help building for Mac OS X
« Reply #1 on: December 27, 2016, 07:07:08 pm »
Does the build-in version provide pkg-config file for it?
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frankofrank

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Need help building for Mac OS X
« Reply #2 on: January 09, 2017, 06:58:40 pm »
Hi,

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

returns:

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'
  line>prefix=/usr
 Variable declaration, 'prefix' has value '/usr'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/usr'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/usr/lib'
  line>sharedlibdir=${libdir}
 Variable declaration, 'sharedlibdir' has value '/usr/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/usr/include'
  line>
  line>Name: zlib
  line>Description: zlib compression library
  line>Version: 1.2.5
  line>
  line>Requires:
  line>Libs: -L${libdir} -L${sharedlibdir} -lz
  line>Cflags: -I${includedir}


file zlib.h exists in

/usr/include/zlib.h


Regards
frankofrank