[
https://issues.apache.org/jira/browse/LUCENE-3018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019848#comment-13019848
]
Simon Willnauer commented on LUCENE-3018:
-----------------------------------------
hey varun,
here are some comments
do we need
{code}
<property environment="env"/>
<property name="jni1" location="${env.JAVA_HOME}/include" />
<property name="jni2" location="${env.JAVA_HOME}/include/linux" />
{code}
or can we simply use
{code}
<includepath>
<pathelement location="${java.home}/include"/>
<pathelement location="${java.home}/lnclude/linux"/>
</includepath>
{code}
instead of using
{code}<fileset file="src/java/org/apache/lucene/store/NativePosixUtil.cpp" />
{code}
we should rather using
{code}<fileset file="${src.dir}/org/apache/lucene/store/NativePosixUtil.cpp" />
{code}
I wonder if we really want to put the build .so file into
src/java/org/apache/lucene/store/NativePosixUtil (outfile) or if this should
rather be build into ${common.build.dir}
that way it would be cleaned up too something like this:
{code}
<mkdir dir="${common.build.dir}/native"/>
<cpptasks:cc outtype="shared" subsystem="console"
outfile="${common.build.dir}/native/NativePosixUtil" >
{code}
Do we need to specify gcc as the compiler? afaik its default so we might can
let it choose the default?
I also wonder what happens if the java.home points to a $JAVA_HOME/jre
directory and not to $JAVA_HOME directly in such a case we need to include
${java.home}/../include etc. maybe we need to specify the path based on a
condition?
it would be great if we had a way to test that the native lib works so maybe we
wanna check that too with a small testcase?
simon
> Lucene Native Directory implementation need automated build
> -----------------------------------------------------------
>
> Key: LUCENE-3018
> URL: https://issues.apache.org/jira/browse/LUCENE-3018
> Project: Lucene - Java
> Issue Type: Wish
> Components: Build
> Affects Versions: 4.0
> Reporter: Simon Willnauer
> Assignee: Varun Thacker
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-3018.patch, LUCENE-3018.patch, cpptasks.jar
>
>
> Currently the native directory impl in contrib/misc require manual action to
> compile the c code (partially) documented in
>
> https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/contrib/misc/src/java/overview.html
> yet it would be nice if we had an ant task and documentation for all
> platforms how to compile them and set up the prerequisites.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]