Opened 4 years ago

Last modified 4 years ago

#1728 new defect

chicken-install postgresql fails on Windows

Reported by: Josh Helzer Owned by:
Priority: major Milestone: someday
Component: unknown Version: 5.2.0
Keywords: Cc:
Estimated difficulty:

Description

c:\>chicken-install postgresql
building postgresql
   C:\Users\j\AppData\Local\chicken-install\postgresql\build-postgresql.bat -host -D compiling-extension -J -s -regenerate-import-libraries -setup-mode -I C:\Users\j\AppData\Local\chicken-install\postgresql -C -IC:\Users\j\AppData\Local\chicken-install\postgresql -O2 -d1 postgresql.scm -o C:\Users\j\AppData\Local\chicken-install\postgresql\postgresql.so
creating subprocess failed

Error: shell command terminated with nonzero exit code
1
"C:\\Users\\j\\AppData\\Local\\chicken-install\\postgresql\\postgresql.build.bat"

c:\>

Attachments (1)

0001-Convert-build-script-to-Scheme-for-Windows-support.patch (5.2 KB) - added by Vasilij Schneidermann 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by sjamaan

Hi there! I don't have a proper Windows setup with PostgreSQL and everything required to run it. The custom build script build-postgresql is UNIX-only right now. Of course if you would help me by porting it to a .bat file and testing it, I would gladly accept a patch and push a new release.

If you don't feel like supporting the feature checks that would be fine, just having a basic version which can correctly figure out the linker flags to link against libpq, while assuming a recent enough version that it supports all the features would be quite useful already!

comment:2 Changed 4 years ago by Vasilij Schneidermann

I've looked at the build file, it seems to be complex enough that my usual .bat script would be a serious impairment (where I'd just rely on the user to set the correct environment variables for everything). Have you considered to write a Scheme build script instead and invoke it from the custom build files? I can perform tests on mingw-msys2 to ensure tricky parts like not hardcoding path separators are taken care of.

comment:3 Changed 4 years ago by Vasilij Schneidermann

I've converted the build file to Scheme successfully. Will test on Windows later.

comment:4 Changed 4 years ago by Vasilij Schneidermann

I went through a few iterations of the script until it worked correctly with mingw-msys2. It works on cygwin as well, which doesn't appear to use .bat files and uses slashes in paths, but has windows-style extensions.

Changed 4 years ago by Vasilij Schneidermann

comment:5 Changed 4 years ago by sjamaan

Josh, could you test if this fixes things for you?

Note: See TracTickets for help on using tickets.