You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Ed Smiley <es...@ebrary.com> on 2010/11/01 21:59:08 UTC

Re: JVM

I reinstalled XCode and uninstalled and reinstalled all my gems, but I can't
get Builder to install, now.

On Thu, Oct 28, 2010 at 12:53 PM, Ed Smiley <es...@ebrary.com> wrote:

> That didn't seem to work.
>
> The actual code that is triggering this error is pretty transparent even
> though it involves a couple of user-defined clases.
> Each declared dependency found is tested to see it is loaded by invoking
> the Java object.
> This is done when the jars have been packaged.
>
>    def check_dependencies(build_context)
>       puts "Verifying custom service dependencies for vertical:
> '#{build_context.vertical_key}'."
>       build_context.deps.each do |dep|
>          puts "Testing dependency: '" + dep.name + "' for class: '" +
> dep.class + "'.  Subclassing '" + dep.subclass + "'."
>
> Java.java.lang.Class.forName(dep.class).asSubclass(Java.java.lang.Class.forName(dep.subclass))
>       end
>    end
>
>
> This code is well tested, and just started failing.
>
>
> On Thu, Oct 28, 2010 at 10:32 AM, Alexis Midon <al...@gmail.com>wrote:
>
>> Could this be due to the link issue after the mac update? Wihtout more
>> information, it's a shot in the dark, but who knows.
>>
>> How to fix missing source for latest Java for Mac OS X 6
>> 22<http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
>> >
>>
>> This will make clicking through to the JDK source work in Eclipse again
>> after updating to the latest Java for Mac OS X.
>>
>>   1. Go to http://connect.apple.com and download *Java for Mac OS X 10.6
>>   Update 3 Developer Package*
>>   2. Install it.
>>   3. Open a Terminal.app window
>>   4. sudo -s
>>   5. cd /System/Library/Frameworks/JavaVM.framework/Home
>>   6. ln -s
>>
>> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar
>>   .
>>   7. ln -s
>>
>> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar
>>   .
>>
>>
>>  http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
>>
>> <http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html>
>>
>> On Thu, Oct 28, 2010 at 10:20 AM, Antoine Toulme <antoine@lunar-ocean.com
>> >wrote:
>>
>> > So what's the exact error message, and how did you update your JVM ?
>> With
>> > the usual Mac software update ?
>> >
>> > Thanks,
>> >
>> > Antoine
>> >
>> > On Thu, Oct 28, 2010 at 10:03, Ed Smiley <es...@ebrary.com> wrote:
>> >
>> > > Thanks for getting back to me Alex,
>> > >
>> > > Nah,
>> > >
>> > > That's not it. :(
>> > >
>> > > $ $JAVA_HOME/bin/java -version
>> > > java version "1.6.0_22"
>> > > Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
>> > > Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>> > >
>> > > $ buildr -V
>> > > Buildr 1.4.3
>> > >
>> > > $ uname -a
>> > > ... Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
>> > > root:xnu-1504.7.4~1/RELEASE_I386 i386
>> > >
>> > >
>> > > (I'm on a Mac.)
>> > >
>> > >
>> > > On Thu, Oct 28, 2010 at 7:54 AM, Alex Boisvert <
>> alex.boisvert@gmail.com
>> > > >wrote:
>> > >
>> > > > I think RJB will use JAVA_HOME to locate the JVM's native libs.   Is
>> > you
>> > > > JAVA_HOME set correctly?
>> > > >
>> > > > You may also want to check rjb's home page for additional info.
>> > > > http://rjb.rubyforge.org
>> > > > (they do mention that LD_LIBRARY_PATH is needed but it's not; it may
>> > help
>> > > > though...)
>> > > >
>> > > > alex
>> > > >
>> > > >
>> > > > On Wed, Oct 27, 2010 at 9:36 PM, Ed Smiley <es...@ebrary.com>
>> wrote:
>> > > >
>> > > > > Hi, I recently updated my JVM.  I am invoking the Java object to
>> > check
>> > > > that
>> > > > > certain specified classes in config files can actually be
>> > instantiated
>> > > > from
>> > > > > the path of the build.  When I do that, I now get a missing JVM
>> > > message,
>> > > > and
>> > > > > yet, Java is still in my path.
>> > > > >
>> > > > > Can you shed any light on this?
>> > > > >
>> > > > > Thanks
>> > > > > Ed
>> > > >
>> > >
>> >
>>
>
>

Re: JVM

Posted by Ed Smiley <es...@ebrary.com>.
I just gave those details.  It is appending an extra /Home (/Home/Home) and
looking for a nonexistent include subdirectory.
The header files are probably somewhere, but maybe they moved after I chose
to install Java updates.

$ echo $JAVA_HOME
/Library/Java/Home

On Mon, Nov 1, 2010 at 2:26 PM, Antoine Toulme <an...@lunar-ocean.com>wrote:

> Well, the error says:
>
> extconf.rb:40:in `open': No such file or directory -
> /Library/Java/Home/Home/include (Errno::ENOENT)
> from extconf.rb:40
>
> What is the value of JAVA_HOME ?
>
> On Mon, Nov 1, 2010 at 14:02, Ed Smiley <es...@ebrary.com> wrote:
>
> > *** SIGH ***
> >
> > $ sudo ./install-osx.sh
> > Password:
> > Setting JAVA_HOME
> > Installing the latest version of Buildr
> > Building native extensions.  This could take a while...
> > ERROR:  Error installing buildr:
> > ERROR: Failed to build gem native extension.
> >
> > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> > extconf.rb
> > *** extconf.rb failed ***
> > Could not create Makefile due to some reason, probably lack of
> > necessary libraries and/or headers.  Check the mkmf.log file for more
> > details.  You may need configuration options.
> >
> > Provided configuration options:
> > --with-opt-dir
> > --without-opt-dir
> > --with-opt-include
> > --without-opt-include=${opt-dir}/include
> > --with-opt-lib
> > --without-opt-lib=${opt-dir}/lib
> > --with-make-prog
> > --without-make-prog
> > --srcdir=.
> > --curdir
> >
> --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> > extconf.rb:40:in `open': No such file or directory -
> > /Library/Java/Home/Home/include (Errno::ENOENT)
> > from extconf.rb:40
> >
> >
> > Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rjb-1.2.5
> > for
> > inspection.
> > Results logged to /Library/Ruby/Gems/1.8/gems/rjb-1.2.5/ext/gem_make.out
> >
> > ./install-osx.sh: line 52: buildr: command not found
> >
> >
> > On Mon, Nov 1, 2010 at 1:59 PM, Ed Smiley <es...@ebrary.com> wrote:
> >
> > > I reinstalled XCode and uninstalled and reinstalled all my gems, but I
> > > can't get Builder to install, now.
> > >
> > >
> > > On Thu, Oct 28, 2010 at 12:53 PM, Ed Smiley <es...@ebrary.com>
> wrote:
> > >
> > >> That didn't seem to work.
> > >>
> > >> The actual code that is triggering this error is pretty transparent
> even
> > >> though it involves a couple of user-defined clases.
> > >> Each declared dependency found is tested to see it is loaded by
> invoking
> > >> the Java object.
> > >> This is done when the jars have been packaged.
> > >>
> > >>    def check_dependencies(build_context)
> > >>       puts "Verifying custom service dependencies for vertical:
> > >> '#{build_context.vertical_key}'."
> > >>       build_context.deps.each do |dep|
> > >>          puts "Testing dependency: '" + dep.name + "' for class: '" +
> > >> dep.class + "'.  Subclassing '" + dep.subclass + "'."
> > >>
> > >>
> >
> Java.java.lang.Class.forName(dep.class).asSubclass(Java.java.lang.Class.forName(dep.subclass))
> > >>       end
> > >>    end
> > >>
> > >>
> > >> This code is well tested, and just started failing.
> > >>
> > >>
> > >> On Thu, Oct 28, 2010 at 10:32 AM, Alexis Midon <alexismidon@gmail.com
> > >wrote:
> > >>
> > >>> Could this be due to the link issue after the mac update? Wihtout
> more
> > >>> information, it's a shot in the dark, but who knows.
> > >>>
> > >>> How to fix missing source for latest Java for Mac OS X 6
> > >>> 22<
> > >>>
> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
> > >
> > >>>
> > >>> This will make clicking through to the JDK source work in Eclipse
> again
> > >>> after updating to the latest Java for Mac OS X.
> > >>>
> > >>>   1. Go to http://connect.apple.com and download *Java for Mac OS X
> > 10.6
> > >>>   Update 3 Developer Package*
> > >>>   2. Install it.
> > >>>   3. Open a Terminal.app window
> > >>>   4. sudo -s
> > >>>   5. cd /System/Library/Frameworks/JavaVM.framework/Home
> > >>>   6. ln -s
> > >>>
> > >>>
> >
> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar
> > >>>   .
> > >>>   7. ln -s
> > >>>
> > >>>
> >
> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar
> > >>>   .
> > >>>
> > >>>
> > >>>
> > http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
> > >>>
> > >>> <
> > http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html>
> > >>>
> > >>> On Thu, Oct 28, 2010 at 10:20 AM, Antoine Toulme <
> > >>> antoine@lunar-ocean.com>wrote:
> > >>>
> > >>> > So what's the exact error message, and how did you update your JVM
> ?
> > >>> With
> > >>> > the usual Mac software update ?
> > >>> >
> > >>> > Thanks,
> > >>> >
> > >>> > Antoine
> > >>> >
> > >>> > On Thu, Oct 28, 2010 at 10:03, Ed Smiley <es...@ebrary.com>
> wrote:
> > >>> >
> > >>> > > Thanks for getting back to me Alex,
> > >>> > >
> > >>> > > Nah,
> > >>> > >
> > >>> > > That's not it. :(
> > >>> > >
> > >>> > > $ $JAVA_HOME/bin/java -version
> > >>> > > java version "1.6.0_22"
> > >>> > > Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
> > >>> > > Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed
> mode)
> > >>> > >
> > >>> > > $ buildr -V
> > >>> > > Buildr 1.4.3
> > >>> > >
> > >>> > > $ uname -a
> > >>> > > ... Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
> > >>> > > root:xnu-1504.7.4~1/RELEASE_I386 i386
> > >>> > >
> > >>> > >
> > >>> > > (I'm on a Mac.)
> > >>> > >
> > >>> > >
> > >>> > > On Thu, Oct 28, 2010 at 7:54 AM, Alex Boisvert <
> > >>> alex.boisvert@gmail.com
> > >>> > > >wrote:
> > >>> > >
> > >>> > > > I think RJB will use JAVA_HOME to locate the JVM's native libs.
> > >>> Is
> > >>> > you
> > >>> > > > JAVA_HOME set correctly?
> > >>> > > >
> > >>> > > > You may also want to check rjb's home page for additional info.
> > >>> > > > http://rjb.rubyforge.org
> > >>> > > > (they do mention that LD_LIBRARY_PATH is needed but it's not;
> it
> > >>> may
> > >>> > help
> > >>> > > > though...)
> > >>> > > >
> > >>> > > > alex
> > >>> > > >
> > >>> > > >
> > >>> > > > On Wed, Oct 27, 2010 at 9:36 PM, Ed Smiley <esmiley@ebrary.com
> >
> > >>> wrote:
> > >>> > > >
> > >>> > > > > Hi, I recently updated my JVM.  I am invoking the Java object
> > to
> > >>> > check
> > >>> > > > that
> > >>> > > > > certain specified classes in config files can actually be
> > >>> > instantiated
> > >>> > > > from
> > >>> > > > > the path of the build.  When I do that, I now get a missing
> JVM
> > >>> > > message,
> > >>> > > > and
> > >>> > > > > yet, Java is still in my path.
> > >>> > > > >
> > >>> > > > > Can you shed any light on this?
> > >>> > > > >
> > >>> > > > > Thanks
> > >>> > > > > Ed
> > >>> > > >
> > >>> > >
> > >>> >
> > >>>
> > >>
> > >>
> > >
> >
>

Re: JVM

Posted by Antoine Toulme <an...@lunar-ocean.com>.
Well, the error says:

extconf.rb:40:in `open': No such file or directory -
/Library/Java/Home/Home/include (Errno::ENOENT)
from extconf.rb:40

What is the value of JAVA_HOME ?

On Mon, Nov 1, 2010 at 14:02, Ed Smiley <es...@ebrary.com> wrote:

> *** SIGH ***
>
> $ sudo ./install-osx.sh
> Password:
> Setting JAVA_HOME
> Installing the latest version of Buildr
> Building native extensions.  This could take a while...
> ERROR:  Error installing buildr:
> ERROR: Failed to build gem native extension.
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb
> *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.
>
> Provided configuration options:
> --with-opt-dir
> --without-opt-dir
> --with-opt-include
> --without-opt-include=${opt-dir}/include
> --with-opt-lib
> --without-opt-lib=${opt-dir}/lib
> --with-make-prog
> --without-make-prog
> --srcdir=.
> --curdir
> --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb:40:in `open': No such file or directory -
> /Library/Java/Home/Home/include (Errno::ENOENT)
> from extconf.rb:40
>
>
> Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rjb-1.2.5
> for
> inspection.
> Results logged to /Library/Ruby/Gems/1.8/gems/rjb-1.2.5/ext/gem_make.out
>
> ./install-osx.sh: line 52: buildr: command not found
>
>
> On Mon, Nov 1, 2010 at 1:59 PM, Ed Smiley <es...@ebrary.com> wrote:
>
> > I reinstalled XCode and uninstalled and reinstalled all my gems, but I
> > can't get Builder to install, now.
> >
> >
> > On Thu, Oct 28, 2010 at 12:53 PM, Ed Smiley <es...@ebrary.com> wrote:
> >
> >> That didn't seem to work.
> >>
> >> The actual code that is triggering this error is pretty transparent even
> >> though it involves a couple of user-defined clases.
> >> Each declared dependency found is tested to see it is loaded by invoking
> >> the Java object.
> >> This is done when the jars have been packaged.
> >>
> >>    def check_dependencies(build_context)
> >>       puts "Verifying custom service dependencies for vertical:
> >> '#{build_context.vertical_key}'."
> >>       build_context.deps.each do |dep|
> >>          puts "Testing dependency: '" + dep.name + "' for class: '" +
> >> dep.class + "'.  Subclassing '" + dep.subclass + "'."
> >>
> >>
> Java.java.lang.Class.forName(dep.class).asSubclass(Java.java.lang.Class.forName(dep.subclass))
> >>       end
> >>    end
> >>
> >>
> >> This code is well tested, and just started failing.
> >>
> >>
> >> On Thu, Oct 28, 2010 at 10:32 AM, Alexis Midon <alexismidon@gmail.com
> >wrote:
> >>
> >>> Could this be due to the link issue after the mac update? Wihtout more
> >>> information, it's a shot in the dark, but who knows.
> >>>
> >>> How to fix missing source for latest Java for Mac OS X 6
> >>> 22<
> >>> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
> >
> >>>
> >>> This will make clicking through to the JDK source work in Eclipse again
> >>> after updating to the latest Java for Mac OS X.
> >>>
> >>>   1. Go to http://connect.apple.com and download *Java for Mac OS X
> 10.6
> >>>   Update 3 Developer Package*
> >>>   2. Install it.
> >>>   3. Open a Terminal.app window
> >>>   4. sudo -s
> >>>   5. cd /System/Library/Frameworks/JavaVM.framework/Home
> >>>   6. ln -s
> >>>
> >>>
> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar
> >>>   .
> >>>   7. ln -s
> >>>
> >>>
> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar
> >>>   .
> >>>
> >>>
> >>>
> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
> >>>
> >>> <
> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html>
> >>>
> >>> On Thu, Oct 28, 2010 at 10:20 AM, Antoine Toulme <
> >>> antoine@lunar-ocean.com>wrote:
> >>>
> >>> > So what's the exact error message, and how did you update your JVM ?
> >>> With
> >>> > the usual Mac software update ?
> >>> >
> >>> > Thanks,
> >>> >
> >>> > Antoine
> >>> >
> >>> > On Thu, Oct 28, 2010 at 10:03, Ed Smiley <es...@ebrary.com> wrote:
> >>> >
> >>> > > Thanks for getting back to me Alex,
> >>> > >
> >>> > > Nah,
> >>> > >
> >>> > > That's not it. :(
> >>> > >
> >>> > > $ $JAVA_HOME/bin/java -version
> >>> > > java version "1.6.0_22"
> >>> > > Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
> >>> > > Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
> >>> > >
> >>> > > $ buildr -V
> >>> > > Buildr 1.4.3
> >>> > >
> >>> > > $ uname -a
> >>> > > ... Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
> >>> > > root:xnu-1504.7.4~1/RELEASE_I386 i386
> >>> > >
> >>> > >
> >>> > > (I'm on a Mac.)
> >>> > >
> >>> > >
> >>> > > On Thu, Oct 28, 2010 at 7:54 AM, Alex Boisvert <
> >>> alex.boisvert@gmail.com
> >>> > > >wrote:
> >>> > >
> >>> > > > I think RJB will use JAVA_HOME to locate the JVM's native libs.
> >>> Is
> >>> > you
> >>> > > > JAVA_HOME set correctly?
> >>> > > >
> >>> > > > You may also want to check rjb's home page for additional info.
> >>> > > > http://rjb.rubyforge.org
> >>> > > > (they do mention that LD_LIBRARY_PATH is needed but it's not; it
> >>> may
> >>> > help
> >>> > > > though...)
> >>> > > >
> >>> > > > alex
> >>> > > >
> >>> > > >
> >>> > > > On Wed, Oct 27, 2010 at 9:36 PM, Ed Smiley <es...@ebrary.com>
> >>> wrote:
> >>> > > >
> >>> > > > > Hi, I recently updated my JVM.  I am invoking the Java object
> to
> >>> > check
> >>> > > > that
> >>> > > > > certain specified classes in config files can actually be
> >>> > instantiated
> >>> > > > from
> >>> > > > > the path of the build.  When I do that, I now get a missing JVM
> >>> > > message,
> >>> > > > and
> >>> > > > > yet, Java is still in my path.
> >>> > > > >
> >>> > > > > Can you shed any light on this?
> >>> > > > >
> >>> > > > > Thanks
> >>> > > > > Ed
> >>> > > >
> >>> > >
> >>> >
> >>>
> >>
> >>
> >
>

Re: JVM

Posted by Ed Smiley <es...@ebrary.com>.
Well, I actually got the buildr and rjb gems reinstalled, by actually
painstakingly finding all the header files.  The "Java" object fails to
create a runtime as before, but at least I can run Buildr buildfiles that
don't use it.  One clue is that Finder shows a symlink to a header file that
is no longer there, seems to have been liquidated when I did the final 1.6
Mac JDK update.

Kids, don't try this at home, but this is how I got everything back again
(this is on a Mac, understand):

sudo mkdir -p Home/include

cd /Library/Ruby/Gems/1.8/gems/rjb-1.2.5/ext/

sudo cp * /Library/Java/Home/Home/include/


*then*


search for jni.h in Finder, copy to /Library/Java/Home/Home/include/  (many
versions)

search for jni_md.h in Finder, copy to /Library/Java/Home/Home/include/


sudo env JAVA_HOME=$JAVA_HOME gem install buildr


1 compilation errors

rjb.c:1678: error: ‘JNI_VERSION_1_4’ undeclared


OK so I guessed *wrong*, searched AGAIN in Finder for 'JNI_VERSION_1_4'

found alternate version of jni.h, took the latest


sudo env JAVA_HOME=$JAVA_HOME gem install buildr AGAIN


Successfully installed rjb-1.2.5

Successfully installed buildr-1.4.3


Whew....



On Mon, Nov 1, 2010 at 2:40 PM, Ed Smiley <es...@ebrary.com> wrote:

> No jni.h again.
> ...
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb
> checking for jni.h... no
> *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.
> ...
>
>
> $ java -version
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>

Re: JVM

Posted by Ed Smiley <es...@ebrary.com>.
No jni.h again.
...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb
checking for jni.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
...


$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

Re: JVM

Posted by Antoine Toulme <an...@lunar-ocean.com>.
How about just installing rjb directly:

sudo -s
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
gem install rjb -v 1.2.5

In general, I would leave /Library alone. The normal OS X java home is here:
/System/Library/Frameworks/JavaVM.framework/Home

You should use that to be sage.

On Mon, Nov 1, 2010 at 14:27, Ed Smiley <es...@ebrary.com> wrote:

> I think this has to do with a dependency on rjb.  If I attempt to install
> it
> manually with JAVA_HOME set it fails.
> $ sudo env JAVA_HOME=$JAVA_HOME ./install-osx.sh
> Installing the latest version of Buildr
> Building native extensions.........
> ........extconf.rb:40:in `open': No such file or directory -
> /Library/Java/Home/Home/include (Errno::ENOENT)
> from extconf.rb:40
> ...
>
> Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rjb-1.2.5
> for
> inspection....
>
> BUT "/Library/Java/Home/" is JAVA_HOME, *not* /Library/Java/Home/Home.
>
>
> For example,
>
> $ */Library/Java/Home/*bin/java -version
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>
> If I create this fake directory, I find that it is trying to find jni.h.
>
>
>
>
> On Mon, Nov 1, 2010 at 2:02 PM, Ed Smiley <es...@ebrary.com> wrote:
>
> > *** SIGH ***
> >
> > $ sudo ./install-osx.sh
> > Password:
> > Setting JAVA_HOME
> > Installing the latest version of Buildr
> > Building native extensions.  This could take a while...
> > ERROR:  Error installing buildr:
> > ERROR: Failed to build gem native extension.
> >
> > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> > extconf.rb
> > *** extconf.rb failed ***
> > Could not create Makefile due to some reason, probably lack of
> > necessary libraries and/or headers.  Check the mkmf.log file for more
> > details.  You may need configuration options.
> >
> > Provided configuration options:
> > --with-opt-dir
> > --without-opt-dir
> >  --with-opt-include
> > --without-opt-include=${opt-dir}/include
> > --with-opt-lib
> >  --without-opt-lib=${opt-dir}/lib
> > --with-make-prog
> > --without-make-prog
> >  --srcdir=.
> > --curdir
> >
> --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> > extconf.rb:40:in `open': No such file or directory -
> > /Library/Java/Home/Home/include (Errno::ENOENT)
> > from extconf.rb:40
> >
> >
> > Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rjb-1.2.5
> > for inspection.
> > Results logged to /Library/Ruby/Gems/1.8/gems/rjb-1.2.5/ext/gem_make.out
> >
> > ./install-osx.sh: line 52: buildr: command not found
> >
> >
> > On Mon, Nov 1, 2010 at 1:59 PM, Ed Smiley <es...@ebrary.com> wrote:
> >
> >> I reinstalled XCode and uninstalled and reinstalled all my gems, but I
> >> can't get Builder to install, now.
> >>
> >>
> >> On Thu, Oct 28, 2010 at 12:53 PM, Ed Smiley <es...@ebrary.com> wrote:
> >>
> >>> That didn't seem to work.
> >>>
> >>> The actual code that is triggering this error is pretty transparent
> even
> >>> though it involves a couple of user-defined clases.
> >>> Each declared dependency found is tested to see it is loaded by
> invoking
> >>> the Java object.
> >>> This is done when the jars have been packaged.
> >>>
> >>>    def check_dependencies(build_context)
> >>>       puts "Verifying custom service dependencies for vertical:
> >>> '#{build_context.vertical_key}'."
> >>>       build_context.deps.each do |dep|
> >>>          puts "Testing dependency: '" + dep.name + "' for class: '" +
> >>> dep.class + "'.  Subclassing '" + dep.subclass + "'."
> >>>
> >>>
> Java.java.lang.Class.forName(dep.class).asSubclass(Java.java.lang.Class.forName(dep.subclass))
> >>>       end
> >>>    end
> >>>
> >>>
> >>> This code is well tested, and just started failing.
> >>>
> >>>
> >>> On Thu, Oct 28, 2010 at 10:32 AM, Alexis Midon <alexismidon@gmail.com
> >wrote:
> >>>
> >>>> Could this be due to the link issue after the mac update? Wihtout more
> >>>> information, it's a shot in the dark, but who knows.
> >>>>
> >>>> How to fix missing source for latest Java for Mac OS X 6
> >>>> 22<
> >>>>
> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html>
> >>>>
> >>>> This will make clicking through to the JDK source work in Eclipse
> again
> >>>> after updating to the latest Java for Mac OS X.
> >>>>
> >>>>   1. Go to http://connect.apple.com and download *Java for Mac OS X
> >>>> 10.6
> >>>>   Update 3 Developer Package*
> >>>>   2. Install it.
> >>>>   3. Open a Terminal.app window
> >>>>   4. sudo -s
> >>>>   5. cd /System/Library/Frameworks/JavaVM.framework/Home
> >>>>   6. ln -s
> >>>>
> >>>>
> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar
> >>>>   .
> >>>>   7. ln -s
> >>>>
> >>>>
> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar
> >>>>   .
> >>>>
> >>>>
> >>>>
> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
> >>>>
> >>>> <
> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
> >>>> >
> >>>>
> >>>> On Thu, Oct 28, 2010 at 10:20 AM, Antoine Toulme <
> >>>> antoine@lunar-ocean.com>wrote:
> >>>>
> >>>> > So what's the exact error message, and how did you update your JVM ?
> >>>> With
> >>>> > the usual Mac software update ?
> >>>> >
> >>>> > Thanks,
> >>>> >
> >>>> > Antoine
> >>>> >
> >>>> > On Thu, Oct 28, 2010 at 10:03, Ed Smiley <es...@ebrary.com>
> wrote:
> >>>> >
> >>>> > > Thanks for getting back to me Alex,
> >>>> > >
> >>>> > > Nah,
> >>>> > >
> >>>> > > That's not it. :(
> >>>> > >
> >>>> > > $ $JAVA_HOME/bin/java -version
> >>>> > > java version "1.6.0_22"
> >>>> > > Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
> >>>> > > Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
> >>>> > >
> >>>> > > $ buildr -V
> >>>> > > Buildr 1.4.3
> >>>> > >
> >>>> > > $ uname -a
> >>>> > > ... Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
> >>>> > > root:xnu-1504.7.4~1/RELEASE_I386 i386
> >>>> > >
> >>>> > >
> >>>> > > (I'm on a Mac.)
> >>>> > >
> >>>> > >
> >>>> > > On Thu, Oct 28, 2010 at 7:54 AM, Alex Boisvert <
> >>>> alex.boisvert@gmail.com
> >>>> > > >wrote:
> >>>> > >
> >>>> > > > I think RJB will use JAVA_HOME to locate the JVM's native libs.
> >>>> Is
> >>>> > you
> >>>> > > > JAVA_HOME set correctly?
> >>>> > > >
> >>>> > > > You may also want to check rjb's home page for additional info.
> >>>> > > > http://rjb.rubyforge.org
> >>>> > > > (they do mention that LD_LIBRARY_PATH is needed but it's not; it
> >>>> may
> >>>> > help
> >>>> > > > though...)
> >>>> > > >
> >>>> > > > alex
> >>>> > > >
> >>>> > > >
> >>>> > > > On Wed, Oct 27, 2010 at 9:36 PM, Ed Smiley <es...@ebrary.com>
> >>>> wrote:
> >>>> > > >
> >>>> > > > > Hi, I recently updated my JVM.  I am invoking the Java object
> to
> >>>> > check
> >>>> > > > that
> >>>> > > > > certain specified classes in config files can actually be
> >>>> > instantiated
> >>>> > > > from
> >>>> > > > > the path of the build.  When I do that, I now get a missing
> JVM
> >>>> > > message,
> >>>> > > > and
> >>>> > > > > yet, Java is still in my path.
> >>>> > > > >
> >>>> > > > > Can you shed any light on this?
> >>>> > > > >
> >>>> > > > > Thanks
> >>>> > > > > Ed
> >>>> > > >
> >>>> > >
> >>>> >
> >>>>
> >>>
> >>>
> >>
> >
>

Re: JVM

Posted by Ed Smiley <es...@ebrary.com>.
I think this has to do with a dependency on rjb.  If I attempt to install it
manually with JAVA_HOME set it fails.
$ sudo env JAVA_HOME=$JAVA_HOME ./install-osx.sh
Installing the latest version of Buildr
Building native extensions.........
........extconf.rb:40:in `open': No such file or directory -
/Library/Java/Home/Home/include (Errno::ENOENT)
from extconf.rb:40
...

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rjb-1.2.5 for
inspection....

BUT "/Library/Java/Home/" is JAVA_HOME, *not* /Library/Java/Home/Home.


For example,

$ */Library/Java/Home/*bin/java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

If I create this fake directory, I find that it is trying to find jni.h.




On Mon, Nov 1, 2010 at 2:02 PM, Ed Smiley <es...@ebrary.com> wrote:

> *** SIGH ***
>
> $ sudo ./install-osx.sh
> Password:
> Setting JAVA_HOME
> Installing the latest version of Buildr
> Building native extensions.  This could take a while...
> ERROR:  Error installing buildr:
> ERROR: Failed to build gem native extension.
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb
> *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.
>
> Provided configuration options:
> --with-opt-dir
> --without-opt-dir
>  --with-opt-include
> --without-opt-include=${opt-dir}/include
> --with-opt-lib
>  --without-opt-lib=${opt-dir}/lib
> --with-make-prog
> --without-make-prog
>  --srcdir=.
> --curdir
> --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb:40:in `open': No such file or directory -
> /Library/Java/Home/Home/include (Errno::ENOENT)
> from extconf.rb:40
>
>
> Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rjb-1.2.5
> for inspection.
> Results logged to /Library/Ruby/Gems/1.8/gems/rjb-1.2.5/ext/gem_make.out
>
> ./install-osx.sh: line 52: buildr: command not found
>
>
> On Mon, Nov 1, 2010 at 1:59 PM, Ed Smiley <es...@ebrary.com> wrote:
>
>> I reinstalled XCode and uninstalled and reinstalled all my gems, but I
>> can't get Builder to install, now.
>>
>>
>> On Thu, Oct 28, 2010 at 12:53 PM, Ed Smiley <es...@ebrary.com> wrote:
>>
>>> That didn't seem to work.
>>>
>>> The actual code that is triggering this error is pretty transparent even
>>> though it involves a couple of user-defined clases.
>>> Each declared dependency found is tested to see it is loaded by invoking
>>> the Java object.
>>> This is done when the jars have been packaged.
>>>
>>>    def check_dependencies(build_context)
>>>       puts "Verifying custom service dependencies for vertical:
>>> '#{build_context.vertical_key}'."
>>>       build_context.deps.each do |dep|
>>>          puts "Testing dependency: '" + dep.name + "' for class: '" +
>>> dep.class + "'.  Subclassing '" + dep.subclass + "'."
>>>
>>> Java.java.lang.Class.forName(dep.class).asSubclass(Java.java.lang.Class.forName(dep.subclass))
>>>       end
>>>    end
>>>
>>>
>>> This code is well tested, and just started failing.
>>>
>>>
>>> On Thu, Oct 28, 2010 at 10:32 AM, Alexis Midon <al...@gmail.com>wrote:
>>>
>>>> Could this be due to the link issue after the mac update? Wihtout more
>>>> information, it's a shot in the dark, but who knows.
>>>>
>>>> How to fix missing source for latest Java for Mac OS X 6
>>>> 22<
>>>> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html>
>>>>
>>>> This will make clicking through to the JDK source work in Eclipse again
>>>> after updating to the latest Java for Mac OS X.
>>>>
>>>>   1. Go to http://connect.apple.com and download *Java for Mac OS X
>>>> 10.6
>>>>   Update 3 Developer Package*
>>>>   2. Install it.
>>>>   3. Open a Terminal.app window
>>>>   4. sudo -s
>>>>   5. cd /System/Library/Frameworks/JavaVM.framework/Home
>>>>   6. ln -s
>>>>
>>>> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar
>>>>   .
>>>>   7. ln -s
>>>>
>>>> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar
>>>>   .
>>>>
>>>>
>>>>  http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
>>>>
>>>> <http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
>>>> >
>>>>
>>>> On Thu, Oct 28, 2010 at 10:20 AM, Antoine Toulme <
>>>> antoine@lunar-ocean.com>wrote:
>>>>
>>>> > So what's the exact error message, and how did you update your JVM ?
>>>> With
>>>> > the usual Mac software update ?
>>>> >
>>>> > Thanks,
>>>> >
>>>> > Antoine
>>>> >
>>>> > On Thu, Oct 28, 2010 at 10:03, Ed Smiley <es...@ebrary.com> wrote:
>>>> >
>>>> > > Thanks for getting back to me Alex,
>>>> > >
>>>> > > Nah,
>>>> > >
>>>> > > That's not it. :(
>>>> > >
>>>> > > $ $JAVA_HOME/bin/java -version
>>>> > > java version "1.6.0_22"
>>>> > > Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
>>>> > > Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>>>> > >
>>>> > > $ buildr -V
>>>> > > Buildr 1.4.3
>>>> > >
>>>> > > $ uname -a
>>>> > > ... Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
>>>> > > root:xnu-1504.7.4~1/RELEASE_I386 i386
>>>> > >
>>>> > >
>>>> > > (I'm on a Mac.)
>>>> > >
>>>> > >
>>>> > > On Thu, Oct 28, 2010 at 7:54 AM, Alex Boisvert <
>>>> alex.boisvert@gmail.com
>>>> > > >wrote:
>>>> > >
>>>> > > > I think RJB will use JAVA_HOME to locate the JVM's native libs.
>>>> Is
>>>> > you
>>>> > > > JAVA_HOME set correctly?
>>>> > > >
>>>> > > > You may also want to check rjb's home page for additional info.
>>>> > > > http://rjb.rubyforge.org
>>>> > > > (they do mention that LD_LIBRARY_PATH is needed but it's not; it
>>>> may
>>>> > help
>>>> > > > though...)
>>>> > > >
>>>> > > > alex
>>>> > > >
>>>> > > >
>>>> > > > On Wed, Oct 27, 2010 at 9:36 PM, Ed Smiley <es...@ebrary.com>
>>>> wrote:
>>>> > > >
>>>> > > > > Hi, I recently updated my JVM.  I am invoking the Java object to
>>>> > check
>>>> > > > that
>>>> > > > > certain specified classes in config files can actually be
>>>> > instantiated
>>>> > > > from
>>>> > > > > the path of the build.  When I do that, I now get a missing JVM
>>>> > > message,
>>>> > > > and
>>>> > > > > yet, Java is still in my path.
>>>> > > > >
>>>> > > > > Can you shed any light on this?
>>>> > > > >
>>>> > > > > Thanks
>>>> > > > > Ed
>>>> > > >
>>>> > >
>>>> >
>>>>
>>>
>>>
>>
>

Re: JVM

Posted by Ed Smiley <es...@ebrary.com>.
*** SIGH ***

$ sudo ./install-osx.sh
Password:
Setting JAVA_HOME
Installing the latest version of Buildr
Building native extensions.  This could take a while...
ERROR:  Error installing buildr:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb:40:in `open': No such file or directory -
/Library/Java/Home/Home/include (Errno::ENOENT)
from extconf.rb:40


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rjb-1.2.5 for
inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/rjb-1.2.5/ext/gem_make.out

./install-osx.sh: line 52: buildr: command not found


On Mon, Nov 1, 2010 at 1:59 PM, Ed Smiley <es...@ebrary.com> wrote:

> I reinstalled XCode and uninstalled and reinstalled all my gems, but I
> can't get Builder to install, now.
>
>
> On Thu, Oct 28, 2010 at 12:53 PM, Ed Smiley <es...@ebrary.com> wrote:
>
>> That didn't seem to work.
>>
>> The actual code that is triggering this error is pretty transparent even
>> though it involves a couple of user-defined clases.
>> Each declared dependency found is tested to see it is loaded by invoking
>> the Java object.
>> This is done when the jars have been packaged.
>>
>>    def check_dependencies(build_context)
>>       puts "Verifying custom service dependencies for vertical:
>> '#{build_context.vertical_key}'."
>>       build_context.deps.each do |dep|
>>          puts "Testing dependency: '" + dep.name + "' for class: '" +
>> dep.class + "'.  Subclassing '" + dep.subclass + "'."
>>
>> Java.java.lang.Class.forName(dep.class).asSubclass(Java.java.lang.Class.forName(dep.subclass))
>>       end
>>    end
>>
>>
>> This code is well tested, and just started failing.
>>
>>
>> On Thu, Oct 28, 2010 at 10:32 AM, Alexis Midon <al...@gmail.com>wrote:
>>
>>> Could this be due to the link issue after the mac update? Wihtout more
>>> information, it's a shot in the dark, but who knows.
>>>
>>> How to fix missing source for latest Java for Mac OS X 6
>>> 22<
>>> http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html>
>>>
>>> This will make clicking through to the JDK source work in Eclipse again
>>> after updating to the latest Java for Mac OS X.
>>>
>>>   1. Go to http://connect.apple.com and download *Java for Mac OS X 10.6
>>>   Update 3 Developer Package*
>>>   2. Install it.
>>>   3. Open a Terminal.app window
>>>   4. sudo -s
>>>   5. cd /System/Library/Frameworks/JavaVM.framework/Home
>>>   6. ln -s
>>>
>>> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar
>>>   .
>>>   7. ln -s
>>>
>>> /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar
>>>   .
>>>
>>>
>>>  http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
>>>
>>> <http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html>
>>>
>>> On Thu, Oct 28, 2010 at 10:20 AM, Antoine Toulme <
>>> antoine@lunar-ocean.com>wrote:
>>>
>>> > So what's the exact error message, and how did you update your JVM ?
>>> With
>>> > the usual Mac software update ?
>>> >
>>> > Thanks,
>>> >
>>> > Antoine
>>> >
>>> > On Thu, Oct 28, 2010 at 10:03, Ed Smiley <es...@ebrary.com> wrote:
>>> >
>>> > > Thanks for getting back to me Alex,
>>> > >
>>> > > Nah,
>>> > >
>>> > > That's not it. :(
>>> > >
>>> > > $ $JAVA_HOME/bin/java -version
>>> > > java version "1.6.0_22"
>>> > > Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
>>> > > Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>>> > >
>>> > > $ buildr -V
>>> > > Buildr 1.4.3
>>> > >
>>> > > $ uname -a
>>> > > ... Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
>>> > > root:xnu-1504.7.4~1/RELEASE_I386 i386
>>> > >
>>> > >
>>> > > (I'm on a Mac.)
>>> > >
>>> > >
>>> > > On Thu, Oct 28, 2010 at 7:54 AM, Alex Boisvert <
>>> alex.boisvert@gmail.com
>>> > > >wrote:
>>> > >
>>> > > > I think RJB will use JAVA_HOME to locate the JVM's native libs.
>>> Is
>>> > you
>>> > > > JAVA_HOME set correctly?
>>> > > >
>>> > > > You may also want to check rjb's home page for additional info.
>>> > > > http://rjb.rubyforge.org
>>> > > > (they do mention that LD_LIBRARY_PATH is needed but it's not; it
>>> may
>>> > help
>>> > > > though...)
>>> > > >
>>> > > > alex
>>> > > >
>>> > > >
>>> > > > On Wed, Oct 27, 2010 at 9:36 PM, Ed Smiley <es...@ebrary.com>
>>> wrote:
>>> > > >
>>> > > > > Hi, I recently updated my JVM.  I am invoking the Java object to
>>> > check
>>> > > > that
>>> > > > > certain specified classes in config files can actually be
>>> > instantiated
>>> > > > from
>>> > > > > the path of the build.  When I do that, I now get a missing JVM
>>> > > message,
>>> > > > and
>>> > > > > yet, Java is still in my path.
>>> > > > >
>>> > > > > Can you shed any light on this?
>>> > > > >
>>> > > > > Thanks
>>> > > > > Ed
>>> > > >
>>> > >
>>> >
>>>
>>
>>
>