-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac: make Xcode optional for building libuv #31
Comments
Without seeing more details, I assume what is happening is that OCaml itself (whether esy or opam) works fine in your environment, but the libuv build failed because of the internal build of the vendored libuv. If that's the case, then yes, Xcode may be required. That's not intentional - it's a consequence of the libuv build process, if true. Can you confirm that this is what is happening? Alternatively, can you show the error message, and I should be able to confirm? If so, we would have to look into the libuv build to see what can be done. IIRC there is an autotools-based build alternative for libuv, not sure if it is still maintained. That may be able to detect your C compiler even when Xcode is not installed. There may also be options for the gyp build (that is currently used) that can be used to achieve this. |
Also, in case it helps to debug in your environment, here are the build commands Luv issues for building vendored libuv: Lines 4 to 10 in c73630f
The Lines 1 to 10 in c73630f
This all runs in |
..and the build instructions for libuv: https://github.com/libuv/libuv#build-instructions Finally, I'm glad this project can be useful :) |
Here is the output of luvv [master]make test
dune build src/vendor/libuv.a
gyp_uv src/vendor/libuv.a
['-f', 'make', '-I', 'common.gypi', 'test/test.gyp', '--depth=.', '-Goutput_dir=/Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out', '--generator-output', '/Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out', '-Dhost_arch=x64', '-Dtarget_arch=x64', '-Duv_library=static_library']
make src/vendor/libuv.a
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/fs-poll.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/idna.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/inet.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/random.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/strscpy.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/threadpool.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/timer.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/uv-data-getter-setters.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/uv-common.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/version.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/async.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/core.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/dl.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/fs.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/getaddrinfo.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/getnameinfo.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/loop.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/loop-watcher.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/pipe.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/poll.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/process.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/random-devurandom.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/signal.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/stream.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/tcp.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/thread.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/tty.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/udp.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/proctitle.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/darwin.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/fsevents.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/darwin-proctitle.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/random-getentropy.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/bsd-ifaddrs.o
CC(target) /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/obj.target/libuv/src/unix/kqueue.o
LIBTOOL-STATIC /Users/prisc_000/working/GitHub/luvv/_build/default/src/vendor/libuv/out/Release/libuv.a
dune build test/tester.exe
File "src/syntax/dune", line 4, characters 13-28:
4 | (preprocess (future_syntax)))
^^^^^^^^^^^^^^^
Error: Program ocaml-syntax-shims not found in the tree or in PATH
(context: default)
make: *** [test] Error 1
➜ luvv [master] |
Adding My ocaml version is: luv2 [master]ocamlc -version
4.07.1
➜ luv2 [master] So I am guessing that this line is supposed to install it if the version is greater than Line 20 in c73630f
Is that correct? To the original question, Xcode is required then? |
The line should install As for Xcode, looking at the libuv build instructions, it looks like it is required as long as Luv uses the gyp build process for libuv. We can work around this requirement by using autotools instead, but then autotools is required, and we will need detection code to find out what is present. |
Also, instead of |
#45 replaced the GYP build with a different process, so the libuv build no longer uses or looks for Xcode on Mac. |
Sorry didn't get back to you. Lost track of it. |
Brother @aantron! First, you are beast brother. This project is awesome. Thanks for taking the time to develop and share.
Question. Im on a mac with limited space so i regularly remove Xcode. Building failed because It was not on my machine. Is Xcode required to build this project? If so, is it not buildable in a docker container?
Thank you, sir.
The text was updated successfully, but these errors were encountered: