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

0.1.46 does not work #131

Closed
fafhrd91 opened this issue Oct 11, 2021 · 12 comments · Fixed by #146
Closed

0.1.46 does not work #131

fafhrd91 opened this issue Oct 11, 2021 · 12 comments · Fixed by #146

Comments

@fafhrd91
Copy link

trying to build snmalloc-rs crate and getting Unknown argument --parallel error. works fine with 0.1.45

@mjp41
Copy link

mjp41 commented Oct 12, 2021

@fafhrd91 which version of CMake are you using. I looks like this release picked up a requirement on 3.12.
https://github.com/alexcrichton/cmake-rs/pull/123/files

That PR says --parallel was introduced with v3.12.
https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#build-tool-mode

The current release of snmalloc-rs only requires 3.8, so perhaps the checking is missing from cmake-rs for the new minimum version?

@fafhrd91
Copy link
Author

fafhrd91 commented Oct 12, 2021

we use cmake 3.10, that is fine to bump requirement but just unexpected for patch version change

@alexcrichton
Copy link
Member

Thanks for the report, but yes the minimum version is now one that supports the --parallel argument. Are you unable to upgrade cmake?

@mgattozzi
Copy link

I'm trying to see if there's a way to bump us to to 3.12 at work but I'm not sure if that's possible right now and still working on that. The patch update is affecting libz-sys which isn't using a pinned version of this and so cargo update broke the build.

@mgattozzi
Copy link

As an update we can't update it right now for reasons but pinning cmake works just fine for us by adding it as a dep to the main application with:

[dependencies]
cmake = "=0.1.45"

taiki-e added a commit to openrr/openrr that referenced this issue Oct 14, 2021
@mygnu
Copy link

mygnu commented Oct 14, 2021

related #131

@mygnu
Copy link

mygnu commented Oct 14, 2021

FYI, this is breaking builds on still supported ubuntu18.04 LTS

@alexcrichton
Copy link
Member

I've posted before that I'm having a lot of trouble maintaining this crate and I am not the best person for the job any more. I do not have the motivation to investigate this and fix it. I can try to manage PRs and help guide others toward a solution but honestly I'm burned out on this crate and need help. If anyone is passionate about fixing this it would be great to either receive a PR or get help in maintaining this crate.

@strega-nil
Copy link

strega-nil commented Oct 14, 2021

I can try to take a look at this later today; it would make sense to me to do version checks, which should be pretty easy given the current code? Especially since --parallel is not necessarily a need. It would also be good to define a minimum CMake version we require, so that we only need to do version checks for features past that.

@fpagliughi
Copy link

Yes, this broke the build for my Eclipse Paho MQTT crate on Ubuntu 18.04. (eclipse/paho.mqtt.rust#137)
Sorry I'm not very good with CMake, but I can help test/review any fix.

@rwthompsonii
Copy link

Is there any way to just check the version of cmake by issuing a "--version" command, prior to using flags that aren't present? This bit me hard today.

@taiki-e
Copy link
Member

taiki-e commented Mar 1, 2022

Filed #146 to fix this.

hishamhm added a commit to Kong/ngx_wasm_module that referenced this issue Aug 10, 2022
I haven't spotted this one before, but it just failed on me
when testing the Ubuntu 18.04 build:

The latest `cargo` uses `cmake --parallel` when building
`wabt-sys` (which is required by `cwabt`, used by the V8 backend).
The `--parallel` flag is only available from CMake 3.12 onwards,
which is not included in the Ubuntu 18.04 distro.

More info on the cmake version requirement for cmake-rs:
rust-lang/cmake-rs#131
A fix was merged but a new version of the crate was not
yet released:
rust-lang/cmake-rs#146

Turns out the easiest way to get a binary for CMake >= 3.12
that's compatible with Ubuntu 18.04 is to install it via pip:

```
RUN apt-get install -y --no-install-recommends \
        python3-pip \
        python3-setuptools
RUN pip3 install --upgrade pip
RUN pip3 install scikit-build
RUN pip3 install cmake
```

...which worked, but pinning the dependency involved fewer moving
parts and felt like a more stable solution.
hishamhm added a commit to Kong/ngx_wasm_module that referenced this issue Aug 10, 2022
The latest cargo uses cmake --parallel when building
wabt-sys (which is required by cwabt, used by the V8 backend).
The --parallel flag is only available from CMake 3.12 onwards,
which is not included in the Ubuntu 18.04 distro.

More info on the cmake version requirement for cmake-rs:
rust-lang/cmake-rs#131
A fix was merged but a new version of the crate was not
yet released:
rust-lang/cmake-rs#146

Additionally, wabt-sys actually includes code which assumes
CMake >= 3.12! See:
https://ma.ttias.be/wabt-sys-compile-error-cmake-project-version-not-declared-in-scope-ubuntu-18-04/
hishamhm added a commit to Kong/ngx_wasm_module that referenced this issue Aug 11, 2022
The latest cargo uses cmake --parallel when building
wabt-sys (which is required by cwabt, used by the V8 backend).
The --parallel flag is only available from CMake 3.12 onwards,
which is not included in the Ubuntu 18.04 distro.

More info on the cmake version requirement for cmake-rs:
rust-lang/cmake-rs#131
A fix was merged but a new version of the crate was not
yet released:
rust-lang/cmake-rs#146

Additionally, wabt-sys actually includes code which assumes
CMake >= 3.12! See:
https://ma.ttias.be/wabt-sys-compile-error-cmake-project-version-not-declared-in-scope-ubuntu-18-04/
hishamhm added a commit to Kong/ngx_wasm_module that referenced this issue Aug 12, 2022
The latest cargo uses cmake --parallel when building
wabt-sys (which is required by cwabt, used by the V8 backend).
The --parallel flag is only available from CMake 3.12 onwards,
which is not included in the Ubuntu 18.04 distro.

More info on the cmake version requirement for cmake-rs:
rust-lang/cmake-rs#131
A fix was merged but a new version of the crate was not
yet released:
rust-lang/cmake-rs#146

Additionally, wabt-sys actually includes code which assumes
CMake >= 3.12! See:
https://ma.ttias.be/wabt-sys-compile-error-cmake-project-version-not-declared-in-scope-ubuntu-18-04/
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 a pull request may close this issue.

9 participants