Skip to content
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

[libpq] update to 12.0 and use vcpkg_configure_make #8487

Closed
wants to merge 5 commits into from

Conversation

TheScarfix
Copy link
Contributor

@TheScarfix TheScarfix commented Oct 7, 2019

will close #8462

@cenit
Copy link
Contributor

cenit commented Oct 7, 2019

This means that you can also remove the custom CMakeLists.txt?

@TheScarfix
Copy link
Contributor Author

yes I hope to as soon as it works

@TheScarfix TheScarfix changed the title [psql] update to 12.0 and change to vcpkg_configure_make [libpq] update to 12.0 and change to vcpkg_configure_make Oct 7, 2019
@cenit
Copy link
Contributor

cenit commented Oct 7, 2019

I noted it only to not forget it. Since I just finished a tedious cleanup of many old and deprecated patches, I like to keep the repo clean now :)

URLS "https://ftp.postgresql.org/pub/source/v9.6.3/postgresql-9.6.3.tar.bz2"
FILENAME "postgresql-9.6.3.tar.bz2"
SHA512 97141972e154e6b0e756ee6a4e20f26e82022a9fd4c56305314a3a5567a79ece638e4ac3d513b46138737ae6bd27a098f30013a94767db151181aac9c01290a1
URLS "https://ftp.postgresql.org/pub/source/v12.0/postgresql-12.0.tar.bz2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be set as a macro,

@Neumann-A
Copy link
Contributor

Neumann-A commented Oct 9, 2019

please fix the title. there is no

change to vcpkg_configure_make

as far as I can see from the changes.

@cenit
Copy link
Contributor

cenit commented Oct 9, 2019

it was vcpkg_configure_cmake, now it is vcpkg_configure_make

@Neumann-A
Copy link
Contributor

I read it as a change to the function/script vcpkg_configure_make.
Maybe it should be "and use vcpkg_configure_make" or "remove custom CMake build" or "use native build scripts".

@TheScarfix TheScarfix changed the title [libpq] update to 12.0 and change to vcpkg_configure_make [libpq] update to 12.0 and use vcpkg_configure_make Oct 9, 2019
@Neumann-A
Copy link
Contributor

So I hacked the C99 check away (missing register keyword and the C equivalent to constexpr?) and fixed some Compiler/Linker flags but got stuck with the following error:

conftest.c
configure:8526: checking for non-GNU ld
configure:8559: result: no
configure:8562: error: no acceptable ld found in $PATH

If you then force in the portfile:
set(ENV{LD} "link.exe")
you get:

warnings:

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-g'
cl : Command line warning D9002 : ignoring unknown option '--allow-multiple-definition'
cl : Command line warning D9002 : ignoring unknown option '--disable-auto-import'
cl : Command line warning D9002 : ignoring unknown option '-lz'
cl : Command line warning D9002 : ignoring unknown option '-lm'
configure:11813: result: no
configure:11823: error: zlib library not found
If you have zlib already installed, see config.log for details on the
failure.  It is possible the compiler isn't looking in the proper directory.
Use --without-zlib to disable zlib support.

I mean yeah you could patch the whole configure script on windows but it is probably easier to roll our own CMakeLists.txt file for libpq on Windows

Also from the config log some questionable checks:
checking for C/C++ restrict keyword... no
which is a double check due to the C99 check ....
checking for main in -lm... yes
because cl is just ignore -lm.....

@TheScarfix
Copy link
Contributor Author

I'll try the MSBuild script later https://www.postgresql.org/docs/12/install-windows.html

@Neumann-A
Copy link
Contributor

yeah that is probably the way to go. the files are in src\tools\msvc if you are looking for the scripts

@Neumann-A
Copy link
Contributor

after reviewing the configure log you probably also need to explicitly pass the path of external dependencies like zlib to the configure script on linux to get consistent builds or the script will check if it can link -lz and if zlib is installed system wide (not the vcpkg version) it will catch that dependency and result in an inconsistent build.

@Neumann-A
Copy link
Contributor

Furthermore if all configure options of libpq like zlib and libxml are features of libpq I need #8269 solved to make Qt work correctly in static builds.

@vicroms vicroms self-assigned this Oct 9, 2019
@Neumann-A
Copy link
Contributor

So got x86-windows to build without any features using the perl scripts.
https://github.com/Neumann-A/vcpkg/tree/libpq-12.0
you currently have to rename win_flex and win_bison to only bison and flex

@Neumann-A
Copy link
Contributor

@TheScarfix: So I made the windows build work. I assume you want to have PR #8540 merged before working on the linux side?

@TheScarfix
Copy link
Contributor Author

I currently don't have the time to work on this, moving tomorrow. Hope I can look at it this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[libpq] update to 12.0 / improvements to vcpkg_configure_make
5 participants