Compile Issue with OS X 10.7

Discussion about using Python with libRocket.

Compile Issue with OS X 10.7

Postby morgul on Thu Jan 19, 2012 12:37 am

I've been trying to compile libRocket on my mac, but I keep running into a brick wall. Without the python bindings, it compiles perfectly fine. However, when I trying compiling with the python bindings (which I need for my application), I get this:

Code: Select all
Linking CXX shared library libRocketCore.dylib
[ 55%] Built target RocketCore
[ 55%] Building CXX object CMakeFiles/RocketDebugger.dir/Users/morgul/Development/librocket/librocket-1.2.1/Source/Debugger/ElementInfo.cpp.o
[ 55%] Building CXX object CMakeFiles/RocketControls.dir/Users/morgul/Development/librocket/librocket-1.2.1/Source/Controls/SelectOption.cpp.o
[ 55%] Building CXX object CMakeFiles/RocketControls.dir/Users/morgul/Development/librocket/librocket-1.2.1/Source/Controls/WidgetTextInputSingleLinePassword.cpp.o
[ 56%] Building CXX object CMakeFiles/_rocketcore.dir/Users/morgul/Development/librocket/librocket-1.2.1/Source/Core/Python/ElementChildrenProxy.cpp.o
[ 57%] Building CXX object CMakeFiles/RocketControls.dir/Users/morgul/Development/librocket/librocket-1.2.1/Source/Controls/XMLNodeHandlerDataGrid.cpp.o
In file included from /usr/include/c++/4.2.1/ios:47,
                 from /usr/include/c++/4.2.1/ostream:45,
                 from /usr/include/c++/4.2.1/iterator:70,
                 from /opt/local/include/boost/next_prior.hpp:15,
                 from /opt/local/include/boost/utility.hpp:17,
                 from /opt/local/include/boost/python/instance_holder.hpp:10,
                 from /opt/local/include/boost/python/object/pointer_holder.hpp:14,
                 from /opt/local/include/boost/python/to_python_indirect.hpp:10,
                 from /opt/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /opt/local/include/boost/python/call.hpp:15,
                 from /opt/local/include/boost/python/object_core.hpp:14,
                 from /opt/local/include/boost/python/args.hpp:25,
                 from /opt/local/include/boost/python.hpp:11,
                 from /Users/morgul/Development/librocket/librocket-1.2.1/Build/../Include/Rocket/Core/Python/Python.h:44,
                 from /Users/morgul/Development/librocket/librocket-1.2.1/Source/Core/Python/precompiled.h:32,
                 from /Users/morgul/Development/librocket/librocket-1.2.1/Source/Core/Python/ElementChildrenProxy.cpp:28:
/usr/include/c++/4.2.1/bits/localefwd.h:58:34: error: macro "isspace" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:70:34: error: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:74:34: error: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:78:34: error: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:94:34: error: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:102:34: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:106:34: error: macro "tolower" passed 2 arguments, but takes just 1
In file included from /usr/include/c++/4.2.1/bits/basic_ios.h:44,
                 from /usr/include/c++/4.2.1/ios:50,
                 from /usr/include/c++/4.2.1/ostream:45,
                 from /usr/include/c++/4.2.1/iterator:70,
                 from /opt/local/include/boost/next_prior.hpp:15,
                 from /opt/local/include/boost/utility.hpp:17,
                 from /opt/local/include/boost/python/instance_holder.hpp:10,
                 from /opt/local/include/boost/python/object/pointer_holder.hpp:14,
                 from /opt/local/include/boost/python/to_python_indirect.hpp:10,
                 from /opt/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /opt/local/include/boost/python/call.hpp:15,
                 from /opt/local/include/boost/python/object_core.hpp:14,
                 from /opt/local/include/boost/python/args.hpp:25,
                 from /opt/local/include/boost/python.hpp:11,
                 from /Users/morgul/Development/librocket/librocket-1.2.1/Build/../Include/Rocket/Core/Python/Python.h:44,
                 from /Users/morgul/Development/librocket/librocket-1.2.1/Source/Core/Python/precompiled.h:32,
                 from /Users/morgul/Development/librocket/librocket-1.2.1/Source/Core/Python/ElementChildrenProxy.cpp:28:
/usr/include/c++/4.2.1/bits/locale_facets.h:245:53: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:274:53: error: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:817:53: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:850:53: error: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4614:44: error: macro "isspace" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4632:44: error: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4638:44: error: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4644:44: error: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4668:44: error: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4680:44: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4686:44: error: macro "tolower" passed 2 arguments, but takes just 1


This error happens in several files, before the build finally gives up. This is with the 1.2.1 release, and the latest git.

I've tried hand-built boost::python 1.44, and 1.46 installs, as well as macports boost, built with python 2.7 support. I tried looking online, to see if I could figure out what the issue was (and submit a patch), and what I've found is this:

http://bugs.python.org/issue10910

(I checked, and in Include/Rocket/Core/Python.h the files are included in the 'right' order.)

Hoping this is something that other people have run into, and know how to fix...

Thanks!
morgul
 
Posts: 5
Joined: Fri Jan 06, 2012 4:01 pm

Re: Compile Issue with OS X 10.7

Postby aiza on Thu Sep 05, 2013 4:32 am

Thanks, I'll push this to the GitHub shortly.
aiza
 
Posts: 1
Joined: Mon Sep 02, 2013 5:49 am


Return to libRocket and Python


cron