Compiling error in the -isysroot and -mmacosx-version-min= flags

#1

I am not sure exactly why this error suddenly appeared. I am getting it compiling a project for android in Eclipse. I am using the git repository checked out at the 0.8.4 tag and I double-checked the Makefile is pointing correctly to there.

clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'
clang: error: invalid version number in '-mmacosx-version-min='
make[2]: *** [../../../libs/openFrameworksCompiled/lib/osx/obj/Debug/libs/openFrameworks/3d/of3dPrimitives.o] Error 1
make[1]: *** [Debug] Error 2
make: *** [all] Error 2

In that directory I can see I don’t have a MacOSX.sdk file as supposed but rather two: a MacOSX10.9.sdk and a MacOSX10.10.sdk.

How can I fix this? Any idea? Thanks.

I guess an idea would be to copy one of those files and rename it to what OF wants. I am just finding it strange because until recently I had no problems whatsoever compiling both Android and OSX OF projects.

#2

The latest Makefile supports 10.10 and command line tools. grab the changes here:

https://github.com/openframeworks/openFrameworks/pull/3502

Just replace the updated file in your 0.8.4 directory.

If it works, could you let me know here at the pull request – if it does, I’ll just go ahead and merge it.

Thx!

2 Likes
#3

Wow. That was super helpful! Thanks so much @bakercp. It did the trick! :smile:

I still don’t really get it though. I have another workspace set up in a non-standard location (let’s say different from both myApps and examples) and it works ok.

Anyway, thanks again :wink:

#4

Glad the makefile worked. Since it worked for you and others, I’m merging it into master now.

Not sure what to say about your other workspace issue though … truly strange.

#5

Cool to know that somehow I am impacting the master branch of OF!

About the workspace, it’s most probably some weird configuration thing that I am overlooking, though I really have no clue what that might be. Anyway, it’s working now and that’s the important part :stuck_out_tongue:

Cheers :wink:

1 Like
#6

@nunons I accidentally performed a system update that installed some new XCode components… when it finished openFrameworks would not build from the command line anymore.

Maybe that’s what happened to you as well? I’m trying the new makefile now.

2 Likes
#7

That worked for me, minus some copy-base boner where tabs were converted to spaces. Thanks!!!

1 Like
#8

Wow! That might very well have been the case. I just checked App Store updates and I had a Command Line Tools update the exact day I started having the issue. Cheers

1 Like
#9

I’ve been getting the exact same error message nunos initially had. That being said, I’m trying to set up OF in Sublime and am not quite sure if I have set up all other necessary files correctly yet. I did follow these instructions. But when I build using this build system i get the error:

clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'
clang: error: invalid version number in '-mmacosx-version-min='
make[2]: *** [../../../libs/openFrameworksCompiled/lib/osx/obj/Debug/libs/openFrameworks/3d/of3dPrimitives.o] Error 1
make[1]: *** [Debug] Error 2
make: *** [Debug] Error 2

My limite knowledge on the subject tell me something is wrong with clang? Is it missing? How would I install it in Sublime? I havent found it in Package Control.

Sorry for the newbieness… :confused:

#10

It sounds like you’re probably on 10.10? Currently the make files in 0.8.4 are not 10.10 compatible. If you grab the makefile from the master branch (specifically this file https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworksCompiled/project/osx/config.osx.default.mk) and replace the corresponding file in the 0.8.4 distribution, it should work.

#11

Oh, I see that I already answered this question earlier in the thread. Please check that answer.

#12

I actually did see your previous answer and figured since I downloaded my version of OF just a couple of days ago, the change would be integrated already in the download. So now I downloaded the file you mentioned and replaced the old makefile. The previous error is gone, but now I’m stuck with this:

warning: Using QTKit, which is deprecated in OSX 10.9 [-W#warnings]
        #warning Using QTKit, which is deprecated in OSX 10.9
         ^
../../../libs/openFrameworks/video/ofQTKitMovieRenderer.m:87:18: error: assigning to 'NSString *' from incompatible type 'NSURL *'
        movieURL = [NSURL URLWithString:moviePath];
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libs/openFrameworks/video/ofQTKitMovieRenderer.m:90:18: error: assigning to 'NSString *' from incompatible type 'NSURL *'
        movieURL = [NSURL fileURLWithPath:[moviePath stringByStandardizingPath]];
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libs/openFrameworks/video/ofQTKitMovieRenderer.m:582:9: warning: unused variable 'endTime' [-Wunused-variable]
        QTTime endTime =[_movie frameEndTime:t];
               ^
    2 warnings and 2 errors generated.
    make[2]: *** [../../../libs/openFrameworksCompiled/lib/osx/obj/Debug/libs/openFrameworks/video/ofQTKitMovieRenderer.o] Error 1
    make[1]: *** [Debug] Error 2
    make: *** [Debug] Error 2
Help with OF/Sublime setup for non-programmers?
#13

I get same error trying to compile, make…

clang: warning: optimization flag ‘-finline-functions’ is not supported
clang: warning: argument unused during compilation: ‘-finline-functions’
…/…/…/libs/openFrameworks/video/ofQTKitMovieRenderer.m:16:3: warning: Using QTKit, which is deprecated in OSX 10.9 [-W#warnings]
#warning Using QTKit, which is deprecated in OSX 10.9
^
…/…/…/libs/openFrameworks/video/ofQTKitMovieRenderer.m:87:18: error: assigning to ‘NSString *’ from incompatible type ‘NSURL *’
movieURL = [NSURL URLWithString:moviePath];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
…/…/…/libs/openFrameworks/video/ofQTKitMovieRenderer.m:90:18: error: assigning to ‘NSString *’ from incompatible type ‘NSURL *’
movieURL = [NSURL fileURLWithPath:[moviePath stringByStandardizingPath]];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
…/…/…/libs/openFrameworks/video/ofQTKitMovieRenderer.m:582:9: warning: unused variable ‘endTime’ [-Wunused-variable]
QTTime endTime =[_movie frameEndTime:t];
^
2 warnings and 2 errors generated.

#14

What OS X version, Xcode version and OF version are you using @logickphp?

#15

Hi, I am using Yosemite OSX and Xcode 6.3.1. But the project start from Linux Ubuntu.

I was testing somethings yesterday. I created new project from Osx Project Generator I put my code in src and WORKS!!

I think the makefiles it is not shareable between platforms ubuntu, osx and raspberry Pi.
Finally I decide to upload only src folder to control version GIT, and mantain other folders in each platform.

¿What is the good practique for developing in all platforms?

Thank you so much.