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 fails on OpenBSD 7.3 #146

Closed
andinus opened this issue Jul 4, 2023 · 5 comments · Fixed by #147
Closed

Build fails on OpenBSD 7.3 #146

andinus opened this issue Jul 4, 2023 · 5 comments · Fixed by #147

Comments

@andinus
Copy link

andinus commented Jul 4, 2023

Faced when trying to build static-web-server:

The following warnings were emitted during compilation:                                                                                                                                      
                                                                                              
warning: src/low_level/extract.c:26:7: error: use of undeclared identifier 'SI_MESGQ'
warning:     { SI_MESGQ, -1, 5 },  
warning:       ^
warning: src/low_level/extract.c:36:37: error: invalid application of 'sizeof' to an incomplete type 'struct Const []'
warning:     const size_t const_len = sizeof consts / sizeof *consts;
warning:                                     ^~~~~~
warning: 2 errors generated.
                                                                                                                                                                                             
error: failed to run custom build command for `signal-hook v0.3.15`                                                                                                                          
                                               
Caused by:
  process didn't exit successfully: `/home/andinus/dev/other/static-web-server-2.19.0/target/debug/build/signal-hook-7482100cb62ccacc/build-script-build` (exit status: 1)
  --- stdout                                                                                  
  TARGET = Some("x86_64-unknown-openbsd")                                                                                                                                                    
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-unknown-openbsd")
  cargo:rerun-if-env-changed=CC_x86_64-unknown-openbsd
  CC_x86_64-unknown-openbsd = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_openbsd
  CC_x86_64_unknown_openbsd = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-openbsd
  CFLAGS_x86_64-unknown-openbsd = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_openbsd
  CFLAGS_x86_64_unknown_openbsd = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-o" "/home/andinus/dev/other/static-web-server-2.19.0/target/debug/build/signal-hook-932164e25ff6283b/out/src/low_level/extract.o" "-c" "src/low_level/extract.c"
  cargo:warning=src/low_level/extract.c:26:7: error: use of undeclared identifier 'SI_MESGQ'
  cargo:warning=    { SI_MESGQ, -1, 5 },
  cargo:warning=      ^
  cargo:warning=src/low_level/extract.c:36:37: error: invalid application of 'sizeof' to an incomplete type 'struct Const []'
  cargo:warning=    const size_t const_len = sizeof consts / sizeof *consts;
  cargo:warning=                                    ^~~~~~
  cargo:warning=2 errors generated.
  exit status: 1

  --- stderr


  error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-o" "/home/andinus/dev/other/static-web-server-2.19.0/target/debug/build/signal-hook-932164e25ff6283b/out/src/low_level/extract.o" "-c" "src/low_level/extract.c" with args "cc" did not execute successfully (status code exit status: 1).

@vorner
Copy link
Owner

vorner commented Jul 4, 2023

Hello.

According to Posix, that SI_MESGQ should be available. Can you somehow find out if OpenBSD just misses that thing (which is related to functions like mq_notify), or if it's available in some other header? I don't have that OS around and I would like to decide on how to fix that problem based on the info.

@andinus
Copy link
Author

andinus commented Jul 5, 2023

It seems like OpenBSD is missing that: boostorg/test#231

vorner added a commit that referenced this issue Jul 6, 2023
It seems to be missing the SI_MESGQ constant.

Fixes #146.
@vorner
Copy link
Owner

vorner commented Jul 6, 2023

OK, if this is a good enough fix for Boost, it should be good enough for this crate.

Can you test #147 before I merge it?

@andinus
Copy link
Author

andinus commented Jul 7, 2023

I ran cargo test ; cargo build on openbsd-compile-fix branch, it works. Thanks!

@andinus andinus closed this as completed Jul 7, 2023
@vorner
Copy link
Owner

vorner commented Jul 15, 2023

Released to crates.io as 0.3.16. Thank you.

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