Subject: [Pljava-dev] problem building against 9.5

From: akshunj <[email-masked]>
Date: Tue, 29 Dec 2015 00:34:14 -0700 (MST)

Hi,

I am trying to build against 9.5, but am running into some problems below.
Any ideas? I am able to build against 9.4 without issue. 

Thanks.

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5;
2015-11-10T11:41:47-05:00)
Maven home: /usr/local/maven
Java version: 1.7.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.el6.x86_64", arch: "amd64", family:
"unix"

[WARNING]
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/c/XactListener.c:30:
warning: enumeration value ‘XACT_EVENT_PRE_PREPARE’ not handled in switch
[ERROR] In file included from
/usr/pgsql-9.5/include/server/port/atomics.h:119,
[ERROR]                  from
/usr/pgsql-9.5/include/server/storage/lwlock.h:19,
[ERROR]                  from
/usr/pgsql-9.5/include/server/storage/lock.h:18,
[ERROR]                  from
/usr/pgsql-9.5/include/server/access/genam.h:20,
[ERROR]                  from
/usr/pgsql-9.5/include/server/nodes/execnodes.h:17,
[ERROR]                  from
/usr/pgsql-9.5/include/server/executor/execdesc.h:18,
[ERROR]                  from
/usr/pgsql-9.5/include/server/executor/executor.h:17,
[ERROR]                  from /usr/pgsql-9.5/include/server/funcapi.h:21,
[ERROR]                  from
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/include/pljava/backports.h:46,
[ERROR]                  from
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/c/backports.c:9:
[ERROR] /usr/pgsql-9.5/include/server/port/atomics/generic.h: In function
‘pg_atomic_add_fetch_u32_impl’:
[WARNING] /usr/pgsql-9.5/include/server/port/atomics/generic.h:238: warning:
conversion to ‘uint32’ from ‘int32’ may change the sign of the result
[ERROR] /usr/pgsql-9.5/include/server/port/atomics/generic.h: In function
‘pg_atomic_sub_fetch_u32_impl’:
[WARNING] /usr/pgsql-9.5/include/server/port/atomics/generic.h:247: warning:
conversion to ‘uint32’ from ‘int32’ may change the sign of the result
[ERROR] /usr/pgsql-9.5/include/server/port/atomics/generic.h: In function
‘pg_atomic_add_fetch_u64_impl’:
[WARNING] /usr/pgsql-9.5/include/server/port/atomics/generic.h:372: warning:
conversion to ‘long unsigned int’ from ‘int64’ may change the sign of the
result
[ERROR] /usr/pgsql-9.5/include/server/port/atomics/generic.h: In function
‘pg_atomic_sub_fetch_u64_impl’:
[WARNING] /usr/pgsql-9.5/include/server/port/atomics/generic.h:381: warning:
conversion to ‘long unsigned int’ from ‘int64’ may change the sign of the
result
[ERROR]
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/c/type/byte_array.c:
In function ‘_byte_array_coerceDatum’:
[WARNING]
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/c/type/byte_array.c:24:
warning: conversion to ‘jsize’ from ‘uint32’ may change the sign of the
result
[ERROR]
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/c/type/byte_array.c:
In function ‘_byte_array_coerceObject’:
[WARNING]
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/c/type/byte_array.c:42:
warning: conversion to ‘Size’ from ‘int32’ may change the sign of the result
[WARNING]
/usr/local/maven-nar-plugin/pljava5/pljava/pljava-so/src/main/c/type/byte_array.c:57:
warning: conversion to ‘Size’ from ‘int32’ may change the sign of the result
[INFO] Core 3 interrupted
[INFO] Core 3 interrupted
[INFO] 52 files were compiled.
[INFO] 52 files were compiled.
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PostgreSQL PL/Java ................................. SUCCESS [  1.149
s]
[INFO] PL/Java API ........................................ SUCCESS [  1.991
s]
[INFO] PL/Java backend Java code .......................... SUCCESS [  2.256
s]
[INFO] PL/Java backend native code ........................ FAILURE [ 15.875
s]
[INFO] PL/Java Deploy ..................................... SKIPPED
[INFO] PL/Java Ant tasks .................................. SKIPPED
[INFO] PL/Java examples ................................... SKIPPED
[INFO] PL/Java packaging .................................. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE

--
View this message in context: http://postgresql.nabble.com/problem-building-against-9-5-tp5879391.html
Sent from the PL/Java mailing list archive at Nabble.com.
_______________________________________________
Pljava-dev mailing list
[email-masked]
http://lists.pgfoundry.org/mailman/listinfo/pljava-dev

---

From: Chapman Flack <[email-masked]>
Date: Tue, 29 Dec 2015 13:11:01 -0500

Hi,

I'm assuming your compiler is gcc, but I can't tell the version from
the information you've attached. It's puzzling that the build aborted,
because the only actual issues I see reported are warnings (all the
[ERROR] lines are just giving location for the warnings, which is a
bit confusing, but seems to be how gcc does things).

Unless I've gone crosseyed and missed an actual error in there.

I see the XACT_EVENT_PRE_PREPARE warning, which is expected, and
nothing else except sign-conversion warnings, which are a nuisance
(fixing them mostly would have to be done in the PostgreSQL sources).
They do not ordinarily cause gcc to abort. Do you have any compiler
environment variables or the like in your build environment that
would be telling gcc to treat warnings as errors?

Have you tried  mvn -Pwnosign -Dnar.cores=1  clean install

?

Regards,
-Chap

---

From: Chapman Flack <[email-masked]>
Date: Wed, 30 Dec 2015 11:55:53 -0500

Hi,

Is there any chance what you included below was just a copy/paste of
part of the output, not including all the errors/warnings?

Thanks,
-Chap

---

From: akshunj <[email-masked]>
Date: Thu, 31 Dec 2015 09:58:31 -0700 (MST)

Hi Chap,

Thanks for your response. Yes, I am using gcc, version info is pasted below.
I do not have any flags set in my compiler and this is the same system I
used to build against 9.4 without issue. 

To answer your second post, yes that was just a snippet of the output, it
seemed to just be repeat of the conversion warnings, but I will post the
full output in a separate post. It is rather lengthy and I don't see a way
to attach here.

Thanks.

gcc -v

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)

--
View this message in context: http://postgresql.nabble.com/problem-building-against-9-5-tp5879391p5879706.html

---

From: akshunj <[email-masked]>
Date: Thu, 31 Dec 2015 10:08:08 -0700 (MST)

Chap,

Thanks for your help. I tried the mvn option you mentioned and noticed there
was an error for a missing file/directory. Seems I was missing the openssl
packages. Is this a new dependency for 9.5? 9.3 and 9.4 built fine without
it.

Thanks again and Happy New Year.

--
View this message in context: http://postgresql.nabble.com/problem-building-against-9-5-tp5879391p5879708.html

---

From: Chapman Flack <[email-masked]>
Date: Thu, 31 Dec 2015 12:19:40 -0500

> packages. Is this a new dependency for 9.5? 9.3 and 9.4 built fine without

Hmm ... Ken Olson has reported running into that also, but with earlier
PostgreSQL versions ... also other details different, platform was Windows,
PostgreSQL came from a distribution built by EnterpriseDB.

It might not be the PostgreSQL version per se, but more to do with whether
the distribution was built with SSL enabled, and whether openssl headers
were supplied with it.

Glad you found the problem!

-Chap