Re: Starting build-system work (Windows/Mac users please speak up)

From: Kartik Ohri <kartikohri13(at)gmail(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: pljava-dev(at)lists(dot)postgresql(dot)org
Subject: Re: Starting build-system work (Windows/Mac users please speak up)
Date: 2020-06-06 12:40:26
Message-ID: CAASLQ4OzPwZB6GG_cXNW4WU4zpHa6wm8Q3WRWNv5pZpis+gf3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

>
> or even to experiment with pg_ls_dir(), pg_stat_file(),
> pg_read_binary_file() [1] with the name of the JVM DLL or the directory
> it lives in, to see if PostgreSQL always gets "Access is denied".
>

I have played around a bit using your suggestions. It seems this is indeed
a permissions issue. The good thing is I was able to find a solution to it.

If this turns out to be a necessary step it will be good to get the
> details into the PL/Java documentation for Windows, because I'm
> pretty sure there's nothing about it in there now.
>

The solution is to use *pg_ctl* to start the postgres server from a shell
with appropriate permissions. Earlier, I was trying to start the postgres
server using *net start *in CMD and *Start-Service* in PowerShell. Even
with privileged shells, postgres created using these commands do not have
the necessary rights to some directories (including the Java directory,
hence, the libjvm location error). I was unable to figure out why this
happens.

I am now using pg_ctl to start the database. This is causing some issues in
the normal mode. The build stalls right after postgres starts. This does
not happen when the server is started using the other 2 options. I am
working on fixing this. However, in the interactive debug mode, I have been
able to use pg_ctl with success. I have run all the usual tests as on other
platforms except the -Xcheck:jni and all of these work.

Once this issue is fixed we will have a fully functional MSVC Windows
build. I'll let you know once this is done. Thanks.

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2020-06-06 14:19:05 Re: Starting build-system work (Windows/Mac users please speak up)
Previous Message Chapman Flack 2020-06-05 14:32:14 Re: Starting build-system work (Windows/Mac users please speak up)