Hi John,

I'm attaching a patch of build.xml (I only added two lines), as well as a 
typical build.properties that can be generated by autoconf.

These two changes lets users choose whatever prefix they'd wish and the test 
target forked by build.xml would work. The <jvmarg> line can then be used in 
other targets that fork Java processes.

Shiran

Attachment: build.xml.patch
Description: Binary data

Attachment: build.properties
Description: Binary data

On Apr 13, 2010, at 6:22 PM, K. John Wu wrote:

> Hi, Shiran,
> 
> The problem we are facing seems to be that the libfastbitjni.lo can not be 
> moved to a directory other than the one specified at configure time.  If a 
> prefix was not specified when running the configure script, then it is 
> default to /usr/local.  I have not been doing a lot of tests on java side, 
> therefore, have not bothered to figure out a solution.
> 
> If you share with us your build.xml and build.properties, I would be more 
> than happy to try it out and include them in the next release provided that I 
> can get them to work.  How does that sounds to you?
> 
> John
> 
> 
> On 4/9/2010 8:44 AM, Shiran Pasternak wrote:
>> Hi,
>> 
>> The INSTALL doc states that the FastBit JNI library must be installed in 
>> "/usr/local/lib." I think that's based on the assumption that the Java 
>> installation uses that path as the default value for the system property 
>> "java.library.path." The path is actually different on a different 
>> architecture, such as Mac OS X, that has the "java.library.path" property 
>> set to other paths. This is made slightly more complicated by the fact that 
>> under Ant properties are immutable and that property is set when the VM is 
>> launched.
>> 
>> To get around it, I made a few modifications to the build.xml file. First, 
>> it reads properties from a build.properties file (a standard Ant practice):
>> 
>>   <property file="build.properties" />
>> 
>> The build.properties can be generated at compile-time. The file contains an 
>> arbitrarily-named argument, say:
>> 
>> fastbit.library.path=${HOME}/lib # Or ${PREFIX}/lib from configure
>> 
>> Then, the following argument is set at the forked process (e.g., java, 
>> junit):
>> 
>>       <jvmarg value="-Djava.library.path=${fastbit.library.path}"/>
>> 
>> Running the unit tests (target: test) succeeds.
>> 
>> Is this a viable solution for the JNI path problem or are there other 
>> reasons for installing the fastbitjni libraries in /usr/local/lib?
>> 
>> Cheers,
>> Shiran
>> _______________________________________________
>> FastBit-users mailing list
>> [email protected]
>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to