You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openssl/ssl.h needed on osx el-capitan (latest 10.11.3)/postgres 9.5 #94
Follow the suggestion from issue 63 (tried all branches same issue) - I believe that I could build it with Issue 63 branch with postgres 9.4.5 but unfortunately I upgraded to postgres 9.5 no data for that scenario with postgres 9.4.5.
cd pljava-so
mvn -Dnar.cores=1 -Pwnosign -X clean comple>compiledebuglogs
changed the title [-]does not compile with osx el-capitan (latest 10.11.3)/postgres 9.5[/-][+]openssl/ssl.h missing on osx el-capitan (latest 10.11.3)/postgres 9.5[/+]on Feb 8, 2016
changed the title [-]openssl/ssl.h missing on osx el-capitan (latest 10.11.3)/postgres 9.5[/-][+]openssl/ssl.h needed on osx el-capitan (latest 10.11.3)/postgres 9.5[/+]on Feb 8, 2016
There were two things here. First, the -Dwnosign profile seems to have no effect on this platform, as the log file you submitted has very many sign-conversion warnings, which that profile is supposed to suppress. Looking at the gcc command line in the log, the nar-maven-plugin did include the -Wno-sign-conversion option, but put it first on the line, and then all the options turning the warnings back on after it. That is harmless but annoying; of course it makes finding the real problem in the log file difficult, because so many useless sign-conversion warnings are around it. Unfortunately, I don't think that can be easily improved on PL/Java's end; the nar-maven-plugin maintainers could fix it more easily.
The real problem is on lines 3105 to 3107 of the log file:
[ERROR] /usr/local/Cellar/postgresql/9.5.0/include/server/libpq/libpq-be.h:25:10: fatal error: 'openssl/ssl.h' file not found
[ERROR] #include <openssl/ssl.h>
[ERROR] ^
Also annoying, also not fixable here, it just has to be added to the build requirements in the OS X build docs. I will update that page.
I see Cellar in your PostgreSQL path; does that mean you used Homebrew to install PostgreSQL itself? According to the Braumeister, that should have installed the Homebrew OpenSSL also. Perhaps you can check?
I saw that you tested many different git branches. That must have been some work. It is probably easiest to test from 1.5.0-BETA1 for the moment, since that's the current candidate for eventual release.
Thanks! This make sense! Yes I did use Homebrew to install postgres. Now when I tried to update the openssl again. The Mac OS give the following message which is very promising:
brew install openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2f.el_capitan.b
######################################################################## 100.0%
==> Pouring openssl-1.0.2f.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
I have checked the pg_config log, LDFLAGS is already there. How do I add
-I/usr/local/opt/openssl/include to CPPFLAGS? I will give it a try once I got the answer for that.
Strange ... when I look at the CPPFLAGS line in your pg_config output, it does not look like the line in the brew formula. That line looks like it would contain the openssl reference. I wonder if there is an updated PostgreSQL bottle?
That might not help anyway ... for now, you may need to edit pljava-so/pom.xml and find the <c> compiler <includePaths> section and add another <includePath> for the OpenSSL header. :(
I am getting this with the famous Mac popup saying the program can only run the old Java 1.6 runtime. I have no java 1.6 running at all, everything is the latest java 1.8.
load 'libpljava-so-1.5.0-BETA1.bundle';
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
Unfortunately no ideas come to mind about that popup. I have no Mac here to test with, and in earlier testing on OS X, the direct naming of the libjvm.dylib in pljava.libjvm_location eliminated any such issue.
I am not sure whether this means Apple has changed something to make it worse, or something is peculiar about the setup of your Mac. You might supply a screenshot of the exact popup; this issue is hard to search for because the web is full of various partially related threads about Java on OS X and many of them are probably not relevant here, so it will help to be as specific as possible. But please do start a new issue; this isn't about openssl.
One thought does occur to me. You mentioned at the top of this report that you had built from a whole bunch of different git branches.
It may be very helpful if you just erase all of that, make sure none of it is left installed, and do a clean build of exactly the 1.5.0-BETA1 release from exactly here (after adding the one includePath in pljava-so/pom.xml for your openSSL headers of course, but no other change).
That will not include any of a few changes committed since 1.5.0-BETA1, but that should not cause a problem, and then we will know just what was built.
In general, there are only two ways you would want to obtain and build the source: if you want to live on the bleeding edge and participate in development, then check out the source from master (unless you are working on a development branch of your own, or collaborating on a different branch with another developer); otherwise, for a stable and repeatable build of the software, it is better to build from the tagged release.
Activity
[-]does not compile with osx el-capitan (latest 10.11.3)/postgres 9.5[/-][+]openssl/ssl.h missing on osx el-capitan (latest 10.11.3)/postgres 9.5[/+][-]openssl/ssl.h missing on osx el-capitan (latest 10.11.3)/postgres 9.5[/-][+]openssl/ssl.h needed on osx el-capitan (latest 10.11.3)/postgres 9.5[/+]jcflack commentedon Feb 8, 2016
Hi,
There were two things here. First, the
-Dwnosignprofile seems to have no effect on this platform, as the log file you submitted has very many sign-conversion warnings, which that profile is supposed to suppress. Looking at thegcccommand line in the log, thenar-maven-plugindid include the-Wno-sign-conversionoption, but put it first on the line, and then all the options turning the warnings back on after it. That is harmless but annoying; of course it makes finding the real problem in the log file difficult, because so many useless sign-conversion warnings are around it. Unfortunately, I don't think that can be easily improved on PL/Java's end; thenar-maven-pluginmaintainers could fix it more easily.The real problem is on lines 3105 to 3107 of the log file:
The cause seems to be Apple shipping El Capitan without the OpenSSL headers. In that message, suggested resolutions are to build OpenSSL locally, or install it from Homebrew or MacPorts.
Also annoying, also not fixable here, it just has to be added to the build requirements in the OS X build docs. I will update that page.
I see
Cellarin your PostgreSQL path; does that mean you used Homebrew to install PostgreSQL itself? According to the Braumeister, that should have installed the Homebrew OpenSSL also. Perhaps you can check?I saw that you tested many different git branches. That must have been some work. It is probably easiest to test from
1.5.0-BETA1for the moment, since that's the current candidate for eventual release.kkzz8888 commentedon Feb 8, 2016
Thanks! This make sense! Yes I did use Homebrew to install postgres. Now when I tried to update the openssl again. The Mac OS give the following message which is very promising:
brew install openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2f.el_capitan.b
######################################################################## 100.0%
==> Pouring openssl-1.0.2f.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2f: 466 files, 11.9M
I have checked the pg_config log, LDFLAGS is already there. How do I add
-I/usr/local/opt/openssl/include to CPPFLAGS? I will give it a try once I got the answer for that.
jcflack commentedon Feb 9, 2016
Strange ... when I look at the
CPPFLAGSline in yourpg_configoutput, it does not look like the line in the brew formula. That line looks like it would contain theopensslreference. I wonder if there is an updated PostgreSQL bottle?jcflack commentedon Feb 9, 2016
That might not help anyway ... for now, you may need to edit
pljava-so/pom.xmland find the<c>compiler<includePaths>section and add another<includePath>for the OpenSSL header. :(kkzz8888 commentedon Feb 9, 2016
thanks a lot! That made the build successful. Will continue the rest of installation of pljava.
kkzz8888 commentedon Feb 9, 2016
I know this is a new issue, but I can use some help:
After setting pljava.libjvm_location and pljava.classpath (in postgresql.conf),
pljava.libjvm_location='/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/server/libjvm.dylib'
pljava.classpath='/usr/local/share/postgresql/pljava/pljava-1.5.0-BETA1.jar'
I am getting this with the famous Mac popup saying the program can only run the old Java 1.6 runtime. I have no java 1.6 running at all, everything is the latest java 1.8.
load 'libpljava-so-1.5.0-BETA1.bundle';
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
jcflack commentedon Feb 9, 2016
Unfortunately no ideas come to mind about that popup. I have no Mac here to test with, and in earlier testing on OS X, the direct naming of the
libjvm.dylibinpljava.libjvm_locationeliminated any such issue.I am not sure whether this means Apple has changed something to make it worse, or something is peculiar about the setup of your Mac. You might supply a screenshot of the exact popup; this issue is hard to search for because the web is full of various partially related threads about Java on OS X and many of them are probably not relevant here, so it will help to be as specific as possible. But please do start a new issue; this isn't about openssl.
jcflack commentedon Feb 9, 2016
One thought does occur to me. You mentioned at the top of this report that you had built from a whole bunch of different git branches.
It may be very helpful if you just erase all of that, make sure none of it is left installed, and do a clean build of exactly the
1.5.0-BETA1release from exactly here (after adding the oneincludePathinpljava-so/pom.xmlfor your openSSL headers of course, but no other change).That will not include any of a few changes committed since
1.5.0-BETA1, but that should not cause a problem, and then we will know just what was built.In general, there are only two ways you would want to obtain and build the source: if you want to live on the bleeding edge and participate in development, then check out the source from
master(unless you are working on a development branch of your own, or collaborating on a different branch with another developer); otherwise, for a stable and repeatable build of the software, it is better to build from the tagged release.kkzz8888 commentedon Feb 9, 2016
Thanks, already did clean build on the branch. Here is the screenshot captured.

jcflack commentedon Feb 9, 2016
Please start a new issue, and include the output of
jcflack commentedon Feb 23, 2016
Documented in 1.5.0-BETA2.
jcflack commentedon Mar 30, 2016
Documented in 1.5.0 release.