joyent/libuv

outdated build instructions

Closed this issue · 6 comments

The repository used to checkout gyp has changed, it is now https://chromium.googlesource.com/external/gyp.git, this should be updated in README.md

Also, there are currently no instructions on the README on how to install libuv. One would expect "make install" or something similar to work (but it doesn't, at least not in OSX). I had to copy over the *pc, *.a and *.h files to the appropriate places manually.

A final note would be that perhaps libuv should consider switching from having autotools on *nix and gyp on everything else, to use cmake on all platforms. It is more widely used and supported, and I can't see a single feature of gyp that libuv is using which is not available on cmake (but I am probably missing something).

Hey @acornejo, thanks for bringing this up, I actually had the same issue since the gyp url changed. However, I was able to switch the url and then build on OS X without having to do the manual copy.
Once the gyp clone was done, I then run as specified in the docs.:
$ ./gyp_uv.py -f xcode
$ xcodebuild -ARCHS="x86_64" -project uv.xcodeproj
-configuration Release -target All

I have a PR #1548 started to address this, so feel free to take a look at it and pitch in ideas.
Thank you.

@odeke-em

I was also able to switch the URL and build on OSX. However.. I did need the manual copy, since xcode does not install the header files globally.

Oh I see. I guess since I don't use xcode, I couldn't catch the manual copy trip. I'll also try reproducing this probably over the weekend.

The repository used to checkout gyp has changed, it is now https://chromium.googlesource.com/external/gyp.git, this should be updated in README.md

That got updated, thanks for pointing it out!

Also, there are currently no instructions on the README on how to install libuv. One would expect "make install" or something similar to work (but it doesn't, at least not in OSX). I had to copy over the *pc, *.a and *.h files to the appropriate places manually.

I assume you used gyp, in that case, it must be a gyp issue. The pkg-config file is only generated if autoconf is used, and in that case make install does work. If you want The True Unix Experience (TM) use the autoconf build system.

If you thing we should add some extra test to the README, could you write a PR for it?

A final note would be that perhaps libuv should consider switching from having autotools on *nix and gyp on everything else, to use cmake on all platforms. It is more widely used and supported, and I can't see a single feature of gyp that libuv is using which is not available on cmake (but I am probably missing something).

That's not up for discussion at the moment, sorry. We are stuck with gyp on Windows for the time being. Note that libuv was created as part of Node, and gyp provides nice integration in this area.

@acornejo there's a 3rd-party example of a CMakeLists for libuv here https://github.com/aseprite/libuv-cmake/blob/master/CMakeLists.txt but I can't speak to how regularly it's updated or how fully it supports the same set of platforms as libuv's current gyp and/or autotools. For projects that are already using cmake it would be convenient to be able to manage libuv as an ExternalProject, but I can understand @saghul would be reluctant to support yet another build system in-tree.

I'm going to close this now. @acornejo @odeke-em feel free to open a PR with the improvements you see fit for the README!