alexcrichton / alexcrichton/nghttp2-rs

Recommended way to link to libnghttp2

Ouverte
#2 1 commentaire 6 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
28
Forks
10
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hi, on compilation I get the following error
```
libnghttp2-sys-67ea4c7b35af0690/build-script-build` (exit code: 1)
--- stdout
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-apple-darwin")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = Some("clang")
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
running: "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=x86_64-apple-darwin" "-I" "nghttp2/lib/includes" "-I" "/private/tmp/nix-build-vector-0.14.0.drv-0/source/target/debug/build/libnghttp2-sys-a9070bd53e651889/out/i/include" "-DNGHTTP2_STATICLIB" "-DHAVE_NETINET_IN" "-DHAVE_ARPA_INET_H" "-o" "/private/tmp/nix-build-vector-0.14.0.drv-0/source/target/debug/build/libnghttp2-sys-a9070bd53e651889/out/i/lib/nghttp2/lib/nghttp2_buf.o" "-c" "nghttp2/lib/nghttp2_buf.c"
cargo:warning=In file included from nghttp2/lib/nghttp2_buf.c:25:
cargo:warning=In file included from nghttp2/lib/nghttp2_buf.h:32:
cargo:warning=nghttp2/lib/includes/nghttp2/nghttp2.h:55:10: fatal error: 'nghttp2/nghttp2ver.h' file not found
cargo:warning=#include
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~
cargo:warning=1 error generated.
exit code: 1
running: "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=x86_64-apple-darwin" "-I" "nghttp2/lib/includes" "-I" "/private/tmp/nix-build-vector-0.14.0.drv-0/source/target/debug/build/libnghttp2-sys-a9070bd53e651889/out/i/include" "-DNGHTTP2_STATICLIB" "-DHAVE_NETINET_IN" "-DHAVE_ARPA_INET_H" "-o" "/private/tmp/nix-build-vector-0.14.0.drv-0/source/target/debug/build/libnghttp2-sys-a9070bd53e651889/out/i/lib/nghttp2/lib/nghttp2_callbacks.o" "-c" "nghttp2/lib/nghttp2_callbacks.c"
cargo:warning=In file included from nghttp2/lib/nghttp2_callbacks.c:25:
cargo:warning=In file included from nghttp2/lib/nghttp2_callbacks.h:32:
cargo:warning=nghttp2/lib/includes/nghttp2/nghttp2.h:55:10: fatal error: 'nghttp2/nghttp2ver.h' file not found
cargo:warning=#include
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~
cargo:warning=1 error generated.
exit code: 1

--- stderr

error occurred: Command "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=x86_64-apple-darwin" "-I" "nghttp2/lib/includes" "-I" "/private/tmp/nix-build-vector-0.14.0.drv-0/source/target/debug/build/libnghttp2-sys-a9070bd53e651889/out/i/include" "-DNGHTTP2_STATICLIB" "-DHAVE_NETINET_IN" "-DHAVE_ARPA_INET_H" "-o" "/private/tmp/nix-build-vector-0.14.0.drv-0/source/target/debug/build/libnghttp2-sys-a9070bd53e651889/out/i/lib/nghttp2/lib/nghttp2_buf.o" "-c" "nghttp2/lib/nghttp2_buf.c" with args "clang" did not execute successfully (status code exit code: 1).
```

it looks like it's because of a missing libnghttp2 include flag.
What is the recommended way to pass an external libnghttp2 for compilation?
Is it something like
```
RUSTFLAGS="-C link-args='-I /usr/lib/libnghttp2/include'" cargo build
```

just for reference I'm trying to run `cargo test` on vector vector.dev/ which has a dependency on curl-sys which has a dependency on nghttp2-rs

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.