Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-06 Thread Caolán McNamara
On Mon, 2010-12-06 at 01:28 -0600, Norbert Thiebaud wrote:
 Cloph, Wol and me have been working on it on IRC, resulting in
 bootstrap:474e4b60fec1f859bc16f268d6340d7850c7874e

Well, if it works it works. Still think that all the readlink stuff
before trying findhome.java is fairly dubious and that trying findhome
first and then falling back to scraping the possible JAVA_HOME out of
the paths and readlink should be the fallback position. But I don't have
access to all platforms to take on that fight.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-06 Thread Christian Lohmaier
Hi Norbert, *,

On Mon, Dec 6, 2010 at 8:28 AM, Norbert Thiebaud nthieb...@gmail.com wrote:
 On Sun, Dec 5, 2010 at 9:39 PM, Thorsten Behrens
 t...@documentfoundation.org wrote:
 Caolan McNamara wrote:
 IIRC I tried this before, and there was some cockup under MacOSX, so if
 someone on MacOSX could see what findhome says and if its correct/wrong
 vs what works correctly there, that'd be helpful.

 About 4k miles away from my MacBook currently - Norbert, Cloph,
 any chance to give this a try?

 Cloph, Wol and me have been working on it on IRC, resulting in
 bootstrap:474e4b60fec1f859bc16f268d6340d7850c7874e

Hmm - but the result of the IRC-discussion was to use (for Mac)
/usr/libexec/java_home where available (10.5 and newer), and the
hardcoded fallbackpath of either
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
or /Library/Java/Home (which in the end points to the
/System/Library. one.

http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html
wasn't it?

I quit IRC early, so have to read some of the backlog, but my
impression was that this was the way to go..

ciao
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-06 Thread Norbert Thiebaud
On Mon, Dec 6, 2010 at 6:53 AM, Christian Lohmaier
lohma...@googlemail.com wrote:
 Hi Norbert, *,

 On Mon, Dec 6, 2010 at 8:28 AM, Norbert Thiebaud nthieb...@gmail.com wrote:
 On Sun, Dec 5, 2010 at 9:39 PM, Thorsten Behrens
 t...@documentfoundation.org wrote:
 Caolan McNamara wrote:
 IIRC I tried this before, and there was some cockup under MacOSX, so if
 someone on MacOSX could see what findhome says and if its correct/wrong
 vs what works correctly there, that'd be helpful.

 About 4k miles away from my MacBook currently - Norbert, Cloph,
 any chance to give this a try?

 Cloph, Wol and me have been working on it on IRC, resulting in
 bootstrap:474e4b60fec1f859bc16f268d6340d7850c7874e

 Hmm - but the result of the IRC-discussion was to use (for Mac)
 /usr/libexec/java_home where available (10.5 and newer), and the
 hardcoded fallbackpath of either
 /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
 or /Library/Java/Home (which in the end points to the
 /System/Library. one.

 http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html
 wasn't it?


Yes indeed.

Which is not what the result is. since the readlink cruf is still
attempted before that... I'll have a pass at it to re-order these.

Norbert

 I quit IRC early, so have to read some of the backlog, but my
 impression was that this was the way to go..

 ciao
 Christian

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-06 Thread Wols Lists
On 06/12/10 12:57, Norbert Thiebaud wrote:
 Hmm - but the result of the IRC-discussion was to use (for Mac)
  /usr/libexec/java_home where available (10.5 and newer), and the
  hardcoded fallbackpath of either
  /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
  or /Library/Java/Home (which in the end points to the
  /System/Library. one.
 
  http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html
  wasn't it?
 
 Yes indeed.

 Which is not what the result is. since the readlink cruf is still
 attempted before that... I'll have a pass at it to re-order these.

 Norbert

Sorry - that's my fault, but I was a bit out of my depth and it was late.

The problem as I saw it was making sure Mac still went through the old
path first, because findhome is successful but returns a dud path.

And it was the trap the comments said was for mac that was the trap that
made gentoo bomb.

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-06 Thread Norbert Thiebaud
Ok, I pushed a new version that should be doing 'The Right thing(tm)' on MacOS

It is still doing the readlink stuf on other platforms...

Norbert

On Mon, Dec 6, 2010 at 7:21 AM, Wols Lists antli...@youngman.org.uk wrote:
 On 06/12/10 12:57, Norbert Thiebaud wrote:
 Hmm - but the result of the IRC-discussion was to use (for Mac)
  /usr/libexec/java_home where available (10.5 and newer), and the
  hardcoded fallbackpath of either
  /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
  or /Library/Java/Home (which in the end points to the
  /System/Library. one.
 
  http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html
  wasn't it?
 
 Yes indeed.

 Which is not what the result is. since the readlink cruf is still
 attempted before that... I'll have a pass at it to re-order these.

 Norbert

 Sorry - that's my fault, but I was a bit out of my depth and it was late.

 The problem as I saw it was making sure Mac still went through the old
 path first, because findhome is successful but returns a dud path.

 And it was the trap the comments said was for mac that was the trap that
 made gentoo bomb.

 Cheers,
 Wol

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-06 Thread Christian Lohmaier
Hi *,

On Mon, Dec 6, 2010 at 2:21 PM, Wols Lists antli...@youngman.org.uk wrote:
 On 06/12/10 12:57, Norbert Thiebaud wrote:

 The problem as I saw it was making sure Mac still went through the old
 path first, because findhome is successful but returns a dud path.

Yes - having the Mac check first is perfectly fine, since then the
JAVA_HOME will neither be emtpy nor set to /usr, thus the findhome
based check will be skipped.

ciao
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified?

2010-12-05 Thread Caolán McNamara
On Sat, 2010-12-04 at 16:07 -0600, Norbert Thiebaud wrote:
 I had to add --with-jdk-home=/opt/sun-jdk-1.6.0.20
 to my gentoo build.

Hmm, I wonder.

If you go to configure.in and change

if test x$with_jdk_home = x -a $_gij_longver -ge 40200; then

to

if test x$with_jdk_home = x; then

and re-run configure without any --with-jdk-home does it then work. And
if it does not work, there should at least now be a findhome.class
generated by configure. What's the output of java findhome in that
case ?

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified?

2010-12-05 Thread Wols Lists
On 05/12/10 14:28, Wols Lists wrote:
 On 05/12/10 11:26, Caolán McNamara wrote:
 On Sat, 2010-12-04 at 16:07 -0600, Norbert Thiebaud wrote:
 I had to add --with-jdk-home=/opt/sun-jdk-1.6.0.20
 to my gentoo build.
 Hmm, I wonder.

 If you go to configure.in and change

 if test x$with_jdk_home = x -a $_gij_longver -ge 40200; then

 to

 if test x$with_jdk_home = x; then

 and re-run configure without any --with-jdk-home does it then work. And
 if it does not work, there should at least now be a findhome.class
 generated by configure. What's the output of java findhome in that
 case ?

 No luck, it's not working. And what's findhome.class supposed to be? A
 file in the directory? Not there, I'm afraid :-(

 Anyways, I now have some more clues to start digging harder :-)
 SOLAR_JAVA is TRUE ...

 anth...@ashdown ~/gitstuff/lotest $ whereis javac
 javac: /usr/bin/javac /opt/icedtea6-bin-1.9.1/bin/javac
 anth...@ashdown ~/gitstuff/lotest $

 I'll see what I can come up with, if anyone else can dig too :-)

$JDK = sun, so of course there's no findhome.class, it's bounded by  if
$JDK = gcj 

I've got as far as $JAVA_HOME = /usr, which it doesn't like, so I'm now
debugging the sanity check, because I'm guessing this wipes JAVA_HOME
without finding it where it really should ...

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified?

2010-12-05 Thread Caolán McNamara
On Sun, 2010-12-05 at 14:28 +, Wols Lists wrote:
 No luck, it's not working. And what's findhome.class supposed to be? A
 file in the directory? Not there, I'm afraid :-(

Look into the configure.in itself, and search for findhome. Looks like
that all the other (incredibly dodgy) hackery to set JAVA_HOME disables
dumping out that piece of java code which (IMO) is likely the best
approach to finding JAVA_HOME automatically.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified?

2010-12-05 Thread Wols Lists
On 05/12/10 16:08, Caolán McNamara wrote:
 On Sun, 2010-12-05 at 14:28 +, Wols Lists wrote:
 No luck, it's not working. And what's findhome.class supposed to be? A
 file in the directory? Not there, I'm afraid :-(
 Look into the configure.in itself, and search for findhome. Looks like
 that all the other (incredibly dodgy) hackery to set JAVA_HOME disables
 dumping out that piece of java code which (IMO) is likely the best
 approach to finding JAVA_HOME automatically.

I've found out what's blowing up ...

 elif readlink $JAVACOMPILER /dev/null 2/dev/null; then
# maybe only one level of symlink (e.g. on Mac)
JAVA_HOME=$(readlink $JAVACOMPILER)
 else

$JAVACOMPILER is set to /usr/bin/javac (which is as expected ...) BUT

on gentoo, that's a symlink to run-java-tool. What's expected is a
symlink to /opt/icedtea/bin/javac, I think :-)

I'm still digging :-)

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified?

2010-12-05 Thread Wols Lists
On 05/12/10 16:08, Caolán McNamara wrote:
 On Sun, 2010-12-05 at 14:28 +, Wols Lists wrote:
 No luck, it's not working. And what's findhome.class supposed to be? A
 file in the directory? Not there, I'm afraid :-(
 Look into the configure.in itself, and search for findhome. Looks like
 that all the other (incredibly dodgy) hackery to set JAVA_HOME disables
 dumping out that piece of java code which (IMO) is likely the best
 approach to finding JAVA_HOME automatically.

Nope. That code is looking for $JDK=gcj. On my system $JDK=sun, so it
never gets near it ...

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified?

2010-12-05 Thread Wols Lists
On 05/12/10 16:54, Caolán McNamara wrote:
 On Sun, 2010-12-05 at 16:35 +, Wols Lists wrote:
 On 05/12/10 16:08, Caolán McNamara wrote:
 On Sun, 2010-12-05 at 14:28 +, Wols Lists wrote:
 No luck, it's not working. And what's findhome.class supposed to be? A
 file in the directory? Not there, I'm afraid :-(
 Look into the configure.in itself, and search for findhome. Looks like
 that all the other (incredibly dodgy) hackery to set JAVA_HOME disables
 dumping out that piece of java code which (IMO) is likely the best
 approach to finding JAVA_HOME automatically.

 Nope. That code is looking for $JDK=gcj. On my system $JDK=sun, so it
 never gets near it ...
 Yes. That's what I'm saying. It has always looked to me that all the
 other dodgy hackery to set JAVA_HOME is horribly fragile. AND IMO the
 right way is to try and run findhome which has some chance of giving the
 right result. Well, assuming that findhome gives the right results.

 So, humour me, and cut and paste the contents of findhome.java out of
 configure into something called findhome.java, run javac findhome and
 java findhome and what output does it give. i.e. does it give the same
 output as what you had to pass to --with-jdk-home manually

Yup. findhome found the right place (or I assume it did).

/opt/icedtea6-bin-1.9.1

The other thing I tried (which I presume is not guaranteed to work
everywhere :-( is whereis, which found it fine, too.

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-05 Thread Wols Lists
On 05/12/10 20:40, Caolán McNamara wrote:
 On Sun, 2010-12-05 at 17:24 +, Wols Lists wrote:
 Yup. findhome found the right place (or I assume it did).

 /opt/icedtea6-bin-1.9.1
 Yeah, so what I'd like to see is that findhome (or something like it) is
 the normal way to get the jdk home when one is not set via the
 --with-jdk-home. And if that fails for some reason then fall back to the
 get the path to java and cut bits off it and hope for the best route
 rather than trying that first.

 IIRC I tried this before, and there was some cockup under MacOSX, so if
 someone on MacOSX could see what findhome says and if its correct/wrong
 vs what works correctly there, that'd be helpful.

HMMM!!!

It's the MacOS test that's messing up gentoo ...!

So what someone (me? you?) might do is just put  the findhome test in
regardless, or put it at the start with a wrapper if OS != mac.

(
I'd actually rather it tried whereis first, but I don't think that's
always there, and my sed-awk-whatsit-fu isn't up to that...
anth...@ashdown ~/gitstuff/lotest $ whereis javac
javac: /usr/bin/javac /opt/icedtea6-bin-1.9.1/bin/javac
anth...@ashdown ~/gitstuff/lotest $
It seems so simple - take the last entry and strip the last two bits off
- bet there's a snag ...
)

Let's wait til tomorrow night to see if anyone on a mac bites, and if
they don't we can try and do this and get it in the build.

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified | findhome | MacOSX location ?

2010-12-05 Thread Norbert Thiebaud
On Sun, Dec 5, 2010 at 9:39 PM, Thorsten Behrens
t...@documentfoundation.org wrote:
 Caolan McNamara wrote:
 IIRC I tried this before, and there was some cockup under MacOSX, so if
 someone on MacOSX could see what findhome says and if its correct/wrong
 vs what works correctly there, that'd be helpful.

 About 4k miles away from my MacBook currently - Norbert, Cloph,
 any chance to give this a try?

Cloph, Wol and me have been working on it on IRC, resulting in
bootstrap:474e4b60fec1f859bc16f268d6340d7850c7874e

Norbert


 Cheers,

 -- Thorsten

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java build problem identified?

2010-12-04 Thread Norbert Thiebaud
On Sat, Dec 4, 2010 at 3:14 PM, Wols Lists antli...@youngman.org.uk wrote:
 Dunno how to fix it, but I think I've found out what's wrong with my
 build ... the following is output from autogen

 checking whether to build with Java support... yes
 checking for java... /usr/bin/java
 checking the installed JDK... checked (JDK 1.6.0_20)
 checking for target java bytecode version... 1.6
 checking for javac... /usr/bin/javac
 checking for javadoc... /usr/bin/javadoc
 configure: WARNING: JAVA_HOME was not explicitly informed with
 --with-jdk-home. the configure script
 configure: WARNING: attempted to find JAVA_HOME automatically, but
 apparently it failed
 configure: WARNING: in case JAVA_HOME is incorrectly set, some projects
 with not be built correctly

 so it's clearly found the jdk, but it can't identify where it is. It's a
 standard gentoo install and presumably had no problem finding it before
 on the old build system. I've installed virtual/jdk-1.6.0. I'm guessing
 icedtea is a jdk? Which is installed in /opt/icedtea6-bin-1.9.1. So the
 build system ought to pick it up ...

I had to add --with-jdk-home=/opt/sun-jdk-1.6.0.20
to my gentoo build.



 However, I've now installed the Oracle jdk and pointed jdk-home at that,
 and it seems (touch wood) to be building okay...

 Cheers,
 Wol
 ___
 LibreOffice mailing list
 LibreOffice@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice