buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Spiewak <>
Subject Re: segfaults with java 6
Date Thu, 30 Jul 2009 13:58:02 GMT
If it makes you feel any better, the problem is with RJB and not Buildr
itself.  However, that doesn't change anything about user perception...

To be honest, I'm with you on this one.  I would much rather run Buildr
under MRI, or really *any* Ruby implementation other than JRuby.  Don't get
me wrong, I love the JRuby project, but a tool like Buildr lives and dies by
startup time, an area where JRuby does very poorly.  One option which might
work on Mac OS X (one which I haven't tried) is to use SoyLatte 32bit (
Note that if you take this route, you will need to do more than just set
JAVA_HOME and the PATH, you will need to actually symlink
/System/Library/Frameworks/JavaVM.framework/Versions/SoyLatte/Libraries to
the correct directory within SoyLatte, and then
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK to
/System/Library/Frameworks/JavaVM.framework/Versions/SoyLatte.  Crazy Apple
VM layout...

As for running Buildr with Java 6 on other platforms, like Linux or Windows,
I've actually had a lot more success along those lines.  To be honest, I've
never had it segfault on Windows, and on Linux only when RJB has been
incorrectly compiled/linked.  So, the main trouble is Mac, and as the
"Common Problems and Solutions" document states, the trouble is 32bit MRI
mixing with 64bit Java.  The only possible solution I can see here is to
create an entirely new Ruby-Java bridge based on sockets.  Obviously, this
isn't a viable option (unless someone wants to volunteer?).

So, that brings us back to square one.  I don't know what else to say at
this point, we really have tried a lot of different solutions to this
problem, none of which have worked terribly well.


On Thu, Jul 30, 2009 at 7:00 AM, Martin Grotzke <> wrote:

> Hi,
> I just want to address the issue, that with java 6 there can occur
> segfaults from time to time. The advice ([1]) is to go back to java 5 or
> to use jruby. Both solution are not ideal IMHO. java 5 might not be an
> option as there are already projects that require java 6, and jruby is
> not ideal as it has longer startup times of buildr. Therefore, from my
> point of view, running buildr "natively" is the best option and if it's
> required with java 6.
> For new users this might be an issue that causes a loss of trust in
> buildr and the stable build.
> Do you also think that this issue should be addressed and eliminated?
> Are you aware of any reasons that might cause the segmentation faults?
> I have also a concrete example (from one of my colleagues) with a
> segmentation fault. That's a part from the build output:
> $ buildr clean; buildr -t
> ...
> Testing needed. Latest prerequisite change: Do Jul 30 10:59:26 +0200 2009
> (/home/philip/projects/final-folder/buildfile). Last successful test run:
> ** Invoke ff:core:test (first_time)
> ** Invoke /home/philip/projects/final-folder/buildfile (not_needed)
> ** Invoke ff:core:test:compile (first_time)
> ** Invoke ff:core:compile (not_needed)
> ** Invoke ff:core:test:resources (first_time)
> ** Execute ff:core:test:resources
> ** Invoke /home/philip/projects/final-folder/core/target/test/resources
> (first_time)
> ** Execute /home/philip/projects/final-folder/core/target/test/resources
> Segmentation fault
> This is caused by the invocation of just buildr (without any task), if
> buildr is invoked with a task (e.g. build, compile or test) there's no
> segementation fault.
> This are the versions of buildr, ruby and java:
> Java: 1.6.0_14
> Ruby: 1.8.7
> Buildr: 1.3.4
> If that's also the case for other users, a first workaround might be not
> to promote the invocation of just "buildr", but instead say that "buildr
> build" should be run.
> What do you think?
> Thanx && cheers,
> Martin
> [1]

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message