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

libpg 12+ working branch #98

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

libpg 12+ working branch #98

wants to merge 4 commits into from

Conversation

clux
Copy link
Owner

@clux clux commented May 23, 2022

need to link libpgport and libpgcommon since libpg12

manually compiling in two extra pg libraries in the stable image on this branch:

and also using the link flags from an ancient pr: https://github.com/sgrif/pq-sys/pull/28/files for sgrif/pq-sys#27 but that's been ignored for 2 years...

@clux clux linked an issue May 23, 2022 that may be closed by this pull request
@clux
Copy link
Owner Author

clux commented May 23, 2022

lol this does totally work when adding in libpgport, libpgcommon and using goldranks fix

@clux clux changed the title libpg 12+ wip libpg 12+ working branch May 23, 2022
@clux
Copy link
Owner Author

clux commented Jun 5, 2022

Note to self; tried the other potential fix branch on pq-sys with the following diff:

diff --git Dockerfile Dockerfile
index de1c119..78b7253 100644
--- Dockerfile
+++ Dockerfile
@@ -137,6 +137,12 @@ ENV PATH=$PREFIX/bin:$PATH \
     PKG_CONFIG_PATH_X86_64_UNKNOWN_LINUX_MUSL=$PREFIX/lib/pkgconfig \
     PG_CONFIG_X86_64_UNKNOWN_LINUX_GNU=/usr/bin/pg_config \
     PG_CONFIG_X86_64_UNKNOWN_LINUX_MUSL=/musl/bin/pg_config \
+    PQ_LIB_DIR_x86_64_UNKNOWN_LINUX_MUSL=$PREFIX/lib \
+    PQ_LIB_DIR_x86_64=$PREFIX/lib \
+    PQ_LIB_DIR=$PREFIX/lib \
+    PQ_LIB_STATIC=true \
+    PQ_LIB_STATIC_x86_64_UNKNOWN_LINUX_MUSL=$PREFIX/lib \
+    PQ_LIB_STATIC_x86_64=$PREFIX/lib \
     OPENSSL_STATIC=true \
     OPENSSL_DIR=$PREFIX \
     SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
diff --git test/pqcrate/Cargo.toml test/pqcrate/Cargo.toml
index a158fac..02ff851 100644
--- test/pqcrate/Cargo.toml
+++ test/pqcrate/Cargo.toml
@@ -5,5 +5,5 @@ version = "0.1.0"
 
 [dependencies]
 #pq-sys = "0.4.5"
-pq-sys = { git = "https://github.com/golddranks/pq-sys.git", rev = "8bc178b2a3859704585f4d4b39d2942c040e350b" }
+pq-sys = { git = "https://github.com/spruce/pq-sys.git", rev = "c55ab302875b5639779d2e0caa9f1ae71ac2464b" }
 openssl = "*"

does not work. needs the explicit static link dependencies.

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 >= 12 fails to static link with openssl
1 participant