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

Can't compile. stdatomic.h not found in Window 10 #37

Open
Multirious opened this issue Mar 18, 2023 · 4 comments
Open

Can't compile. stdatomic.h not found in Window 10 #37

Multirious opened this issue Mar 18, 2023 · 4 comments

Comments

@Multirious
Copy link

Multirious commented Mar 18, 2023

I'm not sure what went wrong with the installation process.
I did exactly what tesseract-sys/leptonica-sys told me to do. I also installed leptonica:x64-windows-static-md because one of the build errors is about missing that installation.
Before actually being able to install with vcpkg: I also got an error trying to vcpkg integrate install; from searching and screwing around, I seem to kinda fix it by adding more components to Visual Studio.

Error:

   Compiling leptonica-sys v0.4.4
error: failed to run custom build command for `leptonica-sys v0.4.4`

Caused by:
  process didn't exit successfully: `C:\Users\Windows10\Projects\Rust\cargo_target\debug\build\leptonica-sys-b0ac22be7bbc120f\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=LEPTONICA_INCLUDE_PATH
  cargo:rerun-if-env-changed=LEPTONICA_LINK_PATHS
  cargo:rerun-if-env-changed=LEPTONICA_LINK_LIBS
  cargo:rustc-link-search=native=C:\Users\Windows10\Desktop\vcpkg\installed\x64-windows-static-md\lib
  cargo:rustc-link-lib=leptonica-1.83.1
  cargo:rustc-link-lib=zlib
  cargo:rustc-link-lib=tiff
  cargo:rustc-link-lib=lzma
  cargo:rustc-link-lib=jpeg
  cargo:rustc-link-lib=turbojpeg
  cargo:rustc-link-lib=openjp2
  cargo:rustc-link-lib=libwebpdecoder
  cargo:rustc-link-lib=libwebpdemux
  cargo:rustc-link-lib=libwebpmux
  cargo:rustc-link-lib=libwebp
  cargo:rustc-link-lib=libsharpyuv
  cargo:rustc-link-lib=libpng16
  cargo:rustc-link-lib=gif

  --- stderr
  C:\Users\Windows10\Desktop\vcpkg\installed\x64-windows-static-md\include\leptonica/environ.h:69:10: fatal error: 'stdatomic.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("C:\\Users\\Windows10\\Desktop\\vcpkg\\installed\\x64-windows-static-md\\include\\leptonica/environ.h:69:10: fatal error: 'stdatomic.h' file not found\n")', C:\Users\Windows10\.cargo\registry\src\github.com-1ecc6299db9ec823\leptonica-sys-0.4.4\build.rs:87:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@ccouzens
Copy link
Collaborator

ccouzens commented Mar 18, 2023

Hi,

I'm sorry you're having this build issue.

I'm going to transfer this issue to https://github.com/ccouzens/leptonica-sys/

I don't know much about vcpk and can't easily replicate Windows build issues.

It looks like this line is causing you issues:
https://github.com/DanBloomberg/leptonica/blob/1.83/src/environ.h#L69

stdatomic.h looks like it's usually provided by the c compiler. https://en.wikibooks.org/wiki/C_Programming/stdatomic.h

I don't suppose you can easily see if vcpk installed stdatomic.h for you? Possibly it's there, but not being picked up. Or maybe it wasn't installed by vcpk.

@ccouzens
Copy link
Collaborator

I'm going to transfer this issue to https://github.com/ccouzens/leptonica-sys/

I can't do this, because the projects are different users.

@Multirious
Copy link
Author

I'm going to transfer this issue to https://github.com/ccouzens/leptonica-sys/

I can't do this, because the projects are different users.

Should I recreate this issue into that repository?

@ccouzens
Copy link
Collaborator

Yes please, that would be helpful

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