Hi all,
I really hope someone can help me with this, I don't really know neither Macs nor c++. I am having a problem compiling ofxMaps under Mac OSX, but the problem occurs for ofxHTTP files (like BaseRouteSettings.cpp or FileSystemRoute.cpp). The machine specs are currently OS X Yosemite:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.3
BuildVersion: 14D131
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: OS X 10.10.3 (14D131)
Kernel Version: Darwin 14.3.0
Boot Volume: Macintosh HD
Boot Mode: Normal
$ uname -a
Darwin XXXX 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
On this machine, there is Xcode Version 6.3.2 (6D2105), which has OS X SDK 10.10 and 10.9 - and I also found an older Xcode dmg, from which I grabbed OS X SDK 10.8 and copied it for this Xcode.
After a ton of problems, I managed to have something of an xcode project file, that looks like it is compiling, except that it fails here. First I had to get of_v0.8.4_osx_release so I have a working projectGenerator_osx
, which helped me generate the Xcode project, which I then had to edit manually (adding all ofxMaps dependencies as "Groups" under addons, so they compile; adding openFrameworksDebug.a
that was missing from "Target / Build Phases" in Xcode). That didn't want to compile, so I moved onto openFrameworks from git. Note that I already cloned the dependencies from https://github.com/bakercp (that is, ofxGeo, ofxSpatialHash, ofxIO, ofxTaskQueue, ofxHTTP, ofxSSLManager, ofxMediaType, ofxNetworkUtils, ofxMaps) into addons/ subdirectory for both cases.
Anyways, this example, including the .xcodeproj, is packed as a zip here:
ofxMaps_example.zip (79.6 KB)
... and I got it after running these commands in its directory:
xcodebuild clean
xcodebuild -configuration Debug clean
make clean
make CleanDebug
# make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' # to see make options
I am adding ofxMaps_example under examples/addons/
subdirectory.
The log after doing:
xcodebuild -configuration Debug 2>&1 | tee ../ofxm-xcode.log # `build` is assumed
... can be found here: ofxm-xcode.log.h (194.3 KB, .h added just for the uploader)
After that I run the usual make
:
make Debug 2>&1 | tee ../ofxm-make.log
... and the log for that can be found here: ofxm-make.log.h (233.6 KB, .h added just for the uploader)
In case of Xcode build, the error starts with:
...
CompileC build/ofxMaps_example.build/Debug/ofxMaps_example.build/Objects-normal/i386/FileSystemRoute.o
...
In file included from /Users/USER/src/openFrameworks_git/addons/ofxHTTP/libs/ofxHTTP/src/FileSystemRoute.cpp:26:
In file included from ../../../addons/ofxHTTP/libs/ofxHTTP/include/ofx/HTTP/FileSystemRoute.h:29:
In file included from ../../../addons/ofxHTTP/libs/ofxHTTP/include/ofx/HTTP/BaseRoute.h:29:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:604:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:332:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__functional_base:63:21: error: invalid operands to binary expression ('const Poco::Net::MediaType' and 'const Poco::Net::MediaType')
{return __x < __y;}
~~~ ^ ~~~
...
... which I find rather weird, because:
FileSystemRoute.cpp:26: #include "ofx/HTTP/FileSystemRoute.h"
FileSystemRoute.h:29: #include "ofx/HTTP/BaseRoute.h"
BaseRoute.h:29: #include <string>
... and so the errors happen basically when <string>
is #include
d - at which point there shouldn't be any mixups with Poco::Net::MediaType
??
The error during make is quite similar - except it happens during compiling a different file:
Compiling ../../../addons/ofxHTTP/libs/ofxHTTP/src/BaseRouteSettings.cpp
...
In file included from ../../../addons/ofxHTTP/libs/ofxHTTP/src/BaseRouteSettings.cpp:26:
In file included from /Users/USER/src/openFrameworks_git/addons/ofxHTTP/libs/ofxHTTP/include/ofx/HTTP/BaseRouteSettings.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/set:387:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tree:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:332:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__functional_base:63:21: error: invalid operands to binary expression ('const Poco::Net::MediaType' and 'const Poco::Net::MediaType')
{return __x < __y;}
~~~ ^ ~~~
...
So, why does this error occur - and how can I get this example to compile on Mac OSX?
Thanks in advance for any answers,
Cheers!
EDIT: I also tried the following:
- built
openFrameworks_git/apps/projectGenerator/projectGeneratorSimple/bin/projectGeneratorSimpleDebug.app
, which went fine - used
projectGeneratorSimpleDebug.app
to generate a new project skeleton forexample_basic_client
underopenFrameworks_git/examples/addons/
, with onlyofxHTTP
(and no others) as an addon - copied
src/
andbin/data/
content fromopenFrameworks_git/addons/ofxHTTP/example_basic_client
(the one gotten from git) into the project-generatedexample_basic_client
- tried to build the project-generated
example_basic_client
... and also this one fails with /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__functional_base:63:21: Invalid operands to binary expression ('const Poco::Net::MediaType' and 'const Poco::Net::MediaType')
So I guess if example_basic_client
of ofxHTTP
gets fixed, also my original query will get fixed... Let's hope someone has a pointer or two about this...