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

Linking error when compiling with 'bundled_proj' feature on Apple Silicon #57

Open
frewsxcv opened this issue Jan 14, 2021 · 14 comments
Open

Comments

@frewsxcv
Copy link
Member

cargo test --features "bundled_proj"
$ cargo test --features "bundled_proj"
   Compiling approx v0.3.2
   Compiling proj v0.20.6 (/Users/coreyf/Desktop/dev/georust/proj)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-arch" "arm64" "-L" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.10ingj40cbe4borj.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.11fn116tw8nkd70w.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.18txdfkpvx0wwx6z.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1bd6updi42gyixo1.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1bkgo0al4a863uug.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1bn3rkwb8iqzabh7.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1d2s1nq0em3eqzly.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1drnthnrqypo39mn.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1fkvtcbqhcqx05r5.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1g50imb6okpovw8f.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1hauolsatc01qin8.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1hxqql8pyer0upe2.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1npteib36zljvnhl.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1ratu9pbg7mn8fnm.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1s53rdwcuibz2ckx.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1tv4jj49i20h52vm.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1u6ubhjcmyn69vq0.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1xc7kekgf1dos00z.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1xv5bfel57dmgcnx.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1y4r9ipsflrb2dso.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.20wzwivz9293caki.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.213gijffzb22ipeg.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.224zh2mag6z4ml45.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2251ie3mswn860jc.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.22e681rj5d8qxgq2.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.24hlksmwbws37sn5.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2adt9mvpvi1gv8ab.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2aq321umn0j05q6d.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2b3wpt9tuagfrls5.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2g30xq86i3s7tul.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2go81aea09n0ueg6.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2hjj1d1lbq2lrp52.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2qjjl69tnydfwf2f.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2r9jxnee6yt4or.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2s3q814iqklata8d.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2yllp33pcn4pehax.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.2zyq6iot82irlftd.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.33ipixuxlsf5yimy.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.38a938m4qf5n55xz.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3c34fmjy4batnb8z.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3cq155oredr77527.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3dnnmibrw96vag3p.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3g8uerxbfzmf7vdk.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3mcrdkz04f873cot.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3r7eebvtuxfnmgsa.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3tc3xzajp2fx899f.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3tg2nl2i6ufhe4mw.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3ucyrq9lx9n0heks.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.3wfsogsf13rrsivo.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.41inetmydes9ty49.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.435pue1l5hwid6c0.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4b5mjlo7s7127tji.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4bht5egcc9kt4uuf.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4co4w6a8kaqb0jdh.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4eusky92tz6e6e4j.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4i3ikg2ex5evt85z.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4jft0iq614upsqyi.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4n356617sy5tj2ze.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4nbw2szeh1fevdo1.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4pdglkzbtxs8ld32.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4v92ot1iqr9hmu7w.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.4yp32bs47b68hr00.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.52ca6015s3d4mrpu.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.546emph797iaevfq.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.54j1x6530irgiv9c.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.56xm94j03y2tkutk.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.57yjhyp3s9ofmjnt.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.58k6awnydbn7gmvs.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.58z2c5zib4xakjh5.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.5ewlbfmpsl1cgq.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.5rt3nbf82bch7ke.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.6ln2b8oe1iuvb42.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.8kegbvbgsc92bge.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.a5dr4rj76gxrrjb.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.b4rfnt3qgnzaquv.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.bvscs4wwtrmjqxk.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.gnnc1d52f3o7c86.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.ht3v3ud5qonx1es.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.omcemq9r8tipv5l.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.q6ekkc4ktogvwp5.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.q7cv36ruevjcgu4.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.rbymtdm8w4sq15t.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.sm4ml1ysgjoqw6n.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.tbwijz1wno1xppb.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.tfse1g2waz0dovq.rcgu.o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.tg5wgyqvnmjoc6.rcgu.o" "-o" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/proj-74201a339a3fe75c.1f57didjga5843ez.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps" "-L" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/build/proj-sys-702b3ff54554385c/out/lib" "-L" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/build/proj-sys-702b3ff54554385c/out/lib64" "-L" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/build/proj-sys-702b3ff54554385c/out/build/lib" "-L" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libtest-c04bf5353f69140c.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libterm-1679b8e962db5e51.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgetopts-53270c793523aa3d.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunicode_width-6e5f163d203931fb.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_std-da8c4278b088de0d.rlib" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/libthiserror-c3211ae51f4578b1.rlib" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/libproj_sys-330c7d9be9e5225c.rlib" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/liblibc-6dc103a5ed6ef582.rlib" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/libapprox-3c1f854685b50684.rlib" "/Users/coreyf/Desktop/dev/georust/proj/target/debug/deps/libnum_traits-e49431397aad97ac.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-66c007ef72d8663e.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-a9451d2661722154.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-762dc53d4ee196bf.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-8574628b478a5c23.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-81d5bba5f99dc60c.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-2ca8284befe9e594.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-b6e7b0a96c79838a.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-a91baa24b7903563.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-be586febb1d2abe5.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-91703e117e420011.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-8293d4970e524cf2.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-59ea5e5ce6eb23cb.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-92186cf5c5d5835d.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-80a2abfc52170c57.rlib" "/Users/coreyf/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-e46c25039c9cecae.rlib" "-lsqlite3" "-ltiff" "-lc++" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: ld: warning: directory not found for option '-L/Users/coreyf/Desktop/dev/georust/proj/target/debug/build/proj-sys-702b3ff54554385c/out/lib64'
          ld: library not found for -ltiff
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: aborting due to previous error

error: could not compile `proj`

To learn more, run the command again with --verbose.

This seems to be the line it's struggling with:

proj/proj-sys/build.rs

Lines 107 to 110 in 3c33538

println!(
"cargo:rustc-link-search={}",
&out_path.join("lib64").display()
);

@frewsxcv
Copy link
Member Author

@michaelkirk Are you able to repro?

@michaelkirk
Copy link
Member

Unfortunately, I'm armless for a while.

ld: library not found for -ltiff

IIRC I think I hacked around that without solving it by disabling the tiff integration just to get it to build.

I should have taken better notes... 😓

@michaelkirk
Copy link
Member

This seems to be the line it's struggling with:

 println!( 
     "cargo:rustc-link-search={}", 
     &out_path.join("lib64").display() 
 ); 

I had that output too, but IIRC that's not the critical error, but I could be mistaken.

@frewsxcv
Copy link
Member Author

Ah you're right, that's just a warning

@michaelkirk
Copy link
Member

I'm no longer having any issues building proj on aarch64.

I'm going to close this, but feel free to open if you aren't able to build on arm+apple.

@highway900
Copy link

I am seeing this error on apple silicon with proj-v0.24.0 I am able to build but cannot run tests.

When testing running cargo test -v I get a linker error for libtiff where it appears the linker is looking for a lib64 directory as stated above.

I have both libtiff-4.3.0 and proj-8.2.0 installed via brew.

@urschrei
Copy link
Member

proj currently requires proj 8.1.0 as a link target, though that may not be the source of the current error. Does running cargo test --features bundled_proj give you the same error?

@michaelkirk
Copy link
Member

Could you also please include the exact error output?

@highway900
Copy link

running cargo test --features bundled_proj gives me the same error so does using cargo test --no-default-features

cargo test --verbose
       Fresh cfg-if v1.0.0
       Fresh autocfg v1.0.1
       Fresh unicode-xid v0.2.2
       Fresh glob v0.3.0
       Fresh version_check v0.9.3
       Fresh wyz v0.2.0
       Fresh funty v1.1.0
       Fresh tap v1.0.1
       Fresh regex-syntax v0.6.25
       Fresh unicode-width v0.1.9
       Fresh bitflags v1.3.2
       Fresh adler v1.0.2
       Fresh termcolor v1.1.2
       Fresh humantime v2.1.0
       Fresh vec_map v0.8.2
       Fresh strsim v0.8.0
       Fresh ansi_term v0.11.0
       Fresh lazy_static v1.4.0
       Fresh lazycell v1.3.0
       Fresh cc v1.0.72
       Fresh rustc-hash v1.1.0
       Fresh peeking_take_while v0.1.2
       Fresh shlex v1.1.0
       Fresh pkg-config v0.3.22
       Fresh libloading v0.7.2
       Fresh textwrap v0.11.0
       Fresh libc v0.2.107
       Fresh cmake v0.1.46
       Fresh memchr v2.3.4
       Fresh proc-macro2 v1.0.32
       Fresh radium v0.5.3
       Fresh quote v1.0.10
       Fresh aho-corasick v0.7.15
       Fresh atty v0.2.14
       Fresh log v0.4.14
       Fresh xattr v0.2.2
       Fresh crc32fast v1.2.1
       Fresh filetime v0.2.15
       Fresh which v3.1.1
       Fresh bitvec v0.19.5
       Fresh regex v1.4.6
       Fresh clang-sys v1.3.0
       Fresh miniz_oxide v0.4.4
       Fresh clap v2.33.3
       Fresh syn v1.0.81
       Fresh num-traits v0.2.14
       Fresh nom v6.2.1
       Fresh env_logger v0.8.4
       Fresh tar v0.4.37
       Fresh cexpr v0.5.0
       Fresh flate2 v1.0.22
       Fresh thiserror-impl v1.0.30
       Fresh geo-types v0.7.2
       Fresh approx v0.3.2
       Fresh bindgen v0.59.1
       Fresh thiserror v1.0.30
       Fresh proj-sys v0.21.0 (/proj/proj-sys)
   Compiling proj v0.24.0 (/proj)
     Running `rustc --crate-name proj --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 --test --cfg 'feature="default"' --cfg 'feature="geo-types"' -C metadata=9392060a9ee76561 -C extra-filename=-9392060a9ee76561 --out-dir /proj/target/debug/deps -C incremental=/proj/target/debug/incremental -L dependency=/proj/target/debug/deps --extern approx=/proj/target/debug/deps/libapprox-9f5de25b051c1dfb.rlib --extern geo_types=/proj/target/debug/deps/libgeo_types-9b3eacdd1981a1ee.rlib --extern libc=/proj/target/debug/deps/liblibc-ff0c70f2ccc8b1fc.rlib --extern num_traits=/proj/target/debug/deps/libnum_traits-dd2a8f17dcefa508.rlib --extern proj_sys=/proj/target/debug/deps/libproj_sys-b0e700f63bb062d2.rlib --extern thiserror=/proj/target/debug/deps/libthiserror-58e881423875c387.rlib -L native=/proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/lib -L /proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/lib64 -L /proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/build/lib`
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-arch" "arm64" "/proj/target/debug/deps/proj-9392060a9ee76561.11x46393atiu75ph.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.12l9ga6fexa1f84i.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.14amw1vvuypm5sya.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.16g8d7dyz10x765x.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.18u1ob3tbf8zlvlq.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.1i0r8vhbc1bzn174.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.1j1y1yu3tsgpbszb.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.1mvvjeuw22yauzdr.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.1tbv7v5wgefwph3v.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.1u9od1zr55pkw4h.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.1yklulfjxyc51vcg.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.24523hll41aaty7a.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.24we8nxpinevurb1.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.25xp7750mh4sa5m7.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.29l4dfzcv2hi8jl6.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.29rmjgf3kw41sjqb.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.2bmjt7lnstzm1p5w.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.2gs7pza6dph62urd.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.2mjqu1dwisokjm3e.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.2ppzg3dtraoqn0iv.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.2xkvztlm7dqdbesc.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.340wdjxtwk4p1xbw.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.362ix1ijjzhxdbso.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3a7f6uwukcyhm9wa.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3dbp0786oepllcte.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3f7qtzwxc16w9n6n.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3ffbmrkmytbpytc0.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3gnenjwmcqvlhvio.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3h3m0fq59769ph8x.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3k4ltiqbdt804css.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3kzgcr29px9avl5o.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3l7yztascnkp9kl2.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3otkqflxttv8eddx.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3p66rqr77w8vtmqm.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3q6ilbmlmpvdo4ep.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3s31jncsdbvs4i6r.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3ts9a5wygv57up05.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3u4zcddy8qvhwyii.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3wo12x2zhdchwgcp.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3x3tpz1vqvkq1siu.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.400sg146h8um6wja.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.41of70ve272y70as.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.42menja1d6gur828.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.45xlqn29mpb1h1nh.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.46p1xw493t4luya8.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.47rnp1v6udfl511o.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.48504a0rxaw4izju.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.49sfrim7okqzyko0.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.49z5t2gq6a7d1o3r.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4amfhgkb572j9g3i.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4amwfv9h5d87ic1o.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4d53yand6lbt4441.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4h7hjwkiqyq14def.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4l47b8mb2ahqp9uv.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4mk7dywgt43q52lj.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4n9enlbcas3hlfe5.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4p7v9txxmf71b2cv.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4pt563qi6ea0nuua.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4qqdvirxkqruc7w5.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4rrjxzgwu1y4bo5u.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4suwqiqpfz7oxlxa.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4vdyxbov2wn53kd9.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4wvkcdip07p98pi5.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.4zzdkljmj15dpn1d.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.505oaogtixkf507s.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.50zd3xr11tdccmjb.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.51i7vk9641wttksb.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.541yjzlhrq02d8ns.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.54qirxf9k8ivsyui.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.56ybui3745mfvy7h.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.5982xdb20yaatsm1.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.5bwgbcz55jf35x25.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.5cx1d1hnu49gpvo0.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.5d9fubsdf6sqbm59.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.9q0xl71y6p7arzq.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.bvjlk4c6ui3sbos.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.cr6nrnj3h332kw2.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.dobl4ynjpqs0dzi.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.e12ai5jtyh565vk.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.e68sqfkdcqts77f.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.edpb45585ptefdx.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.fb1crx9vauobsgn.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.ht98uy53iwezkl1.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.isc71vblznvor8v.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.j3oondk6y72u2xy.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.md7yzfo7a2ddorf.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.mw20o3jwpiqh9s4.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.p2izcmp2i33brsv.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.r1147yzyzjcgbh3.rcgu.o" "/proj/target/debug/deps/proj-9392060a9ee76561.3ov3xhnma80vutzd.rcgu.o" "-L" "/proj/target/debug/deps" "-L" "/proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/lib" "-L" "/proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/lib64" "-L" "/proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/build/lib" "-L" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/proj/target/debug/deps/libgeo_types-9b3eacdd1981a1ee.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libtest-06ff11d645105e2b.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libterm-f05ecaeca66814e6.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgetopts-6ad0d034fc8e15c7.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunicode_width-c4beacdc35405cb8.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_std-fc0f4647def297a8.rlib" "/proj/target/debug/deps/libthiserror-58e881423875c387.rlib" "/proj/target/debug/deps/libproj_sys-b0e700f63bb062d2.rlib" "/proj/target/debug/deps/liblibc-ff0c70f2ccc8b1fc.rlib" "/proj/target/debug/deps/libapprox-9f5de25b051c1dfb.rlib" "/proj/target/debug/deps/libnum_traits-dd2a8f17dcefa508.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-000cdec9267bfd7b.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-2669f3cbce8358f4.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-86461a1c60728ccb.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-f17574752cb5ddba.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-3bb606c936cc0d28.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-8139a4b0cda20184.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-ea0823eca3e9abf9.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-4f19e1259f6028e7.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-435daca85b8e10b5.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-d73085abefd284c6.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-e6a09ca0044b34e5.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-e07333f48f53c71e.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-2a49b0d9fbc7a459.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-b66dda66aafe36c9.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-34d0b58da984bf31.rlib" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-01275baa20724171.rlib" "-lsqlite3" "-ltiff" "-lc++" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/proj/target/debug/deps/proj-9392060a9ee76561" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: warning: directory not found for option '-L/proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/lib64'
          ld: library not found for -ltiff
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

error: could not compile `proj`

Caused by:
  process didn't exit successfully: `rustc --crate-name proj --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 --test --cfg 'feature="default"' --cfg 'feature="geo-types"' -C metadata=9392060a9ee76561 -C extra-filename=-9392060a9ee76561 --out-dir /proj/target/debug/deps -C incremental=/proj/target/debug/incremental -L dependency=/proj/target/debug/deps --extern approx=/proj/target/debug/deps/libapprox-9f5de25b051c1dfb.rlib --extern geo_types=/proj/target/debug/deps/libgeo_types-9b3eacdd1981a1ee.rlib --extern libc=/proj/target/debug/deps/liblibc-ff0c70f2ccc8b1fc.rlib --extern num_traits=/proj/target/debug/deps/libnum_traits-dd2a8f17dcefa508.rlib --extern proj_sys=/proj/target/debug/deps/libproj_sys-b0e700f63bb062d2.rlib --extern thiserror=/proj/target/debug/deps/libthiserror-58e881423875c387.rlib -L native=/proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/lib -L /proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/lib64 -L /proj/target/debug/build/proj-sys-7f6096c05b5733fd/out/build/lib` (exit status: 1)

note I have removed username $HOME path from the output

@highway900
Copy link

my understanding is libtiff is not required right?

@michaelkirk
Copy link
Member

michaelkirk commented Nov 16, 2021

I feel it's very likely that I broke this with #92, sorry.

I'm looking into an appropriate fix now...

@michaelkirk michaelkirk reopened this Nov 16, 2021
@michaelkirk
Copy link
Member

michaelkirk commented Nov 16, 2021

Hmm, I'm actually not able to reproduce your experience with proj 8.2 installed via homebrew on my aarch64.

@highway900 would you mind including some more verbose output so we can better see what's going on?

Run cargo clean && cargo test -vv, and post the output starting with: "Compiling proj-sys v0.21.0"

Output from my machine...
Compiling proj-sys v0.21.0 (/Users/mkirk/src/georust/proj/proj-sys)
     Running `CARGO=/Users/mkirk/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/Users/mkirk/src/georust/proj/proj-sys CARGO_PKG_AUTHORS='The Georust developers <mods@georust.org>' CARGO_PKG_DESCRIPTION='Rust bindings for PROJ v8.1.x' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=proj-sys CARGO_PKG_REPOSITORY='https://github.com/georust/proj' CARGO_PKG_VERSION=0.21.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=21 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 DYLD_FALLBACK_LIBRARY_PATH='/Users/mkirk/src/georust/proj/target/debug/deps:/Users/mkirk/.rustup/toolchains/stable-aarch64-apple-darwin/lib:/Users/mkirk/.rustup/toolchains/stable-aarch64-apple-darwin/lib:/Users/mkirk/lib:/usr/local/lib:/usr/lib' rustc --crate-name build_script_build --edition=2018 proj-sys/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C metadata=ad3573c2b71ad2e0 -C extra-filename=-ad3573c2b71ad2e0 --out-dir /Users/mkirk/src/georust/proj/target/debug/build/proj-sys-ad3573c2b71ad2e0 -C incremental=/Users/mkirk/src/georust/proj/target/debug/incremental -L dependency=/Users/mkirk/src/georust/proj/target/debug/deps --extern bindgen=/Users/mkirk/src/georust/proj/target/debug/deps/libbindgen-3fa79ef3b2cc5c5a.rlib --extern cmake=/Users/mkirk/src/georust/proj/target/debug/deps/libcmake-528f6e7abdb9ecfa.rlib --extern flate2=/Users/mkirk/src/georust/proj/target/debug/deps/libflate2-e008d144c28a464e.rlib --extern pkg_config=/Users/mkirk/src/georust/proj/target/debug/deps/libpkg_config-700343b79c8fc579.rlib --extern tar=/Users/mkirk/src/georust/proj/target/debug/deps/libtar-ebab89bc51e4196c.rlib`
     Running `/Users/mkirk/src/georust/proj/target/debug/build/proj-sys-ad3573c2b71ad2e0/build-script-build`
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PROJ_NO_PKG_CONFIG
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PROJ_STATIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PROJ_DYNAMIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PROJ_STATIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PROJ_DYNAMIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[proj-sys 0.21.0] cargo:rustc-link-search=native=/opt/homebrew/Cellar/proj/8.2.0/lib
[proj-sys 0.21.0] cargo:rustc-link-lib=proj
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PROJ_STATIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PROJ_DYNAMIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_darwin
[proj-sys 0.21.0] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[proj-sys 0.21.0] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[proj-sys 0.21.0] found acceptable libproj already installed at: "/opt/homebrew/Cellar/proj/8.2.0/lib"
[proj-sys 0.21.0] cargo:rustc-link-search=native="/opt/homebrew/Cellar/proj/8.2.0/lib"
[proj-sys 0.21.0] cargo:rustc-link-lib=proj

Also, if you have the time, it'd be interesting to verify if things work for you pre #93 - e.g. by building from 801f653.

Can you also confirm that you're running aarch64 homebrew (from /opt/homebrew) and not the legacy rosetta version (from /usr/local)?

$ arch
arm64
$ brew --prefix
/opt/homebrew

@highway900
Copy link

Ok this worked. Looks like a cargo clean must have fixed my issue, though IIRC I had done this...
Maybe my terminal sessions restarted and libtiff could be found now...
Everything is working now though 👍
Apologies and thanks for the help.

Definitely running arm64 and latest homebrew (only just installed for the first time)

bors bot added a commit that referenced this issue Nov 29, 2021
95: Fix source build on aarch64/homebrew r=urschrei a=michaelkirk

Slightly improves the situation at #57

On apple platforms, libtiff is not installed by the operating system. If
the user has it installed, likely it was installed by homebrew.

Previously, on x86, homebrew installed libs into /usr/lib which is in
the default search path, but since aarch64, homebrew has moved libs to
/opt/homebrew/lib.

So now we use pkg-config to find the library.

Potential problems:

 - Not everyone has pkg-config (e.g windows users, a few mac users)
 - Not everyone actually needs libtiff, only the network geotiff users,
   but we assume everyone needs it since most system installations
   include it.

Note that proj enables tiff support by defeault, provided libtiff is
found (using pkg-config? or something else?)


This is a draft because some tests are currently failing for me on aarch64. I'm looking into it now...

<details>
<summary>failing test output</summary>
<pre>
geos: Invalid latitude
geos: Invalid latitude
"proj=pipeline step proj=unitconvert xy_in=us-ft xy_out=m step inv proj=lcc lat_0=32.1666666666667 lon_0=-116.25 lat_1=33.8833333333333 lat_2=32.7833333333333 x_0=2000000.0001016 y_0=500000.0001016 ellps=GRS80 step proj=lcc lat_0=32.1666666666667 lon_0=-116.25 lat_1=33.8833333333333 lat_2=32.7833333333333 x_0=2000000 y_0=500000 ellps=GRS80"
proj_create: unrecognized format / unknown name

assert_relative_eq!(t.x(), 0.43633200013698786)

    left  = NaN
    right = 0.43633200013698786


thread 'proj::test::test_inverse_projection' panicked at 'assert_relative_eq!(t.x(), 0.43633200013698786)

    left  = NaN
    right = 0.43633200013698786

', src/proj.rs:1069:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
   1: std::panicking::begin_panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:460:5
   2: proj::proj::test::test_inverse_projection
             at ./src/proj.rs:1069:9
   3: proj::proj::test::test_inverse_projection::{{closure}}
             at ./src/proj.rs:1059:5
   4: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
   5: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


assert_relative_eq!(t.x(), 0.0023755864830313977)

    left  = NaN
    right = 0.0023755864830313977


thread 'proj::test::test_london_inverse' panicked at 'assert_relative_eq!(t.x(), 0.0023755864830313977)

    left  = NaN
    right = 0.0023755864830313977

', src/proj.rs:1086:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
   1: std::panicking::begin_panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:460:5
   2: proj::proj::test::test_london_inverse
             at ./src/proj.rs:1086:9
   3: proj::proj::test::test_london_inverse::{{closure}}
             at ./src/proj.rs:1074:5
   4: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
   5: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


assert_relative_eq!(t.x(), 500119.7035366755, epsilon = 1e-5)

    left  = NaN
    right = 500119.7035366755


thread 'proj::test::test_projection' panicked at 'assert_relative_eq!(t.x(), 500119.7035366755, epsilon = 1e-5)

    left  = NaN
    right = 500119.7035366755

', src/proj.rs:1054:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
   1: std::panicking::begin_panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:460:5
   2: proj::proj::test::test_projection
             at ./src/proj.rs:1054:9
   3: proj::proj::test::test_projection::{{closure}}
             at ./src/proj.rs:1044:5
   4: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
   5: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

thread 'proj::test::test_searchpath' panicked at 'assertion failed: `(left == right)`
  left: `"/Users/mkirk/src/georust/proj/target/debug/build/proj-sys-1e3a03028e94a7d6/out/share/proj"`,
 right: `"/foo"`', src/proj.rs:1016:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:140:5
   4: proj::proj::test::test_searchpath
             at ./src/proj.rs:1016:9
   5: proj::proj::test::test_searchpath::{{closure}}
             at ./src/proj.rs:1010:5
   6: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
   7: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
</pre>
</details>

Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
@PayasR
Copy link
Member

PayasR commented Jan 7, 2022

Hit the same issue today, cargo clean and restarting terminal worked!

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

5 participants