wren-lang/wren-cli

Libuv SDK Version Problems with Xcode 7

iwillspeak opened this issue · 5 comments

Currently if building on OS X I get the following make output:

        cc src/aux/wren_aux_meta.c        -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/aux/wren_aux_random.c      -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/vm/wren_compiler.c         -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/vm/wren_core.c             -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/vm/wren_debug.c            -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/vm/wren_primitive.c        -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/vm/wren_utils.c            -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/vm/wren_value.c            -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/vm/wren_vm.c               -O0 -DDEBUG -g -std=c99 -fPIC
        ar lib/libwrend.a                 rcu
        cc lib/libwrend.dylib             -O0 -DDEBUG -g -std=c99 -fPIC 
        cc src/cli/main.c                 -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/cli/modules.c              -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/cli/vm.c                   -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/module/io.c                -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/module/scheduler.c         -O0 -DDEBUG -g -std=c99 -fPIC
        cc src/module/timer.c             -O0 -DDEBUG -g -std=c99 -fPIC
        cc bin/wrend                      -O0 -DDEBUG -g -std=c99 -fPIC
ld: warning: object file (build/libuv.a(core.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(fs.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(tty.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(uv-common.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(loop.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(pipe.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(stream.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(timer.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(async.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(loop-watcher.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(kqueue.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(fs-poll.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(darwin.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(poll.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(process.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(signal.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(tcp.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(udp.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(threadpool.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(inet.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(thread.o)) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (build/libuv.a(fsevents.o)) was built for newer OSX version (10.11) than being linked (10.10)

It looks like the SDK version being used to build libuv is different to that being used to build Wren. It looks like i'm currently using XCode 7 with Clang 7 to build this. Maybe we need to set -mmacosx-version-min=version when building Wren on OS X?

That's annoying. :(

I like your idea for a fix, though I'm not sure what min version to set it too. We don't want to require 10.10. It looks like it's not an issue with building Wren itself so much as it is compiling libuv. You can probably tweak this by adding the right flag when we call xcodebuild in libuv.py.

I can't upgrade to XCode 7 yet, but if you figure out a fix, send it my way and I'll try it out and see how it goes on Xcode 6.

Having had a look around at this it seems that you can't target OS 10.10 with the Xcode 7 xcodebuild. Listing SDKs shows that only the 10.11 SDK is installed. Looks like there must be something wrong with the setup of the command line tools though as they're still managing to compile Wren to target 10.10.

Because there isn't a 10.10 SDK avaiable to xcodebuild it looks like this isn't a simple fix. It might be a case of ignoring the warning until a newer version of the command line tools are available.

Yeah, if it's just a warning and you're still able to build, I guess let's ignore it for now. :-/

This is no longer a problem when building. Not sure what fixed it, but I'm guessing an update to the Xcode command line tools.

Bugs that magically fix themselves are my favorite kind of bugs! 😄