Closed weiznich closed 10 months ago
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
@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:
make
in src/interfaces/libpq
(and recording the output of 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.
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
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
Thanks for providing these logs :heart: . I will see if they help an report back with results in the next days
@fsasieta @alcroito Again thanks for your help here. These logs were really helpful. The build for macos now passes the CI. Would it possible for you to check whether that also works in your local environment. You would need to perform the following steps with a diesel + libpq application:
Cargo.toml
:
[dependencies.libpq-sys]
version = "0.4"
[patch.crates-io] pq-sys = { git = "https://github.com/sgrif/pq-sys/", branch = "bundled" }
* Build your application with cargo build --features "pq-sys/bundled"
* Verify that everything works as before
* (If you have tests also run the test with that feature flag)
version =
Hi, i don't have a project that uses pq, but if build coverage on a non-ci machine is of any value, i can try to build a sample project that uses pq if you can provide one.
@alcroito In that case you can just try what the CI does:
cargo new test_diesel
cd test_diesel
cargo add diesel --no-default-features --features "postgres"
cargo add pq-sys
echo "[patch.crates-io]" >> Cargo.toml
echo "pq-sys = { git = \"https://github.com/sgrif/pq-sys/\", branch = \"bundled\" }" >> Cargo.toml
echo "use diesel::prelude::*;" > src/main.rs
echo "fn main() { PgConnection::establish(\"foo\").unwrap(); }" >> src/main.rs
cargo build --features "pq-sys/bundled"
@alcroito In that case you can just try what the CI does:
cargo new test_diesel cd test_diesel cargo add diesel --no-default-features --features "postgres" cargo add pq-sys echo "[patch.crates-io]" >> Cargo.toml echo "pq-sys = { git = \"https://github.com/sgrif/pq-sys/\", branch = \"bundled\" }" >> Cargo.toml echo "use diesel::prelude::*;" > src/main.rs echo "fn main() { PgConnection::establish(\"foo\").unwrap(); }" >> src/main.rs cargo build --features "pq-sys/bundled"
I can confirm the build succeeded on an intel mac.
Perfect. Thanks for confirming :heart:
Now I only need to figure out how to handle the windows build…
@alcroito Thanks again for your help. I've merged this PR as it's now ready to be used :partying_face:
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.