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 broken for musl targets #359

Closed
skeet70 opened this issue Dec 15, 2022 · 15 comments
Closed

Build broken for musl targets #359

skeet70 opened this issue Dec 15, 2022 · 15 comments

Comments

@skeet70
Copy link

skeet70 commented Dec 15, 2022

I'm not sure if you have any features taking advantage of the most recent zeromq-src-rs, but I opened an upstream issue about the problem there. zeromq-src 0.10.0 doesn't have this build issue. This broke our downstream builds, when we started consuming zmq 0.10.0.

@skeet70 skeet70 changed the title Bulid broken on Alpine ARM Build broken for musl targets Dec 15, 2022
@skeet70
Copy link
Author

skeet70 commented Dec 15, 2022

jean-airoldie/zeromq-src-rs#22 upstream will fix this issue as long as the resulting release is consumed.

@andrewdavidmackenzie
Copy link

andrewdavidmackenzie commented Dec 16, 2022

I think this is the same problem that broke my builds, since last night.
Would you agree @skeet70 ?

Full log:

| The following warnings were emitted during compilation:
| 
| warning: c++: error: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src/address.cpp: No such file or directory
| warning: c++: fatal error: no input files
| warning: compilation terminated.
| warning: c++: error: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src/channel.cpp: No such file or directory
| warning: c++: fatal error: no input files
| warning: compilation terminated.
| 
| error: failed to run custom build command for `zmq-sys v0.12.0`
| 
| Caused by:
|   process didn't exit successfully: `/Users/andrew/workspace/flow/target/release/build/zmq-sys-d12e845f99da8684/build-script-main` (exit status: 1)
|   --- stdout
|   cargo:rerun-if-changed=build/main.rs
|   cargo:rerun-if-env-changed=PROFILE
|   TARGET = Some("x86_64-unknown-linux-gnu")
|   OPT_LEVEL = Some("3")
|   HOST = Some("x86_64-unknown-linux-gnu")
|   cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
|   CXX_x86_64-unknown-linux-gnu = None
|   cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
|   CXX_x86_64_unknown_linux_gnu = None
|   cargo:rerun-if-env-changed=HOST_CXX
|   HOST_CXX = None
|   cargo:rerun-if-env-changed=CXX
|   CXX = None
|   cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
|   CXXFLAGS_x86_64-unknown-linux-gnu = None
|   cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
|   CXXFLAGS_x86_64_unknown_linux_gnu = None
|   cargo:rerun-if-env-changed=HOST_CXXFLAGS
|   HOST_CXXFLAGS = None
|   cargo:rerun-if-env-changed=CXXFLAGS
|   CXXFLAGS = None
|   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
|   CRATE_CC_NO_DEFAULTS = None
|   DEBUG = Some("false")
|   CARGO_CFG_TARGET_FEATURE = Some("fxsr,llvm14-builtins-abi,sse,sse2")
|   running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/include" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/external/sha1" "-I" "/Users/andrew/workspace/flow/target/release/build/zmq-sys-ad464d2909ae4056/out" "-Wall" "-Wextra" "-DZMQ_BUILD_TESTS=OFF" "-DZMQ_USE_CV_IMPL_STL11=1" "-DZMQ_STATIC=1" "-DZMQ_USE_BUILTIN_SHA1=1" "-DZMQ_HAVE_WS=1" "-DZMQ_IOTHREAD_POLLER_USE_EPOLL=1" "-DZMQ_POLL_BASED_ON_POLL=1" "-DZMQ_HAVE_IPC=1" "-DHAVE_STRNLEN=1" "-DZMQ_HAVE_UIO=1" "-o" "/Users/andrew/workspace/flow/target/release/build/zmq-sys-ad464d2909ae4056/out/lib/68f469665e3a5554-address.o" "-c" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src/address.cpp"
|   cargo:warning=c++: error: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src/address.cpp: No such file or directory
|   cargo:warning=c++: fatal error: no input files
|   cargo:warning=compilation terminated.
|   exit status: 1
|   running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/include" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/external/sha1" "-I" "/Users/andrew/workspace/flow/target/release/build/zmq-sys-ad464d2909ae4056/out" "-Wall" "-Wextra" "-DZMQ_BUILD_TESTS=OFF" "-DZMQ_USE_CV_IMPL_STL11=1" "-DZMQ_STATIC=1" "-DZMQ_USE_BUILTIN_SHA1=1" "-DZMQ_HAVE_WS=1" "-DZMQ_IOTHREAD_POLLER_USE_EPOLL=1" "-DZMQ_POLL_BASED_ON_POLL=1" "-DZMQ_HAVE_IPC=1" "-DHAVE_STRNLEN=1" "-DZMQ_HAVE_UIO=1" "-o" "/Users/andrew/workspace/flow/target/release/build/zmq-sys-ad464d2909ae4056/out/lib/68f469665e3a5554-channel.o" "-c" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src/channel.cpp"
|   cargo:warning=c++: error: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src/channel.cpp: No such file or directory
|   cargo:warning=c++: fatal error: no input files
|   cargo:warning=compilation terminated.
|   exit status: 1
| 
|   --- stderr
| 
| 
|   error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/include" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/external/sha1" "-I" "/Users/andrew/workspace/flow/target/release/build/zmq-sys-ad464d2909ae4056/out" "-Wall" "-Wextra" "-DZMQ_BUILD_TESTS=OFF" "-DZMQ_USE_CV_IMPL_STL11=1" "-DZMQ_STATIC=1" "-DZMQ_USE_BUILTIN_SHA1=1" "-DZMQ_HAVE_WS=1" "-DZMQ_IOTHREAD_POLLER_USE_EPOLL=1" "-DZMQ_POLL_BASED_ON_POLL=1" "-DZMQ_HAVE_IPC=1" "-DHAVE_STRNLEN=1" "-DZMQ_HAVE_UIO=1" "-o" "/Users/andrew/workspace/flow/target/release/build/zmq-sys-ad464d2909ae4056/out/lib/68f469665e3a5554-address.o" "-c" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/vendor/src/address.cpp" with args "c++" did not execute successfully (status code exit status: 1).
| 
| 
| warning: build failed, waiting for other jobs to finish...
| error: failed to compile `flowr v0.90.0 (/Users/andrew/workspace/flow/flowr)`, intermediate artifacts can be found at `/Users/andrew/workspace/flow/target`
[Rust/build-2]   ❌  Failure - Main install-flowr
[Rust/build-2] exitcode '101': failure
[Rust/build-2] 🏁  Job failed
Error: Job 'build' failed

I'm on macos and

❯ rustc --version
rustc 1.68.0-nightly (ec56537c4 2022-12-15)

@skeet70
Copy link
Author

skeet70 commented Dec 16, 2022

@andrewdavidmackenzie I don't think that's the same issue. zeromq-src-0.2.3+4.3.4 is the release from 10 hrs ago to fix this issue. This was the only change in that release (which notably is inside the linux conditional already. I don't see how it could have caused that problem. If you force zeromq-src back to 0.2.2+4.3.4 in a lockfile or subdependency specification, does it resolve the build issue for you?

Are you on MacOS Intel or ARM64 running the build? Is the build running in a container or on your hardware directly? Wherever that build is running, what version of the git submodule in zeromq-src/vendor is checked out? If it's updating from a pre-0.2.0 version of zeromq-src it would have libzmq 4.3.2 checked out, which didn't have channel.cpp in it AFAIK. Maybe it failed to check out the more recent version of the submodule somehow?

@andrewdavidmackenzie
Copy link

andrewdavidmackenzie commented Dec 16, 2022

I'll try forcing it back in a while when back at keyboard.

I'm on macos (EDIT: Intel) and it fails native and in docker (with "act") and fails identically on my Linux laptop too, and in GHAction, without any code change from me overnight.

@skeet70
Copy link
Author

skeet70 commented Dec 16, 2022

Looking at the released versions, I think the releaser forgot to package the vendored code. The size of the most recent release is a fraction of the old sizes.

@andrewdavidmackenzie
Copy link

When I looked in the path reported in the error, only lib.rs was there.
Where do you think is the correct place to report this?

@skeet70
Copy link
Author

skeet70 commented Dec 16, 2022

I opened jean-airoldie/zeromq-src-rs#23, I think it was a mistake in the release process. If you pin to zeromq-src 0.2.2+4.3.4 somehow for now I think it will fix your build.

@andrewdavidmackenzie
Copy link

OK, this is interesting. In my .lock file it is already 0.2.2

[[package]]
name = "zeromq-src"
version = "0.2.2+4.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a96d35e274fb497855b75e26ae12ddec3d4dfcf4a43883ec41f359bedb65789b"
dependencies = [
 "cc",
 "dircpy",
]

but the path in the error is 0.2.3!!!

@andrewdavidmackenzie
Copy link

Appears in $HOME/.cargo/ ...

❯ rg "0.2.3\+4.3.4"
registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/Cargo.toml
15:version = "0.2.3+4.3.4"

registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.2.3+4.3.4/Cargo.toml.orig
3:version = "0.2.3+4.3.4"

Something is up with my install by the looks of it?

@andrewdavidmackenzie
Copy link

Cargo update, and it's now 0.2.3 in Cargo.lock, but the error is the same off-course.. :-(

@andrewdavidmackenzie
Copy link

I cargo update -p zeromq-src --precise 0.2.2+4.3.4 (same effect as editing Cargo.toml manually it seems to me)
but that didn't fix it either. Seems that cargo still retains some reference to "0.2.3+4.3.4"

@andrewdavidmackenzie
Copy link

In a new project, Adding "zeromq-src", version = "0.2.2+4.3.4" as a dependency in Cargo.toml, leads to it appearing as "zeromq-src", "0.2.3+4.3.4" in the Cargo.lock file !! :-( I'm lost I think.

@andrewdavidmackenzie
Copy link

Deleted binary files in .cargo and completely rebuilt cargo's cache and index. no fix.
I think i'm stuck and will have to wait for the real fix.

@masonhieb
Copy link

Just found this issue, looks like I'm not the only person suddenly getting these errors! I had builds working last night that are now failing with errors like .../zeromq-src-0.2.3+4.3.4/vendor/src/client.cpp: No such file or directory.

@skeet70
Copy link
Author

skeet70 commented Dec 17, 2022

jean-airoldie/zeromq-src-rs#23 0.2.4 has gone out and both issues are fixed for me locally, building current versions of zmq. Anyone whose systems bumped to 0.2.3 should get bumped to 0.2.4 and things should start working again. I'm going to close this issue as it seems to be fixed now. Someone else can re-open if it's newly broken for them on 0.2.4.

@skeet70 skeet70 closed this as completed Dec 17, 2022
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

3 participants