[Pljava-dev] pljava.so wont compile

Lists: pljava-dev
From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] pljava.so wont compile
Date: 2013-01-11 19:40:13
Message-ID: 20130111204013.00e19939@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hello

With the hellblazer git repository code I finally got four .jar files
but now I wonder how to compile the shared library from the C sources.
None of the Makefiles seem to work and the pom.xml contains no reference
to a C compiler:

-=(~/workspace/pljava/lathspell-master/C)$ make
make[1]: Entering directory `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
make[1]: /srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile: No such file or directory
make[1]: *** No rule to make target `/srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile'. Stop.
make[1]: Leaving directory `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
make: *** [pljava_all] Error 2

-=(~/workspace/pljava/lathspell-master/C/pljava)$ make
find: `/pljava': No such file or directory
make: Nothing to be done for `checkjavahome'.

(I'm using gcc-4.7 and Oracle/OpenJDK-1.7.

bye,

-christian-


From: hal(dot)hildebrand at me(dot)com (Hal Hildebrand)
To:
Subject: [Pljava-dev] pljava.so wont compile
Date: 2013-01-12 03:11:52
Message-ID: A1ABD971-08B8-434F-92D6-4FD89C46E7E5@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Trie enough. This is work that has not been done. Apologies. :). Still a work in progress.

Sent from my Tricorder

On Jan 11, 2013, at 11:40 AM, Christian Hammers <ch at lathspell.de> wrote:

> Hello
>
> With the hellblazer git repository code I finally got four .jar files
> but now I wonder how to compile the shared library from the C sources.
> None of the Makefiles seem to work and the pom.xml contains no reference
> to a C compiler:
>
> -=(~/workspace/pljava/lathspell-master/C)$ make
> make[1]: Entering directory `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
> make[1]: /srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile: No such file or directory
> make[1]: *** No rule to make target `/srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile'. Stop.
> make[1]: Leaving directory `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
> make: *** [pljava_all] Error 2
>
> -=(~/workspace/pljava/lathspell-master/C/pljava)$ make
> find: `/pljava': No such file or directory
> make: Nothing to be done for `checkjavahome'.
>
> (I'm using gcc-4.7 and Oracle/OpenJDK-1.7.
>
> bye,
>
> -christian-
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev


From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] pljava.so wont compile - now it does! :)
Date: 2013-01-12 22:47:38
Message-ID: 20130112234738.03b606b1@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hello

Wow, I finally got it working. Took me only 2h :-)

I got a strange error message with the test suite though. Already tried to
replace the "UTC" with "GMT" but somehow it does not show any effect:

java -cp /usr/share/java/postgresql.jar:target/pljava-jdbc-0.0.1-SNAPSHOT.jar:target/pljava-examples-0.0.1-SNAPSHOT.jar:target/pljava-api-0.0.1-SNAPSHOT.jar:target/org.postgresql.pljava.test.jar org.postgresql.pljava.test.Tester -user postgres -password geheim -database pljava
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
*** testTimestamp()
Timestamp = 2013-01-12 23:44:07.336, Timestamptz = 2013-01-12 23:44:07.338
org.postgresql.util.PSQLException: ERROR: java.lang.SecurityException: read on /usr/share/javazi/UTC
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
at org.postgresql.pljava.test.Tester.testTimestamp(Tester.java:527)
at org.postgresql.pljava.test.Tester.testParameters(Tester.java:288)
at org.postgresql.pljava.test.Tester.main(Tester.java:227)

What are your plans on integrating javah and the C sources into maven?
Is it possible to tell maven to first compile the java stuff and then
generate C header files from two sub-projects before finally compiling
the C project?

bye,

-christian-

Am Fri, 11 Jan 2013 20:40:13 +0100
schrieb Christian Hammers <ch at lathspell.de>:

> Hello
>
> With the hellblazer git repository code I finally got four .jar files
> but now I wonder how to compile the shared library from the C sources.
> None of the Makefiles seem to work and the pom.xml contains no
> reference to a C compiler:
>
> -=(~/workspace/pljava/lathspell-master/C)$ make
> make[1]: Entering directory
> `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
> make[1]: /srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile:
> No such file or directory make[1]: *** No rule to make target
> `/srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile'.
> Stop. make[1]: Leaving directory
> `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
> make: *** [pljava_all] Error 2
>
> -=(~/workspace/pljava/lathspell-master/C/pljava)$ make
> find: `/pljava': No such file or directory
> make: Nothing to be done for `checkjavahome'.
>
> (I'm using gcc-4.7 and Oracle/OpenJDK-1.7.
>
> bye,
>
> -christian-
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev


From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] pljava.so wont compile - now it does! :)
Date: 2013-01-13 10:54:30
Message-ID: 50F29266.5070408@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

I found a fairly good article outlining a way to build a mix of Java and
C++ code with Maven. Perhaps this is the way to go?

http://www.humboldt.co.uk/2009/02/wrapping-a-native-library-with-maven.html

I'm not really a maven wizard myself so help on this topic is greatly
appreciated.

- thomas

On 2013-01-12 23:47, Christian Hammers wrote:
> Hello
>
> Wow, I finally got it working. Took me only 2h :-)
>
> I got a strange error message with the test suite though. Already tried to
> replace the "UTC" with "GMT" but somehow it does not show any effect:
>
> java -cp /usr/share/java/postgresql.jar:target/pljava-jdbc-0.0.1-SNAPSHOT.jar:target/pljava-examples-0.0.1-SNAPSHOT.jar:target/pljava-api-0.0.1-SNAPSHOT.jar:target/org.postgresql.pljava.test.jar org.postgresql.pljava.test.Tester -user postgres -password geheim -database pljava
> Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
> *** testTimestamp()
> Timestamp = 2013-01-12 23:44:07.336, Timestamptz = 2013-01-12 23:44:07.338
> org.postgresql.util.PSQLException: ERROR: java.lang.SecurityException: read on /usr/share/javazi/UTC
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
> at org.postgresql.pljava.test.Tester.testTimestamp(Tester.java:527)
> at org.postgresql.pljava.test.Tester.testParameters(Tester.java:288)
> at org.postgresql.pljava.test.Tester.main(Tester.java:227)
>
> What are your plans on integrating javah and the C sources into maven?
> Is it possible to tell maven to first compile the java stuff and then
> generate C header files from two sub-projects before finally compiling
> the C project?
>
> bye,
>
> -christian-
>
>
> Am Fri, 11 Jan 2013 20:40:13 +0100
> schrieb Christian Hammers <ch at lathspell.de>:
>
>> Hello
>>
>> With the hellblazer git repository code I finally got four .jar files
>> but now I wonder how to compile the shared library from the C sources.
>> None of the Makefiles seem to work and the pom.xml contains no
>> reference to a C compiler:
>>
>> -=(~/workspace/pljava/lathspell-master/C)$ make
>> make[1]: Entering directory
>> `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
>> make[1]: /srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile:
>> No such file or directory make[1]: *** No rule to make target
>> `/srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile'.
>> Stop. make[1]: Leaving directory
>> `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
>> make: *** [pljava_all] Error 2
>>
>> -=(~/workspace/pljava/lathspell-master/C/pljava)$ make
>> find: `/pljava': No such file or directory
>> make: Nothing to be done for `checkjavahome'.
>>
>> (I'm using gcc-4.7 and Oracle/OpenJDK-1.7.
>>
>> bye,
>>
>> -christian-
>> _______________________________________________
>> Pljava-dev mailing list
>> Pljava-dev at pgfoundry.org
>> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20130113/c4336b02/attachment-0001.html>


From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] pljava.so wont compile - now it does! :)
Date: 2013-01-13 10:58:58
Message-ID: 50F29372.7080808@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Then again, perhaps this one, using the maven-nar-plugin, is a better:
http://blog.bigpixel.ro/2012/07/building-cc-applications-with-maven/

- thomas

On 2013-01-13 11:54, Thomas Hallgren wrote:
> I found a fairly good article outlining a way to build a mix of Java
> and C++ code with Maven. Perhaps this is the way to go?
>
> http://www.humboldt.co.uk/2009/02/wrapping-a-native-library-with-maven.html
>
> I'm not really a maven wizard myself so help on this topic is greatly
> appreciated.
>
> - thomas
>
> On 2013-01-12 23:47, Christian Hammers wrote:
>> Hello
>>
>> Wow, I finally got it working. Took me only 2h :-)
>>
>> I got a strange error message with the test suite though. Already tried to
>> replace the "UTC" with "GMT" but somehow it does not show any effect:
>>
>> java -cp /usr/share/java/postgresql.jar:target/pljava-jdbc-0.0.1-SNAPSHOT.jar:target/pljava-examples-0.0.1-SNAPSHOT.jar:target/pljava-api-0.0.1-SNAPSHOT.jar:target/org.postgresql.pljava.test.jar org.postgresql.pljava.test.Tester -user postgres -password geheim -database pljava
>> Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
>> *** testTimestamp()
>> Timestamp = 2013-01-12 23:44:07.336, Timestamptz = 2013-01-12 23:44:07.338
>> org.postgresql.util.PSQLException: ERROR: java.lang.SecurityException: read on /usr/share/javazi/UTC
>> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
>> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
>> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
>> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
>> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
>> at org.postgresql.pljava.test.Tester.testTimestamp(Tester.java:527)
>> at org.postgresql.pljava.test.Tester.testParameters(Tester.java:288)
>> at org.postgresql.pljava.test.Tester.main(Tester.java:227)
>>
>> What are your plans on integrating javah and the C sources into maven?
>> Is it possible to tell maven to first compile the java stuff and then
>> generate C header files from two sub-projects before finally compiling
>> the C project?
>>
>> bye,
>>
>> -christian-
>>
>>
>> Am Fri, 11 Jan 2013 20:40:13 +0100
>> schrieb Christian Hammers<ch at lathspell.de>:
>>
>>> Hello
>>>
>>> With the hellblazer git repository code I finally got four .jar files
>>> but now I wonder how to compile the shared library from the C sources.
>>> None of the Makefiles seem to work and the pom.xml contains no
>>> reference to a C compiler:
>>>
>>> -=(~/workspace/pljava/lathspell-master/C)$ make
>>> make[1]: Entering directory
>>> `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
>>> make[1]: /srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile:
>>> No such file or directory make[1]: *** No rule to make target
>>> `/srv/home/james/workspace/pljava/lathspell-master/C/src/java/pljava/Makefile'.
>>> Stop. make[1]: Leaving directory
>>> `/srv/home/james/workspace/pljava/lathspell-master/C/build/classes/pljava'
>>> make: *** [pljava_all] Error 2
>>>
>>> -=(~/workspace/pljava/lathspell-master/C/pljava)$ make
>>> find: `/pljava': No such file or directory
>>> make: Nothing to be done for `checkjavahome'.
>>>
>>> (I'm using gcc-4.7 and Oracle/OpenJDK-1.7.
>>>
>>> bye,
>>>
>>> -christian-
>>> _______________________________________________
>>> Pljava-dev mailing list
>>> Pljava-dev at pgfoundry.org
>>> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
>> _______________________________________________
>> Pljava-dev mailing list
>> Pljava-dev at pgfoundry.org
>> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20130113/f12e5915/attachment.html>


From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-06 01:31:02
Message-ID: 20130206023102.1b94cc01@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hello

I played around with the maven-nar-plugin that was recommended on this
list. The below pom.xml does produce .h files from the java classes and
also compiles the C files. What's missing though is a way to get a
.h from "java.sql.Types" as this class is in the JRE's rt.jar and not
in the specified <classDirectory>. Any ideas?

bye,

-christian-

P.S.: Beware the hardcoded paths and Postgres version numbers. Don't
know yet how to integrate pg_config in maven.

P.P.S.: Directoy layout for the C files is:

./src/main
./src/main/c
./src/main/c/type
./src/main/include
./src/main/include/pljava
./src/main/include/pljava/type

<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>org.postgresql</groupId>
<artifactId>pljava.app</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>pljava-so</artifactId>
<name>pl/java server side library</name>
<description>Generates the pljava.so library which gets loaded by
the PostgreSQL server.</description> <packaging>nar</packaging>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-nar-plugin</artifactId>
<version>2.1-SNAPSHOT</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-nar-plugin</artifactId>
<extensions>true</extensions>

<configuration>

<javah>
<classPaths>
<classPath>/srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/</classPath>
<classPath>/srv/home/james/workspace/pljava/lathspell-master/pljava-api/target/classes/</classPath>
</classPaths>
<classDirectory>/srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/</classDirectory>
<includes>
<include>org/postgresql/**/*.class</include>
<include>java/sql/Types.class</include>
</includes>
</javah>

<libraries>
<library>
<type>shared</type>
</library>
</libraries>

<c>
<defines>
<define>PKGLIBDIR="target/lib/"</define>
<define>PGSQL_MAJOR_VER=9</define>
<define>PGSQL_MINOR_VER=2</define>
<define>PGSQL_PATCH_VER=0</define>
</defines>

<includePaths>
<includePath>/usr/include/postgresql</includePath>
<includePath>/usr/include/postgresql/9.2/server/</includePath>
<includePath>src/main/include/</includePath>
<includePath>target/nar/javah-include/</includePath>
</includePaths>
</c>
</configuration>
</plugin>
</plugins>

</build>
</project>


From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-06 07:53:11
Message-ID: 51120BE7.6020109@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev


On 2013-02-06 02:31, Christian Hammers wrote:
> Hello
>
> I played around with the maven-nar-plugin that was recommended on this
> list. The below pom.xml does produce .h files from the java classes and
> also compiles the C files. What's missing though is a way to get a
> .h from "java.sql.Types" as this class is in the JRE's rt.jar and not
> in the specified <classDirectory>. Any ideas?
Not sure why that matters. Executing:

javah java.sql.Types

without giving it a classpath does produce the java_sql_Types.h file
without problems. Is the current javah configuration deliberately
stripping off the java runtime?

- thomas

> bye,
>
> -christian-
>
> P.S.: Beware the hardcoded paths and Postgres version numbers. Don't
> know yet how to integrate pg_config in maven.
>
> P.P.S.: Directoy layout for the C files is:
>
> ./src/main
> ./src/main/c
> ./src/main/c/type
> ./src/main/include
> ./src/main/include/pljava
> ./src/main/include/pljava/type
>
>
> <project
> xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion> <parent>
> <groupId>org.postgresql</groupId>
> <artifactId>pljava.app</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> </parent>
> <artifactId>pljava-so</artifactId>
> <name>pl/java server side library</name>
> <description>Generates the pljava.so library which gets loaded by
> the PostgreSQL server.</description> <packaging>nar</packaging>
>
> <build>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-nar-plugin</artifactId>
> <version>2.1-SNAPSHOT</version>
> </plugin>
> </plugins>
> </pluginManagement>
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-nar-plugin</artifactId>
> <extensions>true</extensions>
>
> <configuration>
>
> <javah>
> <classPaths>
> <classPath>/srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/</classPath>
> <classPath>/srv/home/james/workspace/pljava/lathspell-master/pljava-api/target/classes/</classPath>
> </classPaths>
> <classDirectory>/srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/</classDirectory>
> <includes>
> <include>org/postgresql/**/*.class</include>
> <include>java/sql/Types.class</include>
> </includes>
> </javah>
>
> <libraries>
> <library>
> <type>shared</type>
> </library>
> </libraries>
>
> <c>
> <defines>
> <define>PKGLIBDIR="target/lib/"</define>
> <define>PGSQL_MAJOR_VER=9</define>
> <define>PGSQL_MINOR_VER=2</define>
> <define>PGSQL_PATCH_VER=0</define>
> </defines>
>
> <includePaths>
> <includePath>/usr/include/postgresql</includePath>
> <includePath>/usr/include/postgresql/9.2/server/</includePath>
> <includePath>src/main/include/</includePath>
> <includePath>target/nar/javah-include/</includePath>
> </includePaths>
> </c>
> </configuration>
> </plugin>
> </plugins>
>
> </build>
> </project>
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev


From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-07 16:06:45
Message-ID: 20130207170645.080294f4@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev


Am Wed, 06 Feb 2013 08:53:11 +0100
schrieb Thomas Hallgren <thomas at tada.se>:

>
> On 2013-02-06 02:31, Christian Hammers wrote:
> > Hello
> >
> > I played around with the maven-nar-plugin that was recommended on
> > this list. The below pom.xml does produce .h files from the java
> > classes and also compiles the C files. What's missing though is a
> > way to get a .h from "java.sql.Types" as this class is in the JRE's
> > rt.jar and not in the specified <classDirectory>. Any ideas?
> Not sure why that matters. Executing:
>
> javah java.sql.Types
>
> without giving it a classpath does produce the java_sql_Types.h file
> without problems. Is the current javah configuration deliberately
> stripping off the java runtime?
>
> - thomas

The javah target of the maven-nar-plugin only scans a single
<classDirectory> directory for actual *.class files, reads their
method signatures and only adds the class if there is at least one
"native" method. The <includes> parameter does not help here.

I added a <extraClasses> parameter to it that just adds its values
to the end of the javah call and with that it would work.
My pull requests for the maven-nar-plugin are here:
* https://github.com/maven-nar/maven-nar-plugin/pull/22
* https://github.com/maven-nar/maven-nar-plugin/pull/21

bye,

-christian-


From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-07 22:31:58
Message-ID: 51142B5E.2080906@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

On 2013-02-07 17:06, Christian Hammers wrote:
> Am Wed, 06 Feb 2013 08:53:11 +0100
> schrieb Thomas Hallgren <thomas at tada.se>:
>
>> On 2013-02-06 02:31, Christian Hammers wrote:
>>> Hello
>>>
>>> I played around with the maven-nar-plugin that was recommended on
>>> this list. The below pom.xml does produce .h files from the java
>>> classes and also compiles the C files. What's missing though is a
>>> way to get a .h from "java.sql.Types" as this class is in the JRE's
>>> rt.jar and not in the specified <classDirectory>. Any ideas?
>> Not sure why that matters. Executing:
>>
>> javah java.sql.Types
>>
>> without giving it a classpath does produce the java_sql_Types.h file
>> without problems. Is the current javah configuration deliberately
>> stripping off the java runtime?
>>
>> - thomas
> The javah target of the maven-nar-plugin only scans a single
> <classDirectory> directory for actual *.class files, reads their
> method signatures and only adds the class if there is at least one
> "native" method. The <includes> parameter does not help here.
>
> I added a <extraClasses> parameter to it that just adds its values
> to the end of the javah call and with that it would work.
> My pull requests for the maven-nar-plugin are here:
> * https://github.com/maven-nar/maven-nar-plugin/pull/22
> * https://github.com/maven-nar/maven-nar-plugin/pull/21
>
> bye,
Cool. Let's hope you get those accepted. And thanks for your effort of
making this happen.

- thomas


From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-08 00:59:20
Message-ID: 20130208015920.58709bae@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hello

My github fork https://github.com/lathspell/pljava now contains a
directory pljava-so with a pom.xml file that is able to produce a
pljava.so library which works with Postgres 9.2.

Things that are yet to do:
* the linker options slightly differ, e.g. there is a -shared-libgcc
option that maven adds. Don't know if it hurts.
* the Postgres version is read from a build.properties file. Maybe
we need an ant task that just calls pg_config and writes it?
Maybe that properties file would be useful on top-level so that
e.g. the PGSQL_MAJOR_VERSION accessible by all maven modules?
* The pljava.so is not yet automatically installed
into /usr/lib/postgres/9.2/lib/ like "make install" would do.
Probably another ant task needed here?

bye,

-christian-


From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-11 02:41:02
Message-ID: 20130211034102.740dcda8@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hello

My fork (see last mail) has been improved and now calls an ant task that
converts the pg_config output to a properties file which gets then read
by the Maven pom.xml. So no hardcoded version numbers anymore.

"sudo mvn deploy" inside the pljava-so/ directoy now copies the
generated library to /usr/lib/postgres/.../pljava.so.

bye,

-christian-


From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-11 05:52:58
Message-ID: 5118873A.1090802@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi Christian,

Please submit a pull-request whenever you're happy with it.

- thomas

On 2013-02-11 03:41, Christian Hammers wrote:
> Hello
>
> My fork (see last mail) has been improved and now calls an ant task that
> converts the pg_config output to a properties file which gets then read
> by the Maven pom.xml. So no hardcoded version numbers anymore.
>
> "sudo mvn deploy" inside the pljava-so/ directoy now copies the
> generated library to /usr/lib/postgres/.../pljava.so.
>
> bye,
>
> -christian-
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev


From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-11 14:46:34
Message-ID: 20130211154634.0b906b8d@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi

I just did so!

I noticed tough that your repository still has a module "pljava" with
uncompilable Java sources. It seems that I based my repo on the
Hellblazer fork. It's propably better if you go through his commits and
apply them one by one as they contain lots of code changes.

bye,

-christian-

Am Mon, 11 Feb 2013 06:52:58 +0100
schrieb Thomas Hallgren <thomas at tada.se>:

> Hi Christian,
>
> Please submit a pull-request whenever you're happy with it.
>
> - thomas
>
> On 2013-02-11 03:41, Christian Hammers wrote:
> > Hello
> >
> > My fork (see last mail) has been improved and now calls an ant task
> > that converts the pg_config output to a properties file which gets
> > then read by the Maven pom.xml. So no hardcoded version numbers
> > anymore.
> >
> > "sudo mvn deploy" inside the pljava-so/ directoy now copies the
> > generated library to /usr/lib/postgres/.../pljava.so.
> >
> > bye,
> >
> > -christian-
> >
> > _______________________________________________
> > Pljava-dev mailing list
> > Pljava-dev at pgfoundry.org
> > http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev


From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-11 17:34:03
Message-ID: 51192B8B.6020305@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

On 2013-02-11 15:46, Christian Hammers wrote:
> Hi
>
> I just did so!
>
> I noticed tough that your repository still has a module "pljava" with
> uncompilable Java sources. It seems that I based my repo on the
> Hellblazer fork. It's propably better if you go through his commits and
> apply them one by one as they contain lots of code changes.
Which of Hellblazers forks did you use? I received (and accepted) a
pull-request from Hellblazer about a month ago.

- thomas


From: hal(dot)hildebrand at me(dot)com (Hal Hildebrand)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-11 18:08:01
Message-ID: 2DCCAC9E-2F7B-4F09-A268-7C334CED3378@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

I have two repos. The first was my original fork. The one I'm working from is a fork from the official pljava github repo. My fork is https://github.com/Hellblazer/pljava-1

Sent from my Tricorder

On Feb 11, 2013, at 9:34 AM, Thomas Hallgren <thomas at tada.se> wrote:

> On 2013-02-11 15:46, Christian Hammers wrote:
>> Hi
>>
>> I just did so!
>>
>> I noticed tough that your repository still has a module "pljava" with
>> uncompilable Java sources. It seems that I based my repo on the
>> Hellblazer fork. It's propably better if you go through his commits and
>> apply them one by one as they contain lots of code changes.
> Which of Hellblazers forks did you use? I received (and accepted) a pull-request from Hellblazer about a month ago.
>
> - thomas
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20130211/dfbe0ee1/attachment.html>