{"action":"closed","issue":{"url":"https://api.github.com/repos/sfackler/rust-openssl/issues/406","repository_url":"https://api.github.com/repos/sfackler/rust-openssl","labels_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/406/labels{/name}","comments_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/406/comments","events_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/406/events","html_url":"https://github.com/sfackler/rust-openssl/issues/406","id":158909785,"number":406,"title":"Build script doesn't rebuild when OPENSSL_{LIB,INCLUDE}_DIR change","user":{"login":"luser","id":286001,"avatar_url":"https://avatars.githubusercontent.com/u/286001?v=3","gravatar_id":"","url":"https://api.github.com/users/luser","html_url":"https://github.com/luser","followers_url":"https://api.github.com/users/luser/followers","following_url":"https://api.github.com/users/luser/following{/other_user}","gists_url":"https://api.github.com/users/luser/gists{/gist_id}","starred_url":"https://api.github.com/users/luser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luser/subscriptions","organizations_url":"https://api.github.com/users/luser/orgs","repos_url":"https://api.github.com/users/luser/repos","events_url":"https://api.github.com/users/luser/events{/privacy}","received_events_url":"https://api.github.com/users/luser/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-07T12:24:38Z","updated_at":"2016-08-07T23:31:49Z","closed_at":"2016-08-07T23:31:49Z","body":"I'm on OS X 10.11.5. I installed openssl via Homebrew, but forgot to set the environment variables. Building `openssl-rust` fails (obviously), but then setting `OPENSSL_{LIB,INCLUDE}_DIR` doesn't fix the build, I have to `cargo clean` to make it work:\r\n\r\n```\r\nmbp:openssl luser$ cargo build\r\n    Updating registry `https://github.com/rust-lang/crates.io-index`\r\n   Compiling lazy_static v0.2.1\r\n   Compiling libc v0.2.11\r\n   Compiling pkg-config v0.3.8\r\n   Compiling gcc v0.3.28\r\n   Compiling bitflags v0.7.0\r\n   Compiling openssl-sys v0.7.13 (file:///Users/luser/build/rust-openssl/openssl-sys)\r\n   Compiling openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)\r\n   Compiling openssl-sys-extras v0.7.13 (file:///Users/luser/build/rust-openssl/openssl-sys-extras)\r\nBuild failed, waiting for other jobs to finish...\r\nerror: failed to run custom build command for `openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)`\r\nProcess didn't exit successfully: `/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/build-script-build` (exit code: 101)\r\n--- stdout\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nOPT_LEVEL = Some(\"0\")\r\nPROFILE = Some(\"debug\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\ndebug=true opt-level=0\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nCC_x86_64-apple-darwin = None\r\nCC_x86_64_apple_darwin = None\r\nHOST_CC = None\r\nCC = None\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nCFLAGS_x86_64-apple-darwin = None\r\nCFLAGS_x86_64_apple_darwin = None\r\nHOST_CFLAGS = None\r\nCFLAGS = None\r\nrunning: \"cc\" \"-O0\" \"-ffunction-sections\" \"-fdata-sections\" \"-g\" \"-m64\" \"-fPIC\" \"-o\" \"/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/out/src/c_helpers.o\" \"-c\" \"src/c_helpers.c\"\r\nExitStatus(ExitStatus(256))\r\n\r\n\r\ncommand did not execute successfully, got: exit code: 1\r\n\r\n\r\n\r\n--- stderr\r\nsrc/c_helpers.c:1:10: fatal error: 'openssl/ssl.h' file not found\r\n#include <openssl/ssl.h>\r\n         ^\r\n1 error generated.\r\nthread '<main>' panicked at 'explicit panic', /Users/luser/.cargo/registry/src/github.com-88ac128001ac3a9a/gcc-0.3.28/src/lib.rs:840\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n\r\nmbp:openssl luser$ export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib\r\nmbp:openssl luser$ export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include\r\nmbp:openssl luser$ cargo build\r\n   Compiling openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)\r\n   Compiling openssl-sys-extras v0.7.13 (file:///Users/luser/build/rust-openssl/openssl-sys-extras)\r\nBuild failed, waiting for other jobs to finish...\r\nerror: failed to run custom build command for `openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)`\r\nProcess didn't exit successfully: `/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/build-script-build` (exit code: 101)\r\n--- stdout\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nOPT_LEVEL = Some(\"0\")\r\nPROFILE = Some(\"debug\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\ndebug=true opt-level=0\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nCC_x86_64-apple-darwin = None\r\nCC_x86_64_apple_darwin = None\r\nHOST_CC = None\r\nCC = None\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nTARGET = Some(\"x86_64-apple-darwin\")\r\nHOST = Some(\"x86_64-apple-darwin\")\r\nCFLAGS_x86_64-apple-darwin = None\r\nCFLAGS_x86_64_apple_darwin = None\r\nHOST_CFLAGS = None\r\nCFLAGS = None\r\nrunning: \"cc\" \"-O0\" \"-ffunction-sections\" \"-fdata-sections\" \"-g\" \"-m64\" \"-fPIC\" \"-o\" \"/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/out/src/c_helpers.o\" \"-c\" \"src/c_helpers.c\"\r\nExitStatus(ExitStatus(256))\r\n\r\n\r\ncommand did not execute successfully, got: exit code: 1\r\n\r\n\r\n\r\n--- stderr\r\nsrc/c_helpers.c:1:10: fatal error: 'openssl/ssl.h' file not found\r\n#include <openssl/ssl.h>\r\n         ^\r\n1 error generated.\r\nthread '<main>' panicked at 'explicit panic', /Users/luser/.cargo/registry/src/github.com-88ac128001ac3a9a/gcc-0.3.28/src/lib.rs:840\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n```"}}
{"actor":{"display_login":"sfackler"}}