3.1 Build errors on OSX 10.6 Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 430
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

3.1 Build errors on OSX 10.6

Post by raananb » Mon Mar 07, 2016 9:51 am

The following make (created as usual by DialogBlocks) produces a number of errors.

I----------------------- Configuration: GCC Release -----------------------
In directory: /Users/myself/wxWidgets-3.1.0/GCCBuildReleaseOSXCocoaUnicode
sh -c "if test ! -f /Users/myself/wxWidgets-3.1.0/GCCBuildReleaseOSXCocoaUnicode/Makefile ; then /Users/myself/wxWidgets-3.1.0/configure --with-osx_cocoa --disable-debug --enable-unicode --disable-universal --disable-monolithic --enable-gui --disable-shared --enable-exceptions --without-odbc --without-opengl --enable-xrc --enable-html --with-regex=builtin --enable-richtext --disable-mediactrl --enable-aui --enable-ribbon --enable-propgrid --enable-stc ; fi ; make"
checking build system type...
i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking for toolkit... osx_cocoa
...

....
ranlib /Users/myself/wxWidgets-3.1.0/GCCBuildReleaseOSXCocoaUnicode/lib/libwxscintilla-3.1.a
/Users/myself/wxWidgets-3.1.0/GCCBuildReleaseOSXCocoaUnicode/bk-make-pch ./.pch/wxprec_baselib/wx/wxprec.h.gch wx/wxprec.h g++ -mmacosx-version-min=10.7 -I./.pch/wxprec_baselib -D__WXOSX_COCOA__ -DWXBUILDING -I/Users/myself/wxWidgets-3.1.0/GCCBuildReleaseOSXCocoaUnicode/src/tiff/libtiff -I/Users/myself/wxWidgets-3.1.0/src/tiff/libtiff -I/Users/myself/wxWidgets-3.1.0/src/jpeg -I/Users/myself/wxWidgets-3.1.0/src/png -I/Users/myself/wxWidgets-3.1.0/src/regex -DwxUSE_GUI=0 -DwxUSE_BASE=1 -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0 -I/Users/myself/wxWidgets-3.1.0/GCCBuildReleaseOSXCocoaUnicode/lib/wx/include/osx_cocoa-unicode-static-3.1 -I/Users/myself/wxWidgets-3.1.0/include -DWX_PRECOMP -O2 -fno-common
*** In file included from /Users/myself/wxWidgets-3.1.0/include/wx/string.h:36,
*** from /Users/myself/wxWidgets-3.1.0/include/wx/memory.h:15,
*** from /Users/myself/wxWidgets-3.1.0/include/wx/object.h:19,
*** from /Users/myself/wxWidgets-3.1.0/include/wx/wx.h:15,
*** from /Users/myself/wxWidgets-3.1.0/include/wx/wxprec.h:42:
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrtbase.h: In function 'wchar_t* wxStrdup(const wchar_t*)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrtbase.h:654: error: 'wcsdup' was not declared in this scope
*** In file included from /Users/myself/wxWidgets-3.1.0/include/wx/hashmap.h:15,
*** from /Users/myself/wxWidgets-3.1.0/include/wx/wx.h:20,
*** from /Users/myself/wxWidgets-3.1.0/include/wx/wxprec.h:42:
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'size_t wxStrnlen(const char*, size_t)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:173: error: 'strnlen' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'size_t wxStrnlen(const wchar_t*, size_t)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:187: error: 'wcsnlen' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStricmp(const wchar_t*, const wchar_t*)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:459: error: 'wcscasecmp' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStricmp(const wchar_t*, const wxScopedWCharBuffer&)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:459: error: 'wcscasecmp' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStricmp(const wxScopedWCharBuffer&, const wchar_t*)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:459: error: 'wcscasecmp' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStricmp(const wxScopedWCharBuffer&, const wxScopedWCharBuffer&)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:459: error: 'wcscasecmp' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStrnicmp(const wchar_t*, const wchar_t*, size_t)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:529: error: 'wcsncasecmp' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStrnicmp(const wchar_t*, const wxScopedWCharBuffer&, size_t)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:529: error: 'wcsncasecmp' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStrnicmp(const wxScopedWCharBuffer&, const wchar_t*, size_t)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:529: error: 'wcsncasecmp' was not declared in this scope
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h: In function 'int wxStrnicmp(const wxScopedWCharBuffer&, const wxScopedWCharBuffer&, size_t)':
*** /Users/myself/wxWidgets-3.1.0/include/wx/wxcrt.h:529: error: 'wcsncasecmp' was not declared in this scope

*** make: *** [.pch/wxprec_baselib/wx/wxprec.h.gch] Error 1

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4423
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: 3.1 Build errors on OSX 10.6

Post by ONEEYEMAN » Tue Mar 08, 2016 4:08 pm

Hi,
10.6 support for 3.1 has been dropped. The minimum required OSX version is 10.7.

You can still build 10.6 on 3.0 though...

Thank you.

raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 430
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: 3.1 Build errors on OSX 10.6

Post by raananb » Tue Mar 08, 2016 8:43 pm

Thanks for the information.

psumbera
In need of some credit
In need of some credit
Posts: 8
Joined: Mon May 02, 2016 12:56 pm

Re: 3.1 Build errors on OSX 10.6

Post by psumbera » Mon May 02, 2016 1:02 pm

I'm getting the same error on Solaris with 3.0.2. Isn't Solaris supported? And what does it mean technically?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4423
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: 3.1 Build errors on OSX 10.6

Post by ONEEYEMAN » Mon May 02, 2016 1:31 pm

psumbera,
What is you compiler? What version? What is you configure line?
Also, which Solaris version it is?

Thank you.

psumbera
In need of some credit
In need of some credit
Posts: 8
Joined: Mon May 02, 2016 12:56 pm

Re: 3.1 Build errors on OSX 10.6

Post by psumbera » Mon May 02, 2016 2:08 pm

ONEEYEMAN wrote:psumbera,
What is you compiler? What version? What is you configure line?
Also, which Solaris version it is?

Thank you.
g++ (GCC) 5.3.0
Solaris development version (the one which shall come after S11)
I started with what we have now for 2.8.12 (https://java.net/projects/solaris-userl ... s?rev=5898):
configure --prefix=/usr --mandir=/usr/share/man --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib --with-gtk --enable-gtk2 --enable-unicode --enable-mimetype --enable-gui --enable-xrc --with-subdirs --with-expat --with-sdl --without-gnomeprint --without-gnomevfs --with-opengl --without-libmpack

Thanks for looking at it!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4423
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: 3.1 Build errors on OSX 10.6

Post by ONEEYEMAN » Mon May 02, 2016 2:59 pm

psumbera, It may not necessary help you but it will simplify you build script.

Code: Select all

configure --prefix=/usr --mandir=/usr/share/man --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib --with-gtk --enable-gtk2 --enable-unicode --enable-mimetype --enable-gui --enable-xrc --with-subdirs --with-expat --with-sdl --without-gnomeprint --without-gnomevfs --with-opengl --without-libmpack
1. --enable-Unicode - you don't need it. It is currently a default one. You can get rid of it. It is kept in 3.x for compatibility reasons and for people who explicitly testing ANSI build of the library.
2. I believe the proper option is "--with-gtk={1|2|3}" and you don't need "--enable-gtk2" in this case. Those again are kept for compatibility/historical reasons.
3. --enable-gui will be specified because you are asking for the GTK to be built. It will be enabled. You are not explicitly disabling it and building the library without the GUI.

Other than that - I don't know. I'm sure you configure line can be simplified even more. I will need to pull my Solaris install when I come home tonight.

Thank you.

User avatar
doublemax
Moderator
Moderator
Posts: 15170
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 3.1 Build errors on OSX 10.6

Post by doublemax » Mon May 02, 2016 5:36 pm

I'm getting the same error on Solaris with 3.0.2.
It's a little hard to believe that you get the exact same errors. Please post your error log.
Isn't Solaris supported?
Solaris is not officially supported. The team tries to make wxWidgets compile under Solaris but it relies on external users (like you) for testing and fixes.
And what does it mean technically?
Either some include paths are missing so that functions from the standard library like "strnlen" are not found. Or some header files fail to detect the compiler/platform correctly and assume that certain functions exist on your platform although they don't.
Use the source, Luke!

psumbera
In need of some credit
In need of some credit
Posts: 8
Joined: Mon May 02, 2016 12:56 pm

Re: 3.1 Build errors on OSX 10.6

Post by psumbera » Tue May 03, 2016 9:20 am

doublemax wrote:
I'm getting the same error on Solaris with 3.0.2.
It's a little hard to believe that you get the exact same errors. Please post your error log.
In file included from /builds/psumbera/userland-wxwidgets/components/wxwidgets/wxWidgets-3.0.2/include/wx/string.h:45:0,
from /builds/psumbera/userland-wxwidgets/components/wxwidgets/wxWidgets-3.0.2/include/wx/memory.h:15,
from /builds/psumbera/userland-wxwidgets/components/wxwidgets/wxWidgets-3.0.2/include/wx/object.h:19,
from /builds/psumbera/userland-wxwidgets/components/wxwidgets/wxWidgets-3.0.2/include/wx/wx.h:15,
from /builds/psumbera/userland-wxwidgets/components/wxwidgets/wxWidgets-3.0.2/include/wx/wxprec.h:58:
/builds/psumbera/userland-wxwidgets/components/wxwidgets/wxWidgets-3.0.2/include/wx/wxcrtbase.h: In function 'wchar_t* wxStrdup(const wchar_t*)':
/builds/psumbera/userland-wxwidgets/components/wxwidgets/wxWidgets-3.0.2/include/wx/wxcrtbase.h:680:68: error: 'wcsdup' was not declared in this scope
inline wchar_t* wxStrdup(const wchar_t *s) { return wxCRT_StrdupW(s); }
^ ^
---

Please see also attached full build log.
Attachments
build-log.txt
Build log output.
(377.31 KiB) Downloaded 59 times

User avatar
doublemax
Moderator
Moderator
Posts: 15170
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 3.1 Build errors on OSX 10.6

Post by doublemax » Tue May 03, 2016 9:28 am

Try "-std=gnu++11" instead of "-std=c++11".
Use the source, Luke!

psumbera
In need of some credit
In need of some credit
Posts: 8
Joined: Mon May 02, 2016 12:56 pm

Re: 3.1 Build errors on OSX 10.6

Post by psumbera » Tue May 03, 2016 11:27 am

doublemax wrote:Try "-std=gnu++11" instead of "-std=c++11".
The result is still the same...
Attachments
build-log-gnu++11.txt
Build log with -std=gnu++11" instead of "-std=c++11"
(377.16 KiB) Downloaded 51 times

User avatar
doublemax
Moderator
Moderator
Posts: 15170
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 3.1 Build errors on OSX 10.6

Post by doublemax » Tue May 03, 2016 12:09 pm

It's a little strange that the whole scintilla compoments builds fine and then it fails at the "bk-make-pch" call.

If nobody else has an idea, try asking on the wx-users mailing list:
https://groups.google.com/forum/#!forum/wx-users
Use the source, Luke!

psumbera
In need of some credit
In need of some credit
Posts: 8
Joined: Mon May 02, 2016 12:56 pm

Re: 3.1 Build errors on OSX 10.6

Post by psumbera » Thu May 05, 2016 12:55 pm

Ok. The Solaris problem really was that wcsdup and few others are not declared in default C++ name space. So std::wcsdup will solve the issue for now.

Post Reply