Skip to content

Homebrew on OS X #5

Closed
Closed

Description

@tommorris

There ought to be a Homebrew recipe for OS X.

Activity

  1. coffeemug commented on Nov 10, 2012

    @coffeemug
    Contributor

    Thanks -- we're on it. RethinkDB currently doesn't build on OS X natively, so if we can provide a homebrew recipe that loads a virtual box instance, we'll do it soon. Otherwise, it'll take a little bit longer to port to OS X.

  2. rauchg commented on Nov 10, 2012

    @rauchg

    @coffeemug I think the best alternative at this point would be to provide a vagrant image (headless ubuntu vm)
    If I could do:

    $ vagrant box add rethinkdb http://rethinkdb.org/vagrant.box
    

    That'd be awesome!

  3. RyanAmos commented on Nov 11, 2012

    @RyanAmos
  4. coffeemug commented on Nov 11, 2012

    @coffeemug
    Contributor

    @RyanAmos -- thanks, that's awesome! We'll incorporate this into the build and write up instructions!

  5. hasenj commented on Nov 11, 2012

    @hasenj

    @RyanAmos That is awesome! Just tried this on my machine, worked smoothly!

    Thanks!

    I never heard of Vagrant before! Hot stuff.

  6. coffeemug commented on Nov 11, 2012

    @coffeemug
    Contributor

    We'll have a portability discussion on Monday and will have a concrete portability plan.

  7. rauchg commented on Nov 11, 2012

    @rauchg

    Very cool @RyanAmos thanks!

  8. ghost assigned on Nov 12, 2012
  9. srh commented on Nov 12, 2012

    @srh
    Contributor

    We have decided to commence work on a native OS X port.

  10. coffeemug commented on Nov 12, 2012

    @coffeemug
    Contributor

    Moving to next. As a mac user who does demos on my laptop, I'm excited to dump the vm!

  11. keltia commented on Nov 12, 2012

    @keltia

    I can give some help to port on FreeBSD as well, it should be close to OS X.

  12. coffeemug commented on Nov 13, 2012

    @coffeemug
    Contributor

    @keltia -- very cool, thanks! We're already on top of the OS X port, can we ping you about FreeBSD when the os x port is checked in?

  13. coffeemug commented on Nov 29, 2012

    @coffeemug
    Contributor

    An update on the state of affairs - rethink now compiles and runs natively on OS X. There are some quirks @srh is still working on, but we're pretty close to having a build we can release.

    @srh -- could you enumerate open issues here so we can cross them out as they get done?

  14. keltia commented on Nov 29, 2012

    @keltia

    Please document the exact steps and command-lines needed to do that...

  15. srh commented on Dec 3, 2012

    @srh
    Contributor

    Currently you can build the rethinkdb executable on OS X, but not drivers, by doing the following:

    brew install boost protobuf v8 node

    Then,

    sudo npm install -g less coffee-script
    sum gem install ruby_protobuf

    Then, add the npm path to $PATH (add /usr/local/share/npm to $PATH).

    Then, from rethinkdb/src:

    git checkout sam_osx
    make clean
    make -j5

    I recommend adjusting the -j5 option based on how many cores your CPU has.

    That'll get the rethinkdb executable built and it'll run. You'll also see some driver-related stuff fail. You can presumably connect to it from drivers on a Linux box, if the latest commit isn't in an unbroken state. The branch is very unstable.

    Python drivers:
    One way to get python drivers working is to use brew install python && pip install --upgrade distribute && pip install --upgrade pip && pip install protobuf, and then run /usr/local/bin/python. If you want to get the original OS X python version working, you need to install the protobuf module somehow. (I tried using easy_install but it failed, and I haven't looked more closely at that.) I haven't tried just doing pip install rethinkdb, since I was building from source and generally you need to be able to run the driver source.

    Here is a list of the problems that need to be resolved:

    • Figure out the safe removal of a vestigial watch_signal function in event_queue_base_t.
    • Fix release build problems.
    • Detect parent process death in the external processes used for executing Javascript.
    • Have the makefile not hard-code static libraries to homebrew paths.
    • Add a new way to detect that a connection gets interrupted. We want to be able to interrupt queries when somebody kill -9's their process, and right now, in the next branch, we're using RDHUP to detect that. We need to do it without using RDHUP, because that's a Linux-specific feature. (This is has been skipped. Linux still uses RDHUP, but OS X won't get a solution until kqueue is implemented, which won't be right away.)
    • Fix the Linux-specific stuff where we try to read system stats from /proc/.
    • Get javascript driver to build (for dataexplorer)
    • Packaging (with homebrew? in an OS X installer?)

    The following is of secondary priority and shouldn't be in the scope of this issue (e.g. we can and should close the issue without getting these done):

    • Get python and ruby drivers to build (I think we should get them to build on OS X but we can ship without it, since people can just use the package manager)
    • Get tcmalloc working in OS X.
    • Have the makefile and building work in a user-friendly manner when building from source, so that you don't have to pass in OSX=1 or other arguments when on OS X.

    EDIT: rearranged by @coffeemug to reflect priority.

  16. 21 remaining items

  17. ghost assigned on Feb 1, 2013
  18. justinmayer commented on Feb 2, 2013

    @justinmayer

    @AtnNn: The verification you mentioned:

    node -e 'require ("less")'
    

    ... does indeed fail on my system. It appears NODE_PATH is undefined. From what I can tell from the Node formula, this appears to be normal and intended.

    If, however, I manually set a NODE_PATH environment variable to /usr/local/share/npm/lib/node_modules, then the verification passes and brew install rethinkdb proceeds without the aforementioned error.

    As a sidebar, it's worth mentioning that the modules_folder definition in the Homebrew formula for Node points to:

    "#{HOMEBREW_PREFIX}/share/npm"  # Resolves to: /usr/local/share/npm
    

    ... whereas npm install -g less coffee-script actually puts the modules into /usr/local/share/npm/lib/node_modules

    I suspect that the relevant line should instead be:

    "#{npm_prefix}/lib/node_modules"
    

    ... but I say this with complete ignorance of Node, npm, the intentions of the associated Homebrew recipe, and whether it would have any effect on this problem.

  19. RyanAmos commented on Feb 2, 2013

    @RyanAmos

    @justinmayer I believe the line you pointed out could actually be the root of all of these issues. If that truly is a bug, it could be the reason for Homebrew to actually properly find the npm dependencies. I should mention, like you, am unfamiliar with how node and npm are intended to operate within homebrew recipes.

  20. coffeemug commented on Feb 2, 2013

    @coffeemug
    Contributor

    Ok, @AtnNn told me to close this, so closing :)

  21. justinmayer commented on Feb 2, 2013

    @justinmayer

    @coffeemug said:

    Ok, @AtnNn told me to close this, so closing :)

    Um, okay.

    I'm sure @AtnNn must have his reasons for wanting this issue closed, but it would have been nice to post those reasons here. I've tested this on a completely fresh Mountain Lion 10.8.2 virtual machine, and it behaves the exact same way, so as it stands now the vast majority of folks trying to install RethinkDB via Homebrew are going to be stymied by this problem. If the plan is to file this in an issue elsewhere, why not reference it here as well?

  22. coffeemug commented on Feb 2, 2013

    @coffeemug
    Contributor

    @justinmayer -- err, sorry about that, it was a long week for me. We were going to look into how to fix these on Monday, but decided these bugs are outside of the scope of this issue. I've opened a new see -- see #282.

  23. kudos commented on Mar 11, 2013

    @kudos

    @keltia, @coffeemug are you guys still looking at FreeBSD support?

  24. coffeemug commented on Mar 11, 2013

    @coffeemug
    Contributor

    The new build system (already in next) should make building on freebsd much easier. We're not supporting FreeBSD officially, but if someone would like to submit a patch to the make/configure scripts, we'd gladly accept them.

  25. added 3 commits that reference this issue on Jul 21, 2026
  26. added 3 commits that reference this issue on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions