-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win10 + pg10 + R3.4.2 + PLR 8.3.0.17 = problem finding plr_call_handler in plr.dll #26
Comments
Per the INSTALL.txt: "For example, these directories might be: Can you try with Postgres and R installed in those paths, i.e. no spaces? Also, perhaps reboot after changing the environment variables. I actually saw the same error while getting this plr.dll to work on my Windows VM, but it went away after making those changes. I'm afraid pretty much the only time I use Windows is to compile plr.dll for others to use, so I'm not sure what else could be the issue. Sure would be nice is we could get someone with more Windows development experience to help out here :-/ (I met some Azure PostgreSQL people at a recent conference, so maybe not entirely a lost cause). Of course, my real advice is the same as always -- switch to Linux then everything "just works" ;-) |
Thanks, but this didn't work for me. Reinstalled Postgres and R up on the C root, rebooted after changing env variables, but I get the same error message now pointing to "C:/PostgreSQL/10/lib/plr.dll". I'm not sure why the path spacing would matter for you since it's apparent that it's finding the file in the right location. This spacing suggestion has come up for my other PLR issues in the past, but it's never been the cause of my problems. I wish I could just switch to Linux, but it's just not an option with the other things I need to support on this machine. Once upon a time, I would stubbornly deal with a Windows VM to do those things, but it would slow me down too much now, and I know this can work as I've just gone ahead and installed 8.3.0.17 on pg9.6 successfully using these same instructions. BTW I noticed that 8.3.0.17 for pg10 doesn't have a "plr.sql" file like the pg9.6 distro does. Is this significant? |
To prove my point, I went ahead and re-installed 9.6 in Program Files and again successfully installed and tested 8.3.0.17. Then I reinstalled R in Program Files and had the same success. I didn't even have to reboot each time-- I just restarted the pg9.6 service after each change. Something else is going on here with pg10's 8.3.0.17. I'm happy to help troubleshoot in any way, but if it involves setting up a build environment, I'd need some guidance to get started. |
Hmm, did I mention how much I hate Windows ;-) On the plr.sql file, it is really a remnant of the time before Postgres had (and PL/R supported) the CREATE EXTENSION command. So really no longer needed or appropriate. I wish I has an answer for you -- If I could reproduce the issue, and figure out how to use Visual Studio debugging tools, I could undoubtedly get to the bottom of this. But on my Win10 VM the pg10 plr.dll is working perfectly with EDB's version of Postgres. |
Using PLR 8.3.0.17 for pg10 and R3.4.2. ( from the link above ) 64 bit Dependency walker ( http://www.dependencywalker.com/ ) ( depends22_x64 ) shows that plr.dll
In contrast, pltcl.dll has both "pltcl_call_handler" and "pg_finfo_pltcl_call_handler"
|
That's really odd because I used the dependency walker myself after compiling this dll and the functions are all there. Maybe I made some mistake when packing up the dll -- will check |
Ok, near as I can tell I screwed up :-( The file in the uploaded zip was an earlier DLL that came from a failed build. Apparently after I corrected the build and tested the new DLL successfully, I somehow forgot to copy the newer good one over the older bad one prior to uploading the zip. Anyway, I think I got it right this time -- new plr-8.3.0.17-pg10.0-R3.4.2-win64.zip hopefully fixes the issue for pg10/R3.4.2/plr using the EDB build of pg10. |
Thank you, Using Dependency Walker, later, I also compared the function list the PostgreSQL 10 plr.dll that I built using the vanilla build of PostgreSQL 10 using MSYS2 and MINGW64. Something, strange (in a good way), the case seems, that I can also use that PostgreSQL 10 build of plr.dll using MSYS2 and MINGW64 to be the 'plr' in EnterpriseDB PostgreSQL 10 on Windows x86-64. I just have to copy "plr.dll" to be called the file "plr" (with no filename extension). ( Am I crazy? I do not think this method worked in 9.6.)
Copy plr.dll to plr
sgennaria, If you are still there on the line' and want to try.. This evening, this worked for me. SYSTEM variables (I only tested with "SYSTEM" variables)
EnterpriseDB PostgreSQL 10 on Windows x86-64
Service name and "Log On As"
Needed are both plr.dll (CREATE EXTENSION PLR;) and plr (to run a plr function). Attached is plr(plr.dll/plr) as plr.gif. To use it, just rename the .gif file twice to both plr.dll and plr |
Maybe this is why my MSYS2 MINGW64 plr.dll works in EnterpriseDB PostgreSQL 10 on Windows x86-64?
|
@AndreMikulec Thanks! I managed to get this working for both EnterpriseDB and BigSQL using the PLR download from Joe's website. Instructions to follow.... |
Install instructions for PLR 8.3.0.17 with R 3.4.2 and EnterpriseDB PostgreSQL 10.0 on Windows 10 64-bit
|
Install instructions for PLR 8.3.0.17 with R 3.4.2 and BigSQL PostgreSQL 10.0 on Windows 10 64-bit
Unfortunately, you can't use this method to configure a second BigSQL Postgres version with autostart=on. So alternatively, you can skip step 7 and just manually start your other versions with autostart=off and your environment variables configured appropriately. |
That's awesome -- thanks for working it out and documenting it. |
sgennaria, I did notice in your docs, the use of 'setx /M' system wide (HKEY_LOCAL_MACHINE) variables.
Rules are here ...
I am glad that works! On a side note, some people prefer to add new PATH directories to the beginning (left side) of the PATH. The PATH is read left to right. Sometimes people get 'tripped up' on this feature, because an unexpected(wrong) exe is read. Each method ( beginning/end of ) PATH, has its own advantages and disadvantages. Here, for example, is 'beginning of' PATH
Also, that annoying 'Microsoft Windows' message
may be removed. This person here ... has this nice method to specify a code page number.
In EnterpriseDB ...
In BigSQL ...
|
@AndreMikulec I confirmed that your plr.dll disguised as plr.gif works perfectly for my BigSQL pg10 install without the need for any workarounds. Regarding your other comments, I'm not sure I completely follow, but is the Local System Account a less-secure way of running services in Windows? As for the PATH bit, I was just looking for a succinct way to get the point across. I usually use Win+R: sysdm.cpl to edit my own env variables. I figured anyone with the wherewithal would mod the PATH as they see fit. Caveat emptor, in a way =) And that's a cool trick you found to specify the console code page. I do everything in pgAdmin3, so I'm not used to such nuances. |
OK, guys I was able to build plr using appveyor, can you guys test this https://github.com/davecramer/plr/releases/tag/testdeploy1 |
From
|
try now https://github.com/davecramer/plr/releases/tag/testdeploy1
Dave Cramer
…On 11 November 2017 at 23:48, AndreMikulec ***@***.***> wrote:
From
https://github.com/davecramer/plr/releases/tag/testdeploy1
I get back a broken link ...
404 This is not the page you are looking for.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYz9nYxFb5X3xbZB-u3fg4qH1YT6oFqks5s1niHgaJpZM4P2KkO>
.
|
Dave, A trick on BigSQL (shown far below) is EnterpriseDB
Manually rename(hide) plr and plr.dll to plr_ANDRE and plr.dll_ANDRE
Copy in plr_DaveCramer_Nov_11_2017.dll
BigSQL
Manually rename(hide) plr and plr.dll to plr_ANDRE and plr.dll_ANDRE
Copy in plr_DaveCramer_Nov_11_2017.dll
Copy plr_DaveCramer_Nov_11_2017.dll to plr
|
That's awesome. Thanks for testing it.
Now we have to figure out how to deal with the fact that we have to create
a tag to release it.
Currently some of the artifacts have the tag name embedded in them such as
the sql file etc.
Ideally I'd like to not have to rename those every time we release just
because R or windows changes versions.
Thoughts ?
Dave Cramer
…On 12 November 2017 at 22:37, AndreMikulec ***@***.***> wrote:
Dave,
Yes that works (EnterpriseDB and BigSQL).
You are the Man!
A trick on BigSQL (shown far below) is
to make a 2nd file called "plr" ( plr.dll without the file extension. )
(I had to do that again.)
EnterpriseDB
Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
psql (10.0)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
postgres=# create extension plr;
ERROR: extension "plr" already exists
postgres=# select version();
version
------------------------------------------------------------
PostgreSQL 10.0, compiled by Visual C++ build 1800, 64-bit
(1 row)
postgres=# select plr_version();
plr_version
-------------
08.03.00.17
(1 row)
postgres=# select r_version();
r_version
-------------------------------------------------
(platform,x86_64-w64-mingw32)
(arch,x86_64)
(os,mingw32)
(system,"x86_64, mingw32")
(status,"")
(major,3)
(minor,4.2)
(year,2017)
(month,09)
(day,28)
("svn rev",73368)
(language,R)
(version.string,"R version 3.4.2 (2017-09-28)")
(nickname,"Short Summer")
(14 rows)
postgres=# drop extension plr;
DROP EXTENSION
Manually rename(hide) plr and plr.dll to plr_ANDRE and plr.dll_ANDRE
postgres=# create extension plr;
ERROR: could not access file "$libdir/plr": No such file or directory
Copy in plr_DaveCramer_Nov_11_2017.dll
Copy plr_DaveCramer_Nov_11_2017.dll to plr.dll
postgres=# create extension plr;
CREATE EXTENSION
postgres=# select plr_version();
plr_version
-------------
08.03.00.17
(1 row)
postgres=# select r_version();
r_version
-------------------------------------------------
(platform,x86_64-w64-mingw32)
(arch,x86_64)
(os,mingw32)
(system,"x86_64, mingw32")
(status,"")
(major,3)
(minor,4.2)
(year,2017)
(month,09)
(day,28)
("svn rev",73368)
(language,R)
(version.string,"R version 3.4.2 (2017-09-28)")
(nickname,"Short Summer")
(14 rows)
postgres=#
BigSQL
Waiting for 0 seconds, press a key to continue ...
psql (10.0)
Type "help" for help.
postgres=# select version();
version
--------------------------------------------------------------------------------------------------------
PostgreSQL 10.0 on x86_64-pc-mingw64, compiled by gcc.exe (Rev5, Built by MSYS2 project) 4.9.2, 64-bit
(1 row)
postgres=# drop extension plr;
DROP EXTENSION
Manually rename(hide) plr and plr.dll to plr_ANDRE and plr.dll_ANDRE
postgres=# create extension plr;
ERROR: could not access file "$libdir/plr": No such file or directory
Copy in plr_DaveCramer_Nov_11_2017.dll
Copy plr_DaveCramer_Nov_11_2017.dll to plr.dll
postgres=# create extension plr;
CREATE EXTENSION
postgres=# select plr_version();
plr_version
-------------
08.03.00.17
(1 row)
postgres=# select r_version();
ERROR: could not access file "C:/PG-10big._/pg10/lib/postgresql/plr": No such file or directory
Copy plr_DaveCramer_Nov_11_2017.dll to plr
(So now both files exist plr.dll and plr)
postgres=# select r_version();
r_version
-------------------------------------------------
(platform,x86_64-w64-mingw32)
(arch,x86_64)
(os,mingw32)
(system,"x86_64, mingw32")
(status,"")
(major,3)
(minor,4.2)
(year,2017)
(month,09)
(day,28)
("svn rev",73368)
(language,R)
(version.string,"R version 3.4.2 (2017-09-28)")
(nickname,"Short Summer")
(14 rows)
postgres=#
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYz9nrf5AkhoTs8DMwhBo-sjkWvedvWks5s17lwgaJpZM4P2KkO>
.
|
I know some about embedding or renaming. Perhaps, plr ( for Windows ) need only to be released 2x per year.
The way I understand the situation is that |
Appveyor is just running simple batch files or power shell commands, No magic there as for release there would be 1 more case. Where we actually change something in plr. But in general you are correct there are not that many times we need to release on windows. What I am thinking is a unix script which manipulates the naming of the sql files, and modifies any internal data in those files to align with the new tag and then pushes the tag to github. |
I had to do that as well to get my PL/R install up and running with PostgreSQL 9.5 / R 3.4.2. Do you guys know why ? I checked the control file, but would not find anything problematic there. |
Fresh Win10x64 machine. Installed EnterpriseDB's PostgreSQL 10.0 and R 3.4.2.
Path includes:
R_HOME is:
Using PLR 8.3.0.17 for pg10 and R3.4.2.
plr.dll is in:
plr.control, plr--8.3.0.17.sql, plr--unpackaged--8.3.0.17.sql are in:
README.plr is in:
Then I start up the service, connect to a db and try:
CREATE EXTENSION plr SCHEMA plr VERSION "8.3.0.17";
Which yields:
This is a new message for me. Not finding anything useful on Google. Ideas?
P.S. I can't wait for the day when:
pgc install plr-pg10
is a thing for BigSQL! =)The text was updated successfully, but these errors were encountered: