PostgresApp icon indicating copy to clipboard operation
PostgresApp copied to clipboard

Makefile.global

Open GaiusScotius opened this issue 4 years ago • 1 comments

Having downloaded the latest Postgres App I've spent a while trying to build the PL/lua extension on macOS Big Sur. The build initially failed because it was trying to link using /Applications/Xcode-11.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld. In later versions of the Xcode command line tools, it should now (at least on my system) be Applications/Xcode/Contents/Developer/usr/bin/ld.

I finally tracked the hard coded path to a setting for LD in /Applications/Postgres.app/Contents/Versions/13/lib/postgresql/pgxs/src/Makefile.global. Editing it works fine, but noting the comments that the file is created by the configure script -- which I couldn't find -- and that should any edits be needed it is a bug, I thought I should let you know.

Thanks for maintaining Postgres App!

GaiusScotius avatar Jun 10 '21 15:06 GaiusScotius

Thank you for your bug report and analysis! With https://github.com/PostgresApp/PostgresApp/commit/3b33764c8beab515e22416f782627970be84488d we will built the PostgreSQL binaries against the Command Line Tools instead of XCode, which is the recommended way and should ease building extensions against PostgresApp. With that the line now reads LD = /Library/Developer/CommandLineTools/usr/bin/ld. To build Extensions, make sure to have the Command Line Tools installed. You can download the dmg from Apple or just issue xcode-select --install.

tbussmann avatar Aug 10 '21 18:08 tbussmann