Re: [Pljava-dev] Building PLJava on Solaris issues

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To:
Subject: Re: [Pljava-dev] Building PLJava on Solaris issues
Date: 2016-03-23 02:14:59
Message-ID: 56F1FC23.1010904@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On 03/22/16 12:20, Eugenie V. Lyzenko wrote:

> 1. Maven tool does not run after install in Solaris, even with simple "mvn
> -v" version command
> 2. The native *.so module building is silently ignoring if C/C++ compilers
> are gcc/g++
> 3. The java stack size is not enough for building
> ...
> Solaris 10 with gcc. Here is the instructions:
> 1. Replace default Maven start-up script with attached one to start using
> Maven in Solaris 10. Based on Maven 3.3.9 version script.
> 2. Replace default aol.properties in the
> .m2/repository/com/github/maven-nar/nar-maven-plugin/3.2.3/nar-maven-plugin-3.2.3.jar
> with attached one to be able to use gcc in Solaris 10.
> 3. Set enough Java stack size:
> MAVEN_JAVA_RUN_ENV=-Xss2m
> export MAVEN_JAVA_RUN_ENV

Hello! Thank you for your efforts. I will definitely add a Solaris 10
building info page for the final release.

Just to make the suggestions as economical as possible, it looks as if
the changes you made to 'mvn' are these:

@@ -219,7 +219,7 @@
}

MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-$(find_maven_basedir)}"
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config")
$MAVEN_OPTS"
+MAVEN_OPTS=`concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config` $MAVEN_OPTS

# For Cygwin, switch project base directory path to Windows format before
# executing Maven. Otherwise this will cause Maven not to consider it.
@@ -235,7 +235,7 @@
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS

-exec "$JAVACMD" \
+exec "$JAVACMD" $MAVEN_JAVA_RUN_ENV \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \

So it looks as if you made two changes: (1) you changed the command
substitution syntax from $() to ``, and (2) you added a new options
variable $MAVEN_JAVA_RUN_ENV that can serve a similar purpose to
$MAVEN_OPTS.

(1) was of course necessary because the top line of the script is #!/bin/sh
and the Solaris 10 /bin/sh does not have the $() syntax. (On Solaris 11,
I read, they have made it default to ksh93 or bash, both of which do
have $() syntax, so there should be no difficulty in 11.)

On Solaris 10, I do believe both bash and ksh are available, but simply
not the default shell, so a lazier solution to (1), with no need to edit
the script, is simply to run it with bash or ksh ... that is, instead of

mvn clean install

use

bash path/to/mvn clean install

(replacing "path/to/mvn" with the correct path). Or ksh, if for some
reason your Solaris 10 installation is missing bash.

To avoid editing the script to add a new MAVEN_JAVA_RUN_ENV variable,
I would suggest simply setting the existing variable MAVEN_OPTS=-Xss2m
instead, the same technique we currently suggest on the "Building with
a 32-bit JDK" topic page.

Speaking of that topic page, I am not sure from your message whether you
were using a 32-bit or 64-bit JVM. If it was 64-bit that is somewhat
surprising, I have not seen a report of the default stack being too
small on 64-bit before. Also, did you try -Xss1m first and find it too
small, but 2m works? I may need to increase the suggestion in the docs.

Could you attach the output of 'bash path/to/mvn -v' ?

Turning to the aol.properties file, I think the simpler approach is
to create a file that has only your sparc, sparcv9, amd64 gpp additions,
and instead of inserting it into the plugin jar file, simply specify
the file location using the nar.aolProperties property, as in:

bash path/to/mvn -Dnar.aolProperties=path/to/propfile clean install

so I think that is how I will suggest it for a Solaris 10 build page.
Would you be willing to try that way and see if it works?

MAVEN_OPTS=-Xss2m bash path/to/mvn -Dnar.aolProperties=... clean install

Do not feel bad if you did not notice nar.aolProperties in the nar
documentation, it's not there. :) I only found it by reading the code.

Regards,
-Chap
_______________________________________________
Pljava-dev mailing list
Pljava-dev(at)lists(dot)pgfoundry(dot)org
http://lists.pgfoundry.org/mailman/listinfo/pljava-dev

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Eugenie V. Lyzenko 2016-03-23 17:26:24 Re: [Pljava-dev] Building PLJava on Solaris issues
Previous Message Eugenie V. Lyzenko 2016-03-22 16:20:10 [Pljava-dev] Building PLJava on Solaris issues