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

Add a pq-src crate for a bundled feature flag #46

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

weiznich
Copy link
Collaborator

@weiznich weiznich commented Oct 6, 2023

No description provided.

@weiznich weiznich force-pushed the bundled branch 9 times, most recently from ef16d49 to 52f333c Compare October 6, 2023 12:36
@weiznich
Copy link
Collaborator Author

I personally have only access to a linux development environment. That makes it hard to fix the remaining issues on windows/macos. If you are a user of diesel or pq-sys and use one of these platforms consider helping figuring out these issues.

@weiznich weiznich mentioned this pull request Oct 11, 2023
@fsasieta
Copy link

fsasieta commented Nov 2, 2023

While I can't guarantee an allotted time per week to support this, I'm interested in contributing. I primarily develop on my local environment using a MacOS platform (ARM Chip). Would be happy to contribute if there are guidelines to doing this. I've skimmed over the diesel contributing guidelines, but have never contributed to diesel

@weiznich
Copy link
Collaborator Author

weiznich commented Nov 2, 2023

@fsasieta Thanks for your interest to contribute. There is no need to have guarantee any amount of time for this, as at least for me that's a free time project. For this specific change I'm interested in the following information:

  • Build output of libpq on your platform (so which files are exactly compiled, etc). This likely requires cloning the postgres source, checking out the 16.0 release tag, configuring the build and building libpq by executing make in src/interfaces/libpq (and recording the output of that)
  • Maybe: What needs to be adjusted in the build script to match this output. So essentially what needs to be changed so that cargo build in the pq-src directory works on your system. The linked build script should essentially mirror the make file generated by ./configure as much as possible.

I'm happy to help with as much information as I can if you hit a road block or if there are any other question.

@alcroito
Copy link

alcroito commented Nov 3, 2023

Attaching build logs on an intel mac, I hope it helps.
Commands were:

clone and checkout REL_16_0 tag
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
mkdir build && cd build
../configure --prefix=$PWD/../installed &> configure.txt
make -j8 &> build.txt
make install &> install.txt

pq_build_logs_intel_mac.zip

Looking at homebrew recipe, they pass a few more flags when building but not sure if they are relevant here
https://github.com/Homebrew/homebrew-core/blob/master/Formula/lib/libpq.rb#L43

@weiznich
Copy link
Collaborator Author

weiznich commented Nov 6, 2023

Thanks for providing these logs ❤️ . I will see if they help an report back with results in the next days

@weiznich weiznich force-pushed the bundled branch 15 times, most recently from 42b773b to bcbd9e9 Compare November 10, 2023 10:58
@weiznich weiznich force-pushed the bundled branch 21 times, most recently from ff69536 to 033b99c Compare December 6, 2023 11:39
@weiznich weiznich merged commit 411049d into master Dec 7, 2023
6 checks passed
@weiznich
Copy link
Collaborator Author

weiznich commented Dec 7, 2023

@alcroito Thanks again for your help. I've merged this PR as it's now ready to be used 🥳

siddhantk232 added a commit to fastn-stack/fastn that referenced this pull request Dec 29, 2023
use clib provided by pq-src

sgrif/pq-sys#46
amitu pushed a commit to fastn-stack/fastn that referenced this pull request Dec 29, 2023
use clib provided by pq-src

sgrif/pq-sys#46
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.

3 participants