zerotier / ZeroTierOne

A Smart Ethernet Switch for Earth
https://zerotier.com
Other
14.64k stars 1.71k forks source link

Build issue F39 #2261

Open volga629-1 opened 8 months ago

volga629-1 commented 8 months ago

Hello Everyone, I am trying to generate RPM and build is failing for version 1.12.2. If run from spec file build failing and just from shell everything completes as expected . Seems like export is not taking effect

export PATH=//home/volga629/.cargo/bin:$PATH; cd zeroidc && cargo build --release
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --release --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: Unrecognized option: 'release'

make: *** [make-linux.mk:436: zeroidc] Error 101
error: Bad exit status from /var/tmp/rpm-tmp.Zsk9zW (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.Zsk9zW (%build)
[volga629@canldev01-fedora39 SPECS]$ cd ../BUILD/zerotierone-1.12.2
[volga629@canldev01-fedora39 zerotierone-1.12.2]$ export PATH=//home/volga629/.cargo/bin:$PATH; cd zeroidc && cargo build --release
   Compiling libc v0.2.147
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling serde v1.0.183
   Compiling serde_derive v1.0.183
   Compiling quote v1.0.33
   Compiling cfg-if v1.0.0
   Compiling cc v1.0.82
   Compiling once_cell v1.18.0
   Compiling itoa v1.0.9
   Compiling vcpkg v0.2.15
   Compiling pin-project-lite v0.2.12
   Compiling pkg-config v0.3.27
   Compiling bytes v1.4.0
   Compiling version_check v0.9.4
   Compiling openssl-sys v0.9.91
   Compiling syn v1.0.109
   Compiling futures-core v0.3.28
   Compiling typenum v1.16.0
   Compiling generic-array v0.14.7
   Compiling syn v2.0.29
   Compiling serde_json v1.0.105
   Compiling num_cpus v1.16.0
   Compiling socket2 v0.5.3
   Compiling mio v0.8.8
   Compiling slab v0.4.8
   Compiling num-traits v0.2.16
   Compiling futures-task v0.3.28
   Compiling memchr v2.5.0
   Compiling tokio v1.32.0
   Compiling tracing-core v0.1.31
   Compiling indexmap v1.9.3
   Compiling openssl v0.10.56
   Compiling fnv v1.0.7
   Compiling foreign-types-shared v0.1.1
   Compiling futures-util v0.3.28
   Compiling foreign-types v0.3.2
   Compiling http v0.2.9
   Compiling openssl-macros v0.1.1
   Compiling tracing v0.1.37
   Compiling tinyvec_macros v0.1.1
   Compiling futures-sink v0.3.28
   Compiling futures-io v0.3.28
   Compiling pin-utils v0.1.0
   Compiling futures-channel v0.3.28
   Compiling httparse v1.8.0
   Compiling hashbrown v0.12.3
   Compiling bitflags v1.3.2
   Compiling native-tls v0.2.11
   Compiling tokio-util v0.7.8
   Compiling tinyvec v1.6.0
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling ryu v1.0.15
   Compiling try-lock v0.2.4
   Compiling strsim v0.10.0
   Compiling log v0.4.20
   Compiling openssl-probe v0.1.5
   Compiling rustix v0.38.8
   Compiling ident_case v1.0.1
   Compiling percent-encoding v2.3.0
   Compiling subtle v2.5.0
   Compiling digest v0.10.7
   Compiling form_urlencoded v1.2.0
   Compiling darling_core v0.13.4
   Compiling want v0.3.1
   Compiling unicode-normalization v0.1.22
   Compiling h2 v0.3.20
   Compiling http-body v0.4.5
   Compiling getrandom v0.2.10
   Compiling socket2 v0.4.9
   Compiling httpdate v1.0.3
   Compiling unicode-width v0.1.10
   Compiling linux-raw-sys v0.4.5
   Compiling unicode-bidi v0.3.13
   Compiling tower-service v0.3.2
   Compiling bitflags v2.4.0
   Compiling idna v0.4.0
   Compiling hyper v0.14.27
   Compiling textwrap v0.11.0
   Compiling rand_core v0.6.4
   Compiling darling_macro v0.13.4
   Compiling tokio-native-tls v0.3.1
   Compiling atty v0.2.14
   Compiling num-integer v0.1.45
   Compiling vec_map v0.8.2
   Compiling cpufeatures v0.2.9
   Compiling ppv-lite86 v0.2.17
   Compiling ansi_term v0.12.1
   Compiling unicode-segmentation v1.10.1
   Compiling fastrand v2.0.0
   Compiling thiserror v1.0.47
   Compiling cbindgen v0.20.0
   Compiling strsim v0.8.0
   Compiling tempfile v3.7.1
   Compiling hyper-tls v0.5.0
   Compiling clap v2.34.0
   Compiling heck v0.3.3
   Compiling rand_chacha v0.3.1
   Compiling darling v0.13.4
   Compiling sha2 v0.10.7
   Compiling url v2.4.0
   Compiling toml v0.5.11
   Compiling serde_urlencoded v0.7.1
   Compiling thiserror-impl v1.0.47
   Compiling ring v0.16.20
   Compiling encoding_rs v0.8.32
   Compiling num-bigint v0.4.3
   Compiling base64 v0.13.1
   Compiling base64 v0.21.2
   Compiling iana-time-zone v0.1.57
   Compiling mime v0.3.17
   Compiling ipnet v2.8.0
   Compiling chrono v0.4.26
   Compiling reqwest v0.11.18
   Compiling serde_with_macros v1.5.2
   Compiling rand v0.8.5
   Compiling ordered-float v2.10.0
   Compiling serde_path_to_error v0.1.14
   Compiling either v1.9.0
   Compiling spin v0.5.2
   Compiling untrusted v0.7.1
   Compiling oauth2 v4.4.1
   Compiling itertools v0.10.5
   Compiling serde-value v0.7.0
   Compiling serde_with v1.14.0
   Compiling zeroidc v0.1.0 (/home/volga629/rpmbuild/BUILD/zerotierone-1.12.2/zeroidc)
   Compiling hmac v0.12.1
   Compiling serde_plain v1.0.1
   Compiling time-core v0.1.1
   Compiling deranged v0.3.7
   Compiling openidconnect v2.5.1
   Compiling time v0.3.25
   Compiling jwt v0.16.0 (https://github.com/glimberg/rust-jwt#61a9291f)
    Finished release [optimized] target(s) in 1m 01s
[volga629@canldev01-fedora39 zeroidc]$ ls

Any help thank you.

volga629-1 commented 8 months ago

From version 1.10.1 build is failing.

volga629-1 commented 7 months ago

I found fix and need to enforce clang++ , g++ failing

Spec

export CXX=/usr/bin/clang++
export CC=/usr/bin/clang
make ZT_USE_MINIUPNPC=1 ZT_DEBUG=1 one
[volga629@canldev01-fedora39 x86_64]$ ls -la zerotierone-
zerotierone-1.14.0-1.fc39.x86_64.rpm              zerotierone-debuginfo-1.14.0-1.fc39.x86_64.rpm    zerotierone-debugsource-1.14.0-1.fc39.x86_64.rpm
volga629-1 commented 7 months ago

On el9 fix also works

zerotierone-1.14.0-1.el9.src.rpm:
zerotierone-1.14.0-1.el9.x86_64.rpm:
zerotierone-debuginfo-1.14.0-1.el9.x86_64.rpm:
zerotierone-debugsource-1.14.0-1.el9.x86_64.rpm: