Git Product home page Git Product logo

Comments (13)

kornelski avatar kornelski commented on September 28, 2024

That's odd libc incompatibility. Run

cargo update

and then compile again

from gifski.

rickycodes avatar rickycodes commented on September 28, 2024

@kornelski to be clear, I was just attempting to install via cargo install gifski... so there's no cargo to update...

I assume I'll have to compile from source to get this working?

from gifski.

rickycodes avatar rickycodes commented on September 28, 2024

I tried to build from source after cloning the most recent master, build still fails for me with the same as above at Compiling lodepng v2.1.3 :(

from gifski.

kornelski avatar kornelski commented on September 28, 2024

Oh, I see. It's CStr::from_ptr that's incompatible on rpi.

from gifski.

kornelski avatar kornelski commented on September 28, 2024

Is your platform armv7-unknown-linux-gnueabihf?

from gifski.

rickycodes avatar rickycodes commented on September 28, 2024

how would I go about checking that?

from gifski.

rickycodes avatar rickycodes commented on September 28, 2024

ah, I sorted it out:

armv7-unknown-linux-gnueabihf (default)

so, yes 😅

from gifski.

kornelski avatar kornelski commented on September 28, 2024

Great, so lodepng v2.1.4 compiles with that target.

from gifski.

rickycodes avatar rickycodes commented on September 28, 2024

Ok, so I updated lodepng to 2.1.4 in Cargo.toml and tried again, this time I hit:

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/home/pi/projects/gifski/target/release/deps/imagequant_sys-4f2aa3fca8309fe6.imagequant_sys0.rust-cgu.o" "-o" "/home/pi/projects/gifski/target/release/deps/libimagequant_sys-4f2aa3fca8309fe6.so" "-Wl,--version-script=/tmp/rustc.Tn2JIpsLSEPX/list" "/home/pi/projects/gifski/target/release/deps/imagequant_sys-4f2aa3fca8309fe6.crate.allocator.rust-cgu.o" "-Wl,--gc-sections" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/pi/projects/gifski/target/release/deps" "-L" "/home/pi/projects/gifski/target/release/build/imagequant-sys-70b982e661d62fe9/out" "-L" "/usr/lib/gcc/arm-linux-gnueabihf/4.9/" "-L" "/usr/lib/gcc/arm-linux-gnueabihf/4.9/" "-L" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-l" "imagequant" "-Wl,--no-whole-archive" "/home/pi/projects/gifski/target/release/deps/librgb-cab4102da4852d88.rlib" "/home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd-827ddea93328ae2d.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libpanic_abort-7200bd40c6268d7e.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libunwind-25cc9b024a02d330.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc_system-751808ba756769d5.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liblibc-d42e80cee81b06ce.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librand-3d7b10e850a67e89.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc-78c21267a2dc15c1.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd_unicode-0e1b544c94586415.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcore-0c5e3d6c117f8c44.rlib" "/home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcompiler_builtins-bd7cc5ada1e908e0.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-shared"
  = note: /usr/bin/ld: /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o)(.text+0xe4): R_ARM_TLS_LE32 relocation not permitted in shared object
          /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o): In function `gomp_free_thread':
          (.text+0xe4): dangerous relocation: unsupported relocation
          /usr/bin/ld: /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o)(.text+0x11c): R_ARM_TLS_LE32 relocation not permitted in shared object
          /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o): In function `gomp_free_pool_helper':
          (.text+0x11c): dangerous relocation: unsupported relocation
          /usr/bin/ld: /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o)(.text+0x260): R_ARM_TLS_LE32 relocation not permitted in shared object
          /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o): In function `gomp_thread_start':
          (.text+0x260): dangerous relocation: unsupported relocation
          /usr/bin/ld: /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o)(.text+0x1320): R_ARM_TLS_LE32 relocation not permitted in shared object
          /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o): In function `gomp_team_start':
          (.text+0x1320): dangerous relocation: unsupported relocation
          /usr/bin/ld: /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o)(.text+0x1594): R_ARM_TLS_LE32 relocation not permitted in shared object
          /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o): In function `gomp_team_end':
          (.text+0x1594): dangerous relocation: unsupported relocation
          /usr/bin/ld: /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o)(.text+0x15e8): R_ARM_TLS_LE32 relocation not permitted in shared object
          /home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib(team.o): In function `gomp_new_icv':
          (.text+0x15e8): dangerous relocation: unsupported relocation
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: Could not compile `imagequant-sys`.

Caused by:
  process didn't exit successfully: `rustc --crate-name imagequant_sys /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/imagequant-sys-2.11.9/rust/libimagequant.rs --crate-type cdylib --crate-type staticlib --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort --cfg feature="default" --cfg feature="openmp" --cfg feature="openmp-static" --cfg feature="openmp-sys" --cfg feature="sse" -C metadata=4f2aa3fca8309fe6 -C extra-filename=-4f2aa3fca8309fe6 --out-dir /home/pi/projects/gifski/target/release/deps -L dependency=/home/pi/projects/gifski/target/release/deps --extern openmp_sys=/home/pi/projects/gifski/target/release/deps/libopenmp_sys-2cf280fa8c5c9dae.rlib --extern rgb=/home/pi/projects/gifski/target/release/deps/librgb-cab4102da4852d88.rlib --cap-lints allow -L native=/home/pi/projects/gifski/target/release/build/imagequant-sys-70b982e661d62fe9/out -l static=imagequant -L native=/usr/lib/gcc/arm-linux-gnueabihf/4.9/ -L native=/usr/lib/gcc/arm-linux-gnueabihf/4.9/` (exit code: 101)
warning: build failed, waiting for other jobs to finish...

from gifski.

kornelski avatar kornelski commented on September 28, 2024

Are you building with --features=openmp?

from gifski.

rickycodes avatar rickycodes commented on September 28, 2024

yea, should I drop that?

from gifski.

kornelski avatar kornelski commented on September 28, 2024

Yes, it looks like ARM version is incompatible with the way linking is implemented here.

from gifski.

rickycodes avatar rickycodes commented on September 28, 2024

FWIW that did the trick, thanks for your help with this!

from gifski.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.