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

compatibility problem on macOS #74

Open
onur-ozkan opened this issue Mar 3, 2024 · 0 comments
Open

compatibility problem on macOS #74

onur-ozkan opened this issue Mar 3, 2024 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@onur-ozkan
Copy link
Member

LPM build scripts for https://github.com/lodosgroup/tiny-lz4-decoder and https://github.com/lodosgroup/sqlite3-wrapper heavily depend on Linux systems, causing LPM to fail during the linking stage on macOS. We should consider adapting these build scripts to be compatible with macOS.

One of the build scripts:

lpm/lpm/main/build.rs

Lines 5 to 13 in 63beb68

let home_path: &'static str = env!("HOME");
let sqlite_so = Path::new(&home_path).join(".local/share/min_sqlite3_sys");
let lz4_so = Path::new(&home_path).join(".local/share/tiny_lz4_decoder_sys");
println!(
"cargo:rustc-link-arg=-Wl,-rpath={},-rpath={}",
sqlite_so.display(),
lz4_so.display()
);

Build log from macOS CI:

Run cargo build --all-features
  cargo build --all-features
  shell: /bin/bash -e {0}
info: syncing channel updates for 'stable-[2](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:2)02[3](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:3)-06-01-x86_6[4](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:5)-apple-darwin'
info: latest update on 2023-06-01, rust version 1.70.0 (90c[5](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:6)4180[6](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:7) 2023-05-31)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
    Updating crates.io index
 Downloading crates ...
  Downloaded min-sqlite3-sys v1.4.3
  Downloaded tiny-lz4-decoder-sys v1.0.1
  Downloaded lz4-builder v1.0.1
  Downloaded sqlite3-builder v3.39.4
   Compiling sqlite3-builder v3.39.4
   Compiling min-sqlite3-sys v1.4.3
   Compiling lz4-builder v1.0.1
   Compiling rekuest v0.1.0 (/Users/runner/work/lpm/lpm/libs/rekuest)
   Compiling logger v0.1.0 (/Users/runner/work/lpm/lpm/libs/logger)
   Compiling tiny-lz4-decoder-sys v1.0.1
   Compiling json v0.1.0 (/Users/runner/work/lpm/lpm/libs/json)
   Compiling common v0.1.0 (/Users/runner/work/lpm/lpm/lpm/common)
   Compiling sql-builder v0.1.0 (/Users/runner/work/lpm/lpm/libs/sql-builder)
   Compiling untar v0.1.0 (/Users/runner/work/lpm/lpm/libs/untar)
   Compiling lpm v0.1.0-alpha (/Users/runner/work/lpm/lpm/lpm/main)
   Compiling cli_parser v0.1.0 (/Users/runner/work/lpm/lpm/lpm/cli_parser)
   Compiling hash v0.1.0 (/Users/runner/work/lpm/lpm/libs/hash)
   Compiling ehandle v0.1.0 (/Users/runner/work/lpm/lpm/lpm/ehandle)
   Compiling term v0.1.0 (/Users/runner/work/lpm/lpm/libs/term)
   Compiling db v0.1.0 (/Users/runner/work/lpm/lpm/lpm/db)
   Compiling core v0.0.1 (/Users/runner/work/lpm/lpm/lpm/core)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/bin:/usr/local/lib/ruby/gems/3.0.0/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "x86_64" "-m64" "/var/folders/gh/0cww6vn93nv_jjsw3xkm0b4m0000gn/T/rustcOr2Z4Q/symbols.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe[7](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:8)[8](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:9)e30875e[9](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:10)9517.17xb763ty6pchitb.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.1gnoiznzjo33p82z.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.1r0oedggfcs8zfm3.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.24a82j7xzbhhvpgo.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.2gnx14g9v4ut2tkt.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.2l7ldgorvz6tlnhf.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.2wavzmb0m8j3scyd.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.2xn7ptxx8rahbo9n.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.2zk7tudjizgc06ew.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.36vc9k0fnl69qmvd.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.3mn5il0g7zvvfn32.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.3vi5dzdqbwcyqjhq.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.3z2m5kzp0h4wzpnw.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.435ewwpjx0lswdwl.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.45d0789qns6attac.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.4fp90vbuhqzs7iqw.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.4oictohw9fymuign.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.4ybgftrwiglwie8p.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.52au6kvb00xm50xl.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.5a5k0bzm1sy3udeh.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.5d3l6amf72nxpd.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.5e59m7ebxbvfb2rs.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.p721o2fhzigz87y.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.xoxrr5xurgfaj1.rcgu.o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e30875e99517.1ov2p3n7h9rbotpd.rcgu.o" "-L" "/Users/runner/work/lpm/lpm/target/debug/deps" "-L" "/Users/runner/.local/share/min_sqlite3_sys" "-L" "/Users/runner/.local/share/tiny_lz4_decoder_sys" "-L" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/runner/work/lpm/lpm/target/debug/deps/libcore-5eae48ca94ec9d5e.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libtiny_lz4_decoder_sys-4c8b26[10](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:11)7fa83299.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libuntar-43e91f42d17439e9.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libhash-688405dd0e81fdc1.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libdb-563162fa0e55a65f.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libsql_builder-10bd7b14eac29cd7.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libehandle-9cd9cbffbdcc6e32.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libmin_sqlite3_sys-da6f5b461d2669d9.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libcommon-8408f9390636d78b.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/liblogger-caa7d1d[11](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:12)77[12](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:13)bd3.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/librekuest-296679a5068f8db6.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libjson-c5b22f66d9ebc052.rlib" "/Users/runner/work/lpm/lpm/target/debug/deps/libcli_parser-a6087f738[15](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:16)ebca5.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-e32b03a8669bc36c.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_abort-904907cd2de4c8e4.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libobject-30428c48660da25c.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-9a8e49249f8bb559.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-e88a76c089a6ca8b.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgimli-aa2aeb44a3a4eb3c.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-b6d3e703077272ce.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-43a29b043f96d1d5.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-77e[16](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:17)1ebb57ba5db.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libminiz_oxide-e6c4376773882567.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libadler-52704d5f60a8b154.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-7d4ea9f15ff32be1.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-8e9e2509388720[17](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:18).rlib" "/Users/runner/.rustup/toolchains/stable-[20](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:21)23-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-2a9bad0b038ed490.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-0a4ca077165fed8e.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-74dfc10771ad8733.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-cc975[22](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:23)9f3e[23](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:24)0e2.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-485f7db4fc663a5a.rlib" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-f6407837ce798a3b.rlib" "-ltiny_lz4_decoder_sys" "-lmin_sqlite3_sys" "-lSystem" "-lc" "-lm" "-L" "/Users/runner/.rustup/toolchains/stable-2023-06-01-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/runner/work/lpm/lpm/target/debug/deps/lpm-fe78e[30](https://github.com/lodosgroup/lpm/actions/runs/7944424376/job/21689917408#step:3:31)875e99517" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath=/Users/runner/.local/share/min_sqlite3_sys,-rpath=/Users/runner/.local/share/tiny_lz4_decoder_sys"
  = note: ld: unknown option: -rpath=/Users/runner/.local/share/min_sqlite3_sys
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `lpm` (bin "lpm") due to previous error
Error: Process completed with exit code 101.
@onur-ozkan onur-ozkan added help wanted Extra attention is needed good first issue Good for newcomers labels Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant