Skip to content

scripts: Take only first line of clang version. #789

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

Merged

Conversation

tiagolam
Copy link

@tiagolam tiagolam commented Jun 14, 2022

Using the line below to compile with Clang:

$make ARCH=x86_64 CC=clang -j9

Emits the following warning:

*** libclang (used by the Rust bindings generator 'bindgen') version does not match Clang's. This may be a problem.
***   libclang version: 13.0.0
13.0.0                                                                                                                                                        
***   Clang version:    13.0.0
***

This is a result of $LC_ALL=C bindgen scripts/rust-is-available-bindgen-libclang.h, which gets called from scripts/rust-is-available.sh, producing two matches against the grep'ed pattern [0-9]+\.[0-9]+\.[0-9]+:

scripts/rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

This fixes the issue by pipe'ing the matching result to a head call,
getting the first result one.

Signed-off-by: Tiago Lam [email protected]

Using the line below to compile with Clang:
    ```
    $make ARCH=x86_64 CC=clang -j9
    ```

Emits the following warning:
    ```
    *** libclang (used by the Rust bindings generator 'bindgen') version does not match Clang's. This may be a problem.
    ***   libclang version: 13.0.0
13.0.0                                                                                                                                                        ***   Clang version:    13.0.0
    ***
    ```

This is a result of `$LC_ALL=C bindgen
scripts/rust-is-available-bindgen-libclang.h`, which gets called from
`scripts/rust-is-available.sh`, producing two matches against the
grep'ed pattern "[0-9]+\.[0-9]+\.[0-9]+":
    ```
    scripts/rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false
    ```
This fixes the issue by pipe'ing the matching result to a `head` call,
getting the first result one.

Signed-off-by: Tiago Lam <[email protected]>
@wrenger
Copy link

wrenger commented Jun 24, 2022

Isn't this related to #777?

@tiagolam
Copy link
Author

@wrenger Indeed, thanks for bringing it to my attention, as I hadn't noticed there was already an issue for it. I've replied to it.

@ojeda
Copy link
Member

ojeda commented Jul 2, 2022

I wonder if it would be cleaner or simpler to be a bit more fancy with the regexes in this file instead of the multi-step approach...

Thanks for the PR!

@ojeda ojeda merged commit eb57e75 into Rust-for-Linux:rust Jul 2, 2022
ojeda added a commit to ojeda/linux that referenced this pull request Jun 15, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
ojeda added a commit to ojeda/linux that referenced this pull request Jun 16, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Jun 16, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
fbq pushed a commit that referenced this pull request Jun 26, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: #942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: #789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
Reviewed-By: Ethan Twardy <[email protected]>
Tested-By: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
fbq pushed a commit that referenced this pull request Jun 30, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: #942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: #789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
Reviewed-By: Ethan Twardy <[email protected]>
Tested-By: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
fbq pushed a commit that referenced this pull request Jul 24, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: #942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: #789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
Reviewed-By: Ethan Twardy <[email protected]>
Tested-By: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
fbq pushed a commit that referenced this pull request Jul 31, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: #942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: #789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
Reviewed-By: Ethan Twardy <[email protected]>
Tested-By: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
fbq pushed a commit to fbq/linux that referenced this pull request Aug 8, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: Ethan D. Twardy <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Signed-off-by: Miguel Ojeda <[email protected]>
Reviewed-By: Ethan Twardy <[email protected]>
Tested-By: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
ojeda added a commit that referenced this pull request Aug 9, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: #942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: #789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Sep 9, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
joelagnel pushed a commit to joelagnel/linux-kernel that referenced this pull request Sep 10, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
joelagnel pushed a commit to joelagnel/linux-kernel that referenced this pull request Sep 10, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Kaz205 pushed a commit to Kaz205/linux that referenced this pull request Sep 11, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Sep 11, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Sep 11, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Sep 11, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
DawnBreather pushed a commit to DawnBreather/linux-kernel that referenced this pull request Sep 13, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Whissi pushed a commit to Whissi/linux-stable that referenced this pull request Sep 13, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Whissi pushed a commit to Whissi/linux-stable that referenced this pull request Sep 13, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
vvarma pushed a commit to vvarma/linux that referenced this pull request Sep 19, 2023
…e path

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
feryw pushed a commit to feryw/linux-6.5.z that referenced this pull request Sep 28, 2023
…e path

[ Upstream commit 9eb7e20e0c5cd069457845f965b3e8a7d736ecb7 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3399ab ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
vtta pushed a commit to vtta/linux-archive that referenced this pull request Sep 29, 2023
…e path

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Joshua-Riek pushed a commit to Joshua-Riek/linux that referenced this pull request Oct 24, 2023
…e path

BugLink: https://bugs.launchpad.net/bugs/2035588

[ Upstream commit 9eb7e20 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Andrea Righi <[email protected]>
sileshn pushed a commit to sileshn/ubuntu-kernel-lunar that referenced this pull request Dec 4, 2023
…e path

BugLink: https://bugs.launchpad.net/bugs/2042884

[ Upstream commit 9eb7e20e0c5cd069457845f965b3e8a7d736ecb7 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
sileshn pushed a commit to sileshn/ubuntu-kernel-lunar that referenced this pull request Jan 10, 2024
…e path

BugLink: https://bugs.launchpad.net/bugs/2042884

[ Upstream commit 9eb7e20e0c5cd069457845f965b3e8a7d736ecb7 ]

`bindgen`'s output for `libclang`'s version check contains paths, which
in turn may contain strings that look like version numbers [1][2]:

    .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0  [-W#pragma-messages], err: false

which the script will pick up as the version instead of the latter.

It is also the case that versions may appear after the actual version
(e.g. distribution's version text), which was the reason behind `head` [3]:

    .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false

Thus instead ask for a match after the `clang version` string.

Reported-by: Jordan Isaacs <[email protected]>
Closes: Rust-for-Linux/linux#942 [1]
Reported-by: "Ethan D. Twardy" <[email protected]>
Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [2]
Reported-by: Tiago Lam <[email protected]>
Closes: Rust-for-Linux/linux#789 [3]
Fixes: 78521f3 ("scripts: add `rust_is_available.sh`")
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Ethan Twardy <[email protected]>
Tested-by: Ethan Twardy <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants