-
Notifications
You must be signed in to change notification settings - Fork 459
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
New minimum MacOS version logic causes build error #900
Comments
In case anyone wants a MWE:
// build.rs
fn main() {
cc::Build::new()
.cpp(true)
.cpp_link_stdlib("c++")
.file("foo.cpp")
.compile("foo");
} // foo.cpp
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
}
Downgrading via |
Yeah, hmm. I guess when compiling C++ we should not respect what |
I'm away from home so I can't do a good patch for this (which should probably be version cmp + bound to release deployment target that releases libc++), but I could do a hacky check for the problematic version (which in practice should basically always work). That said, I chatted with @BlackHoleFox who says they'll do it. If they don't get to it by this evening, I'll do the hacky thing as a stop-gap, and then follow up with a better one later. Either way, I'll get a fix out for this this evening or tomorrow morning. Note that another fix for this is Footnotes
|
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
In the Java API, we had a bug where we take ownership of and free parameters passed into executeWithParams. Inspecting the method itself, it was taking a shared_ptr, but then performing a deep copy, which is nonsense. Instead, we should take a unique_ptr, since we need to copy the parameters to guarantee that they are not modified for the duration of the query. This commit also fixes three other issues. First, the Java tests weren't running any tests from ConnectionTest.java, which is why we didn't observe this bug. Additionally, the constructor of KuzuConnection uses an assertion, but assertions are disabled by default, which causes our tests to fail (and if the assertion is skipped, we segfault). Also, since rust-lang/cc-rs#900 has been fixed, we can remove the version pinning of `cc` on MacOS.
Hi,
I have a somewhat fuzzy grasp of the problem but think I've tracked this down to being an issue introduced by #848
The problem I'm running into is that when trying to build a Rust project on my Mac (Intel, macos 12.6.9) that uses a build script +
cc
to build a C++ file it is failing on not being able to findlibstdc++
. Which I guess is because it "should" be looking forlibc++
instead?For example
tree-sitter-ruby
, or this test repoThese fail when running
cargo build
with something like:So my rough analysis is that:
I just started running into this because
[email protected]
just got released, which includes #848#848 appears to introduce the use of that
macosx-version-min
flag. Then #872 appears to try and change that logic to force a minimummacosx-version-min
of10.9
when you're compiling C++But it appears that the fix from #872 isn't "kicking in" (and so per above logging, it is using
macosx-version-min=10.7
, which I guess causes it to uselibstdc++
instead oflibc++
or something?) becauserustc_provided_target()
(which runsrustc --target whatever --print deployment-target
) is returning10.7
So I'm guessing the fix here is to refine that #872 logic to eg also force
10.9
whenrustc_provided_target()
returns something less than10.9
(eg10.7
)?The text was updated successfully, but these errors were encountered: