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

bindgen-cli: alternate use of bindgen - v1 #12139

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
59 changes: 55 additions & 4 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen-cli \
cargo-vendor \
cbindgen \
clang-devel \
diffutils \
numactl-devel \
dpdk-devel \
Expand Down Expand Up @@ -250,7 +252,9 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cbindgen \
clang-devel \
diffutils \
numactl-devel \
dpdk-devel \
Expand Down Expand Up @@ -344,6 +348,7 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo-vendor \
cbindgen \
diffutils \
Expand Down Expand Up @@ -491,12 +496,14 @@ jobs:

- name: Install system packages
run: |
yum -y install dnf-plugins-core
yum -y install dnf-plugins-core epel-release
yum config-manager --set-enabled powertools
yum -y install \
autoconf \
automake \
bindgen \
cargo-vendor \
clang-devel \
diffutils \
numactl-devel \
dpdk-devel \
Expand Down Expand Up @@ -593,7 +600,9 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo-vendor \
clang-devel \
diffutils \
numactl-devel \
dpdk-devel \
Expand Down Expand Up @@ -684,6 +693,7 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cbindgen \
ccache \
clang \
Expand Down Expand Up @@ -781,6 +791,7 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo \
cbindgen \
ccache \
Expand Down Expand Up @@ -880,9 +891,11 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo \
cbindgen \
ccache \
clang-devel \
diffutils \
file-devel \
gcc \
Expand Down Expand Up @@ -977,6 +990,7 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo \
cbindgen \
ccache \
Expand Down Expand Up @@ -1071,9 +1085,11 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo \
cbindgen \
ccache \
clang-devel \
diffutils \
file-devel \
gcc \
Expand Down Expand Up @@ -1155,6 +1171,7 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo \
cbindgen \
ccache \
Expand Down Expand Up @@ -1253,6 +1270,7 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
cargo \
cbindgen \
clang \
Expand Down Expand Up @@ -1375,6 +1393,7 @@ jobs:
apt -y install \
autoconf \
automake \
bindgen \
build-essential \
cargo \
cbindgen \
Expand Down Expand Up @@ -1448,6 +1467,7 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -1573,6 +1593,7 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -1678,6 +1699,7 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -1815,6 +1837,7 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -1902,6 +1925,7 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -2005,6 +2029,7 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -2139,6 +2164,7 @@ jobs:
zlib1g-dev \
exuberant-ctags \
dpdk-dev
- run: cargo install --root /usr --force --debug bindgen-cli
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: git config --global --add safe.directory /__w/suricata/suricata
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down Expand Up @@ -2257,6 +2283,7 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -2341,6 +2368,7 @@ jobs:
afl \
afl-clang \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -2406,6 +2434,7 @@ jobs:
sudo apt update
sudo apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
Expand Down Expand Up @@ -2545,13 +2574,15 @@ jobs:
apt update
apt -y install \
libpcre2-dev \
bindgen \
build-essential \
autoconf \
automake \
cargo \
git \
jq \
libtool \
libclang-dev \
libpcap-dev \
libnet1-dev \
libyaml-0-2 \
Expand Down Expand Up @@ -2643,13 +2674,15 @@ jobs:
apt -y install \
autoconf \
automake \
bindgen \
build-essential \
cmake \
curl \
dpdk-dev \
git \
jq \
make \
libclang-dev \
libpcre3 \
libpcre3-dbg \
libpcre3-dev \
Expand Down Expand Up @@ -2746,13 +2779,15 @@ jobs:
apt -y install \
autoconf \
automake \
bindgen \
build-essential \
cargo \
cmake \
curl \
git \
jq \
make \
libclang-dev \
libpcre3 \
libpcre3-dbg \
libpcre3-dev \
Expand Down Expand Up @@ -2827,13 +2862,15 @@ jobs:
apt -y install \
autoconf \
automake \
bindgen \
build-essential \
cmake \
curl \
dpdk-dev \
git \
jq \
make \
libclang-dev \
libpcre3 \
libpcre3-dbg \
libpcre3-dev \
Expand Down Expand Up @@ -2917,6 +2954,7 @@ jobs:
curl \
git \
jq \
libclang-dev \
libpcre2-dev \
libpcap-dev \
libnet1-dev \
Expand Down Expand Up @@ -2944,6 +2982,8 @@ jobs:
- name: Install Rust
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION_KNOWN -y
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install bindgen
run: cargo install bindgen-cli
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: git config --global --add safe.directory /__w/suricata/suricata
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down Expand Up @@ -2990,6 +3030,7 @@ jobs:
curl \
git \
jq \
libclang-dev \
libpcre2-dev \
libpcap-dev \
libnet1-dev \
Expand All @@ -3015,6 +3056,8 @@ jobs:
- name: Install Rust
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION_KNOWN -y
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install bindgen
run: cargo install bindgen-cli
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: git config --global --add safe.directory /__w/suricata/suricata
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down Expand Up @@ -3115,11 +3158,13 @@ jobs:
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool libyaml-devel pcre2-devel jansson-devel make mingw-w64-x86_64-libyaml mingw-w64-x86_64-pcre2 mingw-w64-x86_64-rust mingw-w64-x86_64-jansson unzip p7zip python-setuptools mingw-w64-x86_64-python-yaml mingw-w64-x86_64-jq mingw-w64-x86_64-libxml2
install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang automake1.16 automake-wrapper autoconf libtool libyaml-devel pcre2-devel jansson-devel make mingw-w64-x86_64-libyaml mingw-w64-x86_64-pcre2 mingw-w64-x86_64-rust mingw-w64-x86_64-jansson unzip p7zip python-setuptools mingw-w64-x86_64-python-yaml mingw-w64-x86_64-jq mingw-w64-x86_64-libxml2
# hack: install our own cbindgen system wide as we can't get the
# preinstalled one to be picked up by configure
- name: cbindgen
run: cargo install --root /usr --force --debug --version 0.24.3 cbindgen
- name: bindgen
run: cargo install --root /usr --force --debug bindgen-cli
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: git config --global --add safe.directory /__w/suricata/suricata
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down Expand Up @@ -3171,11 +3216,13 @@ jobs:
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool libyaml-devel pcre2-devel jansson-devel make mingw-w64-x86_64-libyaml mingw-w64-x86_64-pcre2 mingw-w64-x86_64-rust mingw-w64-x86_64-jansson unzip p7zip python-setuptools mingw-w64-x86_64-python-yaml mingw-w64-x86_64-jq mingw-w64-x86_64-libxml2 libpcap-devel mingw-w64-x86_64-libpcap
install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang automake1.16 automake-wrapper autoconf libtool libyaml-devel pcre2-devel jansson-devel make mingw-w64-x86_64-libyaml mingw-w64-x86_64-pcre2 mingw-w64-x86_64-rust mingw-w64-x86_64-jansson unzip p7zip python-setuptools mingw-w64-x86_64-python-yaml mingw-w64-x86_64-jq mingw-w64-x86_64-libxml2 libpcap-devel mingw-w64-x86_64-libpcap
# hack: install our own cbindgen system wide as we can't get the
# preinstalled one to be picked up by configure
- name: cbindgen
run: cargo install --root /usr --force --debug --version 0.24.3 cbindgen
- name: bindgen
run: cargo install --root /usr --force --debug bindgen-cli
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: git config --global --add safe.directory /__w/suricata/suricata
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down Expand Up @@ -3215,11 +3262,13 @@ jobs:
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool libyaml-devel pcre2-devel jansson-devel make mingw-w64-x86_64-libyaml mingw-w64-x86_64-pcre2 mingw-w64-x86_64-rust mingw-w64-x86_64-jansson unzip p7zip python-setuptools mingw-w64-x86_64-python-yaml mingw-w64-x86_64-jq mingw-w64-x86_64-libxml2 libpcap-devel mingw-w64-x86_64-libpcap
install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang automake1.16 automake-wrapper autoconf libtool libyaml-devel pcre2-devel jansson-devel make mingw-w64-x86_64-libyaml mingw-w64-x86_64-pcre2 mingw-w64-x86_64-rust mingw-w64-x86_64-jansson unzip p7zip python-setuptools mingw-w64-x86_64-python-yaml mingw-w64-x86_64-jq mingw-w64-x86_64-libxml2 libpcap-devel mingw-w64-x86_64-libpcap
# hack: install our own cbindgen system wide as we can't get the
# preinstalled one to be picked up by configure
- name: cbindgen
run: cargo install --root /usr --force --debug --version 0.24.3 cbindgen
- name: bindgen
run: cargo install --root /usr --force --debug bindgen-cli
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: git config --global --add safe.directory /__w/suricata/suricata
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down Expand Up @@ -3275,6 +3324,8 @@ jobs:
dnf -y install \
autoconf \
automake \
bindgen \
clang-devel \
diffutils \
numactl-devel \
dpdk-devel \
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2270,6 +2270,11 @@ fi
fi
fi

AC_PATH_PROG([BINDGEN], [bindgen], [no])
if test "x$BINDGEN" = "xno"; then
AC_MSG_ERROR([bindgen required])
fi
Comment on lines +2273 to +2276
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that when building from a distribution archive this wouldn't be required. Just like cbindgen.


AC_PATH_PROG(CBINDGEN, cbindgen, "no")
if test "x$CBINDGEN" != "xno"; then
cbindgen_version=$(cbindgen --version 2>&1 | cut -d' ' -f2-)
Expand Down
Loading
Loading