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

build failed on linux #56

Open
eric-stokes-architect opened this issue May 28, 2023 · 1 comment
Open

build failed on linux #56

eric-stokes-architect opened this issue May 28, 2023 · 1 comment

Comments

@eric-stokes-architect
Copy link

Hi, I'm trying to build an otherwise empty crate to test this out and the build fails. I'm on ubuntu 22.04 LTS. I have Mathematica 13.2 installed and confirmed working.

error: failed to run custom build command for `wolfram-library-link-sys v0.2.9`

Caused by:
  process didn't exit successfully: `/home/eric/proj/netidx-wolfram/target/debug/build/wolfram-library-link-sys-08fae24c8dfa08ef/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=RUST_WOLFRAM_LOCATION
  cargo:rerun-if-env-changed=WOLFRAM_APP_DIRECTORY
  cargo:rerun-if-env-changed=WOLFRAM_LIBRARY_LINK_C_INCLUDES_DIRECTORY
  cargo:rerun-if-env-changed=WOLFRAM_C_INCLUDES

  --- stderr
  thread 'main' panicked at 'unable to get LibraryLink C includes directory: Error(Undiscoverable { resource: "LibraryLink C includes directory", environment_variable: Some("WOLFRAM_LIBRARY_LINK_C_INCLUDES_DIRECTORY") })', /home/eric/.cargo/registry/src/github.com-1ecc6299db9ec823/wolfram-library-link-sys-0.2.9/build.rs:61:14
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `wstp-sys v0.2.7`

Caused by:
  process didn't exit successfully: `/home/eric/proj/netidx-wolfram/target/debug/build/wstp-sys-c95420de765c9c9f/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=RUST_WOLFRAM_LOCATION
  cargo:rerun-if-env-changed=WOLFRAM_APP_DIRECTORY
  cargo:rerun-if-env-changed=WSTP_COMPILER_ADDITIONS_DIRECTORY
  cargo:rerun-if-env-changed=WSTP_COMPILER_ADDITIONS

  --- stderr
  thread 'main' panicked at 'unable to get WSTP static library path: Error(Undiscoverable { resource: "WSTP CompilerAdditions directory", environment_variable: Some("WSTP_COMPILER_ADDITIONS_DIRECTORY") })', /home/eric/.cargo/registry/src/github.com-1ecc6299db9ec823/wstp-sys-0.2.7/build.rs:206:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@eric-stokes-architect
Copy link
Author

I got this to build by setting the following environment variables,

WOLFRAM_LIBRARY_LINK_C_INCLUDES_DIRECTORY=/usr/local/Wolfram/Mathematica/13.2/SystemFiles/IncludeFiles/C
WSTP_COMPILER_ADDITIONS_DIRECTORY=/usr/local/Wolfram/Mathematica/13.2/SystemFiles/Links/WSTP/DeveloperKit/Linux-x86-64/CompilerAdditions

Not sure why the build script couldn't figure those out automatically given that

MATHEMATICA_HOME=/usr/local/Wolfram/Mathematica/13.2

was definitely set.

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

No branches or pull requests

1 participant