Git Product home page Git Product logo

Comments (12)

jcflack avatar jcflack commented on July 19, 2024

Hi,

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]          ^

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 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.

from pljava.

kkzz8888 avatar kkzz8888 commented on July 19, 2024

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:

LDFLAGS:  -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include

==> 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.

from pljava.

jcflack avatar jcflack commented on July 19, 2024

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?

from pljava.

jcflack avatar jcflack commented on July 19, 2024

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. :(

from pljava.

kkzz8888 avatar kkzz8888 commented on July 19, 2024

thanks a lot! That made the build successful. Will continue the rest of installation of pljava.

from pljava.

kkzz8888 avatar kkzz8888 commented on July 19, 2024

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.

from pljava.

jcflack avatar jcflack commented on July 19, 2024

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.

from pljava.

jcflack avatar jcflack commented on July 19, 2024

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.

from pljava.

kkzz8888 avatar kkzz8888 commented on July 19, 2024

Thanks, already did clean build on the branch. Here is the screenshot captured.
2016-02-09 8 31 38

from pljava.

jcflack avatar jcflack commented on July 19, 2024

Please start a new issue, and include the output of

otool -L /usr/local/lib/postgresql/libpljava-so-1.5.0-BETA1.bundle

from pljava.

jcflack avatar jcflack commented on July 19, 2024

Documented in 1.5.0-BETA2.

from pljava.

jcflack avatar jcflack commented on July 19, 2024

Documented in 1.5.0 release.

from pljava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.