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

fail to build on Mac Catalina 10.15.6 #10

Closed
Eason0210 opened this issue Sep 5, 2020 · 4 comments
Closed

fail to build on Mac Catalina 10.15.6 #10

Eason0210 opened this issue Sep 5, 2020 · 4 comments

Comments

@Eason0210
Copy link

Eason0210 commented Sep 5, 2020

@cireu I try to build fuz.el on Mac with rustc 1.46.0 (04488afe3 2020-08-24), but it always failed with errors as below:
Can you help me to get this work?

➜  fuz git:(master) cargo build --release
   Compiling proc-macro2 v0.4.30
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.39
   Compiling libc v0.2.58
   Compiling cc v1.0.37
   Compiling memchr v2.2.1
   Compiling cfg-if v0.1.9
   Compiling glob v0.2.11
   Compiling version_check v0.1.5
   Compiling failure_derive v0.1.5
   Compiling byteorder v1.3.2
   Compiling regex v1.1.9
   Compiling ucd-util v0.1.3
   Compiling rustc-demangle v0.1.15
   Compiling bitflags v1.1.0
   Compiling lazy_static v1.3.0
   Compiling utf8-ranges v1.0.3
   Compiling unicode-width v0.1.5
   Compiling quick-error v1.2.2
   Compiling strsim v0.8.0
   Compiling bindgen v0.48.1
   Compiling ansi_term v0.11.0
   Compiling termcolor v1.0.5
   Compiling vec_map v0.8.1
   Compiling scopeguard v0.3.3
   Compiling strsim v0.7.0
   Compiling peeking_take_while v0.1.2
   Compiling fnv v1.0.6
   Compiling ident_case v1.0.1
   Compiling fuzzy-matcher v0.2.1
   Compiling log v0.4.6
   Compiling thread_local v0.3.6
   Compiling regex-syntax v0.6.8
   Compiling humantime v1.2.0
   Compiling textwrap v0.11.0
   Compiling nom v4.2.3
   Compiling clang-sys v0.26.4
   Compiling atty v0.2.11
   Compiling clap v2.33.0
   Compiling quote v0.6.13
   Compiling hashbrown v0.1.8
   Compiling aho-corasick v0.7.4
   Compiling backtrace-sys v0.1.30
   Compiling libloading v0.5.2
   Compiling cexpr v0.3.5
The following warnings were emitted during compilation:

warning: src/os/unix/global_static.c:1:10: fatal error: 'pthread.h' file not found
warning: #include <pthread.h>
warning:          ^~~~~~~~~~~
warning: 1 error generated.

error: failed to run custom build command for `libloading v0.5.2`

Caused by:
  process didn't exit successfully: `/Users/aq02/myemacs/site-lisp/extensions/fuz/target/release/build/libloading-108cebee36ccfdb2/build-script-build` (exit code: 1)
  --- stdout
  TARGET = Some("x86_64-apple-darwin")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-apple-darwin")
  CC_x86_64-apple-darwin = None
  CC_x86_64_apple_darwin = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-apple-darwin = None
  CFLAGS_x86_64_apple_darwin = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3")
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-o" "/Users/aq02/myemacs/site-lisp/extensions/fuz/target/release/build/libloading-08ad8d0cc830e96c/out/src/os/unix/global_static.o" "-c" "src/os/unix/global_static.c"
  cargo:warning=src/os/unix/global_static.c:1:10: fatal error: 'pthread.h' file not found
  cargo:warning=#include <pthread.h>
  cargo:warning=         ^~~~~~~~~~~
  cargo:warning=1 error generated.
  exit code: 1
  --- stderr

  error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-o" "/Users/aq02/myemacs/site-lisp/extensions/fuz/target/release/build/libloading-08ad8d0cc830e96c/out/src/os/unix/global_static.o" "-c" "src/os/unix/global_static.c" with args "cc" did not execute successfully (status code exit code: 1).

warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: src/libbacktrace/alloc.c:35:10: fatal error: 'errno.h' file not found
warning: #include <errno.h>
warning:          ^~~~~~~~~
warning: 1 error generated.
@cireu
Copy link
Collaborator

cireu commented Sep 5, 2020

Do you have Clang & LLVM installed?

@Eason0210
Copy link
Author

Eason0210 commented Sep 5, 2020

yes, the Clang and llvm was installed.

➜  fuz git:(master) clang --version
clang version 10.0.1
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

@cireu
Copy link
Collaborator

cireu commented Sep 7, 2020

Sorry, I don't have a Mac and don't know why it fails. :(

@Eason0210
Copy link
Author

Now I can build it successfully on Mac Big Sur. May be it's the env issue of my .zshenv and .zshrc

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

2 participants