Subject: [Pljava-dev] building on centos 6.8

From: John R Pierce <[email-masked]>
Date: Wed, 22 Feb 2017 12:01:56 -0800

trying to build pljava from the 1.5.0 tarball, on centos 6.latest 64bit, 
with postgres 9.5.5 from the yum.postgresql.org repository...

I have postgresql95-devel and openjdk 1.8.0 devel packages installed, 
along with all the usual g++ etc stuff.

path is set to...

/usr/pgsql-9.5/bin:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-1.b15.el6_8.x86_64/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin

$ java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-b15)
OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)

$ javac -version
javac 1.8.0_111

$ psql -c "select version()"
version
----------------------------------------------------------------------------------------------------------
  PostgreSQL 9.5.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 
20120313 (Red Hat 4.4.7-17), 64-bit
(1 row)

mvn clean install   is giving me (after much other output)...

[INFO]
Starting Core 31 with 1 source files...
[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/utils/portal.h:50,
[ERROR]                  from 
/usr/pgsql-9.5/include/server/executor/spi.h:18,
[ERROR]                  from 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/Exception.c:10:
[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: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_sub_fetch_u32_impl’:
[WARNING] /usr/pgsql-9.5/include/server/port/atomics/generic.h:256: 
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:381: 
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:390: 
warning: conversion to ‘long unsigned int’ from ‘int64’ may change the 
sign of the result
[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/utils/portal.h:50,
[ERROR]                  from 
/usr/pgsql-9.5/include/server/executor/spi.h:18,
[ERROR]                  from 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Relation.c:10:
[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: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_sub_fetch_u32_impl’:
[WARNING] /usr/pgsql-9.5/include/server/port/atomics/generic.h:256: 
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:381: 
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:390: 
warning: conversion to ‘long unsigned int’ from ‘int64’ may change the 
sign of the result
[ERROR] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c: In 
function ‘createArrayType’:
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:31: 
warning: conversion to ‘size_t’ from ‘jsize’ may change the sign of the 
result
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:37: 
warning: conversion to ‘long unsigned int’ from ‘int’ may change the 
sign of the result
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:58: 
warning: conversion to ‘long unsigned int’ from ‘int’ may change the 
sign of the result
[ERROR] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c: In 
function ‘_Array_coerceDatum’:
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:73: 
warning: conversion to ‘long unsigned int’ from ‘int’ may change the 
sign of the result
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:73: 
warning: conversion to ‘long unsigned int’ from ‘int32’ may change the 
sign of the result
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:74: 
warning: conversion to ‘long unsigned int’ from ‘int’ may change the 
sign of the result
[ERROR] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c: In 
function ‘_Array_coerceObject’:
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:108: 
warning: conversion to ‘long unsigned int’ from ‘int’ may change the 
sign of the result
[WARNING] 
/var/lib/pgsql/pljava/pljava-1_5_0/pljava-so/src/main/c/type/Array.c:108: 
warning: conversion to ‘long unsigned int’ from ‘int’ may change the 
sign of the result

(lots more similar errors, then the summary says...)

[INFO] 
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PostgreSQL PL/Java ................................. SUCCESS [  
0.813 s]
[INFO] PL/Java API ........................................ SUCCESS [  
1.714 s]
[INFO] PL/Java backend Java code .......................... SUCCESS [  
1.641 s]
[INFO] PL/Java backend native code ........................ FAILURE [ 
10.146 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
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 14.963 s
[INFO] Finished at: 2017-02-22T11:54:31-08:00
[INFO] Final Memory: 37M/2137M
[INFO] 
------------------------------------------------------------------------
[ERROR] Failed to execute goal 
com.github.maven-nar:nar-maven-plugin:3.2.3:nar-compile 
(default-nar-compile) on project pljava-so: NAR: Compile failed: gcc 
failed with return code 1 -> [Help 1]

-- 
john r pierce, recycling bits in santa cruz

_______________________________________________
Pljava-dev mailing list
[email-masked]
http://lists.pgfoundry.org/mailman/listinfo/pljava-dev

---

From: John R Pierce <[email-masked]>
Date: Wed, 22 Feb 2017 12:52:07 -0800

On 2/22/2017 12:01 PM, John R Pierce wrote:
>
> trying to build pljava from the 1.5.0 tarball, on centos 6.latest 
> 64bit, with postgres 9.5.5 from the yum.postgresql.org repository...
>
...

just in case, I ran yum update to get all the latest versions of 
everything, same errors.

$ g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
$ javac -version
javac 1.8.0_121
$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
2015-11-10T08:41:47-08:00)
Maven home: /usr/share/apache-maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el6_8.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-642.13.1.el6.x86_64", arch: "amd64", 
family: "unix"

---

From: John R Pierce <[email-masked]>
Date: Wed, 22 Feb 2017 20:57:59 -0800

> 2015-11-10T08:41:47-08:00)

oh, and postgresql 9.5.6 now.   before was 9.5.5.

$ psql -c "select version()"
.....
  PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 
20120313 (Red Hat 4.4.7-17), 64-bit

---

From: Chapman Flack <[email-masked]>
Date: Thu, 23 Feb 2017 09:00:14 -0500

On 02/22/17 15:01, John R Pierce wrote:
> ...
> [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: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_sub_fetch_u32_impl’:
> [WARNING] /usr/pgsql-9.5/include/server/port/atomics/generic.h:256: warning:
> conversion to ‘uint32’ from ‘int32’ may change the sign of the result
> ...

Hi,

Only time for a quick comment at the moment, but all of the messages
you've pasted here are the aggressive sign-conversion warnings that
gcc spits out (because the Maven nar plugin enables such aggressive
warnings by default).  None of those will be the reason your build
broke.

Because you got a FAILED in the summary at the end (it would have
been SUCCESS, if nothing but sign conversion warnings), there WILL
be a message, buried somewhere in that flood that you got, explaining
why the build broke, but it's not in the excerpt you copied here.
If you can get all the messages in a file and search them, you're
looking for one that probably has the word 'fatal'.

Troubleshooting is easier if you run mvn with the -Pwnosign option
to suppress the flood of sign conversion warnings so you can see
stuff that matters. That and other suggestions that may be helpful
are here:

http://tada.github.io/pljava/build/build.html#Troubleshooting_the_build

Hope this helps,
-Chap

... a couple summers ago, I focused for a few weeks on just rearranging
PL/Java code to make warnings go away, but I gave up on the sign-conversion
ones because many of them were consequences of how things are defined
in PostgreSQL's own .h files, which we're powerless to change.
_______________________________________________
Pljava-dev mailing list
[email-masked]
http://lists.pgfoundry.org/mailman/listinfo/pljava-dev

---

From: John R Pierce <[email-masked]>
Date: Thu, 23 Feb 2017 11:21:13 -0800

> http://tada.github.io/pljava/build/build.html#Troubleshooting_the_build

ahhh, the [ERROR] prefix through me, I thought those all looked like 
warnings...

I was missing openssl-devel !   lost in the maze of those warnings...

---

From: Chapman Flack <[email-masked]>
Date: Thu, 23 Feb 2017 15:22:22 -0500

> I was missing openssl-devel !   lost in the maze of those warnings...

You're not the first. :) Glad it worked.

-Chap