GithubHelp home page GithubHelp logo

Comments (10)

ekse avatar ekse commented on July 28, 2024

Sorry about that and thank you for the bug report! It seems this change is causing lots of issue, I will add pkgtool support to look for system installation of unicorn first before attempting to compile.

I don't have internet access at home at the moment, this should be fixed this week so hopefully I will be able to address this issue soon.

from unicorn-rs.

ekse avatar ekse commented on July 28, 2024

It seems the git submodule for unicorn was referencing an invalid commit, could you do a git pull and test again?

from unicorn-rs.

ekse avatar ekse commented on July 28, 2024

Hi @jmi2k, did you have the chance to test again? I think this issue should be fixed now.

from unicorn-rs.

ekse avatar ekse commented on July 28, 2024

This issue should now be fixed, please reopen if you still have issues building.

from unicorn-rs.

jmi2k avatar jmi2k commented on July 28, 2024

Sorry for not replying before, I couldn't test it on a VM and I thought it was a problem of my system. I've tested in a fresh Arch Linux install, with unicorn, git, base-devel, and rustup installed. I've made a fresh git clone, and tried that:

$ git rev-parse HEAD   # Last commit.
9b15b3c4d7ee374a0a665473a3a6835ec4d6157f
$ cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling gcc v0.3.43
     Running `rustc --crate-name gcc /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.43/src/lib.rs --crate-type lib -g -C metadata=9efc898ae53effec -C extra-filename=-9efc898ae53effec --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --cap-lints allow`
   Compiling bitflags v0.6.0
     Running `rustc --crate-name bitflags /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-0.6.0/src/lib.rs --crate-type lib -g -C metadata=349661f08b936847 -C extra-filename=-349661f08b936847 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --cap-lints allow`
   Compiling utf8-ranges v0.1.3
     Running `rustc --crate-name utf8_ranges /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/utf8-ranges-0.1.3/src/lib.rs --crate-type lib -g -C metadata=ff1f7ad9d4bf7e02 -C extra-filename=-ff1f7ad9d4bf7e02 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --cap-lints allow`
   Compiling winapi-build v0.1.1
     Running `rustc --crate-name build /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/winapi-build-0.1.1/src/lib.rs --crate-type lib -g -C metadata=be08217003a93e19 -C extra-filename=-be08217003a93e19 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --cap-lints allow`
   Compiling libc v0.2.20
     Running `rustc --crate-name libc /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.20/src/lib.rs --crate-type lib -g --cfg feature=\"default\" --cfg feature=\"use_std\" -C metadata=83c2bd88b43ecde3 -C extra-filename=-83c2bd88b43ecde3 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --cap-lints allow`
   Compiling memchr v0.1.11
     Running `rustc --crate-name memchr /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-0.1.11/src/lib.rs --crate-type lib -g -C metadata=667106a0439c1c44 -C extra-filename=-667106a0439c1c44 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern libc=/home/osboxes/unicorn-rs/target/debug/deps/liblibc-83c2bd88b43ecde3.rlib --cap-lints allow`
   Compiling aho-corasick v0.5.3
     Running `rustc --crate-name aho_corasick /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.5.3/src/lib.rs --crate-type lib -g -C metadata=8d866fbdac670156 -C extra-filename=-8d866fbdac670156 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern memchr=/home/osboxes/unicorn-rs/target/debug/deps/libmemchr-667106a0439c1c44.rlib --cap-lints allow`
   Compiling winapi v0.2.8
     Running `rustc --crate-name winapi /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/winapi-0.2.8/src/lib.rs --crate-type lib -g -C metadata=3f4827e2e513c3d9 -C extra-filename=-3f4827e2e513c3d9 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --cap-lints allow`
   Compiling kernel32-sys v0.2.2
     Running `rustc --crate-name build_script_build /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/kernel32-sys-0.2.2/build.rs --crate-type bin -g -C metadata=ef364f4d0d061b19 -C extra-filename=-ef364f4d0d061b19 --out-dir /home/osboxes/unicorn-rs/target/debug/build/kernel32-sys-ef364f4d0d061b19 --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern build=/home/osboxes/unicorn-rs/target/debug/deps/libbuild-be08217003a93e19.rlib --cap-lints allow`
     Running `/home/osboxes/unicorn-rs/target/debug/build/kernel32-sys-ef364f4d0d061b19/build-script-build`
     Running `rustc --crate-name kernel32 /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/kernel32-sys-0.2.2/src/lib.rs --crate-type lib -g -C metadata=7cda898cd53d6f66 -C extra-filename=-7cda898cd53d6f66 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern winapi=/home/osboxes/unicorn-rs/target/debug/deps/libwinapi-3f4827e2e513c3d9.rlib --cap-lints allow`
   Compiling thread-id v2.0.0
     Running `rustc --crate-name thread_id /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-id-2.0.0/src/lib.rs --crate-type lib -g -C metadata=29cf57da6bdc517a -C extra-filename=-29cf57da6bdc517a --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern kernel32=/home/osboxes/unicorn-rs/target/debug/deps/libkernel32-7cda898cd53d6f66.rlib --extern libc=/home/osboxes/unicorn-rs/target/debug/deps/liblibc-83c2bd88b43ecde3.rlib --cap-lints allow`
   Compiling thread_local v0.2.7
     Running `rustc --crate-name thread_local /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/thread_local-0.2.7/src/lib.rs --crate-type lib -g -C metadata=0553d3d1a0a49a55 -C extra-filename=-0553d3d1a0a49a55 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern thread_id=/home/osboxes/unicorn-rs/target/debug/deps/libthread_id-29cf57da6bdc517a.rlib --cap-lints allow`
   Compiling regex-syntax v0.3.9
     Running `rustc --crate-name regex_syntax /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.3.9/src/lib.rs --crate-type lib -g -C metadata=a1691e580add96f0 -C extra-filename=-a1691e580add96f0 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --cap-lints allow`
   Compiling regex v0.1.80
     Running `rustc --crate-name regex /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.80/src/lib.rs --crate-type lib -g -C metadata=b87cd1b2417f0b56 -C extra-filename=-b87cd1b2417f0b56 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern regex_syntax=/home/osboxes/unicorn-rs/target/debug/deps/libregex_syntax-a1691e580add96f0.rlib --extern memchr=/home/osboxes/unicorn-rs/target/debug/deps/libmemchr-667106a0439c1c44.rlib --extern utf8_ranges=/home/osboxes/unicorn-rs/target/debug/deps/libutf8_ranges-ff1f7ad9d4bf7e02.rlib --extern aho_corasick=/home/osboxes/unicorn-rs/target/debug/deps/libaho_corasick-8d866fbdac670156.rlib --extern thread_local=/home/osboxes/unicorn-rs/target/debug/deps/libthread_local-0553d3d1a0a49a55.rlib --cap-lints allow`
   Compiling os_type v0.5.0
     Running `rustc --crate-name os_type /home/osboxes/.cargo/registry/src/github.com-1ecc6299db9ec823/os_type-0.5.0/src/lib.rs --crate-type lib -g -C metadata=1030dda040cdfde7 -C extra-filename=-1030dda040cdfde7 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern regex=/home/osboxes/unicorn-rs/target/debug/deps/libregex-b87cd1b2417f0b56.rlib --cap-lints allow`
   Compiling libunicorn-sys v0.4.0 (file:///home/osboxes/unicorn-rs/libunicorn-sys)
     Running `rustc --crate-name build_script_build libunicorn-sys/build.rs --crate-type bin -g -C metadata=aa5ad55469b79c9c -C extra-filename=-aa5ad55469b79c9c --out-dir /home/osboxes/unicorn-rs/target/debug/build/libunicorn-sys-aa5ad55469b79c9c --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern os_type=/home/osboxes/unicorn-rs/target/debug/deps/libos_type-1030dda040cdfde7.rlib --extern gcc=/home/osboxes/unicorn-rs/target/debug/deps/libgcc-9efc898ae53effec.rlib`
     Running `/home/osboxes/unicorn-rs/target/debug/build/libunicorn-sys-aa5ad55469b79c9c/build-script-build`
     Running `rustc --crate-name libunicorn_sys libunicorn-sys/src/lib.rs --crate-type lib -g -C metadata=630f5f343b126e35 -C extra-filename=-630f5f343b126e35 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern libc=/home/osboxes/unicorn-rs/target/debug/deps/liblibc-83c2bd88b43ecde3.rlib --extern bitflags=/home/osboxes/unicorn-rs/target/debug/deps/libbitflags-349661f08b936847.rlib -L native=/home/osboxes/unicorn-rs/target/debug/build/libunicorn-sys-d5f4d690624f3a77/out -l static=unicorn`
error: could not find native static library `unicorn`, perhaps an -L flag is missing?

error: Could not compile `libunicorn-sys`.

Caused by:
  process didn't exit successfully: `rustc --crate-name libunicorn_sys libunicorn-sys/src/lib.rs --crate-type lib -g -C metadata=630f5f343b126e35 -C extra-filename=-630f5f343b126e35 --out-dir /home/osboxes/unicorn-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/osboxes/unicorn-rs/target/debug/deps --extern libc=/home/osboxes/unicorn-rs/target/debug/deps/liblibc-83c2bd88b43ecde3.rlib --extern bitflags=/home/osboxes/unicorn-rs/target/debug/deps/libbitflags-349661f08b936847.rlib -L native=/home/osboxes/unicorn-rs/target/debug/build/libunicorn-sys-d5f4d690624f3a77/out -l static=unicorn` (exit code: 101)

As you can see below, /lib/unicorn.a is there:

$ ls /lib | grep unicorn
libunicorn.a
libunicorn.so
libunicorn.so.0

from unicorn-rs.

raingloom avatar raingloom commented on July 28, 2024

Having the same problem and apparently it's not a linker problem. I checked the build output and got this:

cd qemu && \
./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu," 

ERROR: Cannot use 'python', Python 2.4 or later is required.
       Note that Python 3 or later is not yet supported.
       Use --python=/path/to/python to specify a supported Python.

cargo:rustc-link-search=native=/home/rain/slash-proc/target/debug/build/libunicorn-sys-44049ed65ab0c106/out
cargo:rustc-link-lib=static=unicorn

So it's because once again a project doesn't support a language version that should long ago have become the default. 😢

It would be better to have an option to use the system provided libunicorn imo.

from unicorn-rs.

ekse avatar ekse commented on July 28, 2024

@raingloom Thank you very much for reporting this. I added a check with pkgconfig to use the system version of unicorn if it is available instead of building it. Could you please test again with the latest version of the master branch?

A build option would be neat, looking at the cargo docs I couldn't find a way to specify a build option for a dependency based on the build option of a package (in my case I would need to set it for the sub-package libunicorn-sys). I'll look a bit more tomorrow.

eaecae6

from unicorn-rs.

raingloom avatar raingloom commented on July 28, 2024

@ekse the git version builds fine, so hooray! Thanks for the fix.

from unicorn-rs.

ekse avatar ekse commented on July 28, 2024

Ok perfect, I will prepare a new version.

from unicorn-rs.

ekse avatar ekse commented on July 28, 2024

Version 0.6.0 has been pushed to crates.io.

from unicorn-rs.

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.