On Wed, 11 Jul 2012, Peter W. Draper wrote:
> On Thu, 5 Jul 2012, Tim Jenness wrote:
>
>> I was doing the starjava kapuahi build and whilst everything seemed to work
>> I noticed, when scrolling through the log, that the SPLAT build failed for
>> me because it could not find jniast in order to build the line catalogue (I
>> think).
>
> Not quite true, the line catalogues should be packed regardless of this
> error. The failure is in creating an index of the spectral ranges of all the
> packed lines. This is used when a scan for all lines that lie on a spectrum
> is done.
Now I've reproduced a similar failure, it is worse than this and all the
lines are also missing from the final jar file. I've added a fix to stop
the build when this happens.
>> Redoing the SPLAT build seemingly works fine (nothing happens) but I think
>> that just means that there is some dependency issue which leads the
>> previous failure to leave enough lying around for a rerun to think that it
>> worked.
>>
>> Doing an "ant install" of jniast, cleaning the splat directory and
>> doing "ant build" does fix the rebuild of the catalogues since,
>> although it initially fails to load a local jniast it manages to find
>> one in DYLD_LIBRARY_PATH.
>>
>> The error (when I had OSX using i386 in the DYLD_LIBRARY_PATH because
>> of history in the Starlink login files):
>>
>> build-lineids:
>> [java] Jul 5, 2012 12:34:48 PM uk.ac.starlink.util.Loader
>> starjavaDirectory
>> [java] WARNING: Loader.class location
>> file:/Users/timj/work/starjava-kapuahi/util/build/classes/uk/ac/starlink/util/Loader.class
>> unexpected
>> [java] Exception in thread "main" java.lang.UnsatisfiedLinkError:
>> couldn't load library jniast: Can't load library:
>> /Users/timj/work/starjava-kapuahi/splat/lib/x86_64/libjniast.jnilib
>> [java] at uk.ac.starlink.util.Loader.loadLibrary(Loader.java:150)
>> [java] at uk.ac.starlink.ast.AstObject.<clinit>(AstObject.java:58)
>> [java] at
>> uk.ac.starlink.splat.data.LineIDTXTSpecDataImpl.createSpecFrameAst(LineIDTXTSpecDataImpl.java:486)
>> [java] at
>> uk.ac.starlink.splat.data.LineIDTXTSpecDataImpl.readData(LineIDTXTSpecDataImpl.java:318)
>> [java] at
>> uk.ac.starlink.splat.data.LineIDTXTSpecDataImpl.readFromFile(LineIDTXTSpecDataImpl.java:167)
>> [java] at
>> uk.ac.starlink.splat.data.LineIDTXTSpecDataImpl.<init>(LineIDTXTSpecDataImpl.java:105)
>> [java] at
>> uk.ac.starlink.splat.util.LineIDTree.processSpectrum(LineIDTree.java:129)
>> [java] at
>> uk.ac.starlink.splat.util.LineIDTree.process(LineIDTree.java:100)
>> [java] at
>> uk.ac.starlink.splat.util.LineIDTree.<init>(LineIDTree.java:74)
>> [java] at
>> uk.ac.starlink.splat.util.LineIDTree.main(LineIDTree.java:387)
>> [java] Caused by: java.lang.UnsatisfiedLinkError:
>> /star/starjava/lib/i386/libjniast.jnilib: no suitable image found.
>> Did find: /star/starjava/lib/i386/libjniast.jnilib: mach-o, but wrong
>> architecture /star-kapuahi/starjava/lib/i386/libjniast.jnilib:
>> mach-o, but wrong architecture
>> /star-kapuahi/starjava/lib/i386/libjniast.jnilib: mach-o, but wrong
>> architecture /star-kapuahi//starjava/lib/i386/libjniast.jnilib:
>> mach-o, but wrong architecture
>> /star-kapuahi//starjava/lib/i386/libjniast.jnilib: mach-o, but wrong
>> architecture /star/starjava/lib/i386/libjniast.jnilib: mach-o, but
>> wrong architecture
>> [java] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>> [java] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)
>> [java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1742)
>> [java] at java.lang.Runtime.loadLibrary0(Runtime.java:823)
>> [java] at java.lang.System.loadLibrary(System.java:1045)
>> [java] at uk.ac.starlink.util.Loader.loadLibrary(Loader.java:115)
>> [java] ... 9 more
>> [java] Java Result: 1
>> [jar] Building jar:
>> /Users/timj/work/starjava-kapuahi/splat/lib/splat/splat_lines.jar
>
> Sorry for the slow reply. I've had a couple of attempts to repeat this error,
> but cannot do so, so you'll have to wait longer for me to suggest a fix
> (maybe I should just generate the index on the fly). But for clarity, the
> intention was always that STARJAVA could build as a whole without any parts
> being installed, so looking for the JNIAST parts in the build tree is
> correct, when the installed version cannot be found. SPLAT seems to be doing
> that.
>
>> BUILD SUCCESSFUL
>>
>>
>> Should I be worried that this fails and should I be worried that it
>> fails silently (ie BUILD SUCCESSFUL). Isn't SPLAT always going to have
>> a problem finding the installed jniast if you are doing a clean build?
>> Shouldn't SPLAT be looking in the proper installed lobation rather
>> than the SPLAT build tree?
>>
>> --
>> Tim Jenness
>>
>
> --
> Peter W. Draper, http://astro.dur.ac.uk/~pdraper
>
--
Peter W. Draper, http://astro.dur.ac.uk/~pdraper
|