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

Compiling issues on windows #28

Open
Tracked by #23
yukibtc opened this issue Apr 12, 2024 · 2 comments · May be fixed by #51
Open
Tracked by #23

Compiling issues on windows #28

yukibtc opened this issue Apr 12, 2024 · 2 comments · May be fixed by #51

Comments

@yukibtc
Copy link

yukibtc commented Apr 12, 2024

Hey, I'm releasing a new version of rust-nostr and I noticed issues when compiling the python bindings for windows targets.

The following warnings were emitted during compilation:

warning: [email protected]: cl : Command line error D8021 : invalid numeric argument '/Wno-sign-compare'

error: failed to run custom build command for `nostrdb v0.3.2`

Caused by:
  process didn't exit successfully: `D:\a\nostr\nostr\target\release\build\nostrdb-b56ad8f182f2e273\build-script-build` (exit code: 1)
  --- stdout
  TARGET = Some("x86_64-pc-windows-msvc")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-pc-windows-msvc")
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  running: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "nostrdb/deps/lmdb" "-I" "nostrdb/deps/flatcc/include" "-I" "nostrdb/deps/secp256k1/include" "-W4" "-Wno-sign-compare" "-Wno-misleading-indentation" "-Wno-unused-function" "-Wno-unused-parameter" "-FoD:\\a\\nostr\\nostr\\target\\x86_64-pc-windows-msvc\\release\\build\\nostrdb-1b0d66dae74807a4\\out\\nostrdb/src/nostrdb.o" "-c" "nostrdb/src/nostrdb.c"
  cargo:warning=cl : Command line error D8021 : invalid numeric argument '/Wno-sign-compare'

  exit code: 2

  --- stderr


  error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "nostrdb/deps/lmdb" "-I" "nostrdb/deps/flatcc/include" "-I" "nostrdb/deps/secp256k1/include" "-W4" "-Wno-sign-compare" "-Wno-misleading-indentation" "-Wno-unused-function" "-Wno-unused-parameter" "-FoD:\\a\\nostr\\nostr\\target\\x86_64-pc-windows-msvc\\release\\build\\nostrdb-1b0d66dae74807a4\\out\\nostrdb/src/nostrdb.o" "-c" "nostrdb/src/nostrdb.c" with args "cl.exe" did not execute successfully (status code exit code: 2).

Here you can see the GitHub actions: https://github.com/rust-nostr/nostr/actions/runs/8663236733/job/23756949244

yukibtc added a commit to rust-nostr/nostr that referenced this issue Apr 12, 2024
@jb55
Copy link
Contributor

jb55 commented Apr 12, 2024

going to add a cross build github action on nostrdb-rs. I see what the issue is, looks like I need a conditional compilation flag for windows.

@jb55
Copy link
Contributor

jb55 commented Apr 12, 2024

looks like I'll need a windows thread backend!

D:\a\nostrdb-rs\nostrdb-rs\nostrdb\src\protected_queue.h(15): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

@jb55 jb55 linked a pull request Nov 23, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants