Code Monkey home page Code Monkey logo

russimp-sys's Introduction

russimp-sys's People

Contributors

alextmjugador avatar aregevdev avatar barogthor avatar eyhn avatar jkvargas avatar licynthiax avatar mxpv avatar notdanilo avatar pema99 avatar penberg avatar virtualritz avatar vpzomtrrfrt avatar waych avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

russimp-sys's Issues

"Failed to run custom build command" for russimp-sys when adding russimp as a dependency

I didn't see any special instructions here or on the repository for russimp so I assumed everything related to assimp was going to be handled automatically. I'm using IntelliJ IDEA on Ubuntu 20.10 if that affects anything.

Error message:

ethan@ethan-gamingdesktop:/mnt/ssd/Projects/cw_building_editor$ cargo run
   Compiling russimp-sys v0.2.3
error: failed to run custom build command for `russimp-sys v0.2.3`

Caused by:
  process didn't exit successfully: `/mnt/ssd/Projects/cw_building_editor/target/debug/build/russimp-sys-595a9b8ede4516a9/build-script-build` (exit status: 101)
  --- stderr
  wrapper.h:1:10: fatal error: 'assimp/cimport.h' file not found
  wrapper.h:1:10: fatal error: 'assimp/cimport.h' file not found, err: true
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', /home/ethan/.cargo/registry/src/github.com-1ecc6299db9ec823/russimp-sys-0.2.3/build.rs:31:10

Support status for cross-compiling to aarch64-linux-android from Windows?

I'm attempting to use russimp with an Android target.
I have set russimp = { version = "1.0.5", features = ["static-link"] } in Cargo.toml, installed Clang with Visual Studio Installer, and installed Ninja, then I ran the build with cargo apk build.
I get this error below, which looks like clang's still building for Windows and isn't doing cross-compilation at all. So I wonder if this is supported / will be supported, if not in which direction I should work toward to get it working, and if I had done something silly.

Cannot Add new header files in wrapper.h

Hello,

I am trying to add the version functions to russimp-sys, I am adding #include <assimp/version.h> inside wrapper.h. bindgen runs successfully but does not generate the added functions.

No matter what I try, I cannot make it work, it's like bindgen ignores the file completely.
Do you know anything about it?

Thanks

Prebuilt and static link

Hi, thank you for creating this library.
I would like to ask if there are plans to provide a static link version and a pre-built download of the library. So that users can use it without installing vspkg. Just like rust-skia.
I can contribute this part of the code if you want.

russimp-sys v2.0.2 prebuilt package is corrupt, for aarch64-apple-darwin

When building a project with a dependency on russimp-sys v2.0.2 using the prebuilt flag, the downloaded archive seems to be corrupt.

cargo build --features prebuilt
   Compiling russimp-sys v2.0.2
error: failed to run custom build command for `russimp-sys v2.0.2`

Caused by:
  process didn't exit successfully: `/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-c02ae01bc0e8e6fe/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-link-search=native=/opt/homebrew/lib/

  --- stderr
  [/Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/build.rs:146:5] ar_src_dir.join(&archive_name) = "/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-155fc026083726a0/out/russimp-2.0.2-aarch64-apple-darwin-dylib.tar.gz"
  thread 'main' panicked at /Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/build.rs:152:34:
  called `Result::unwrap()` on an `Err` value: Custom { kind: UnexpectedEof, error: TarError { desc: "failed to iterate over archive", io: Kind(UnexpectedEof) } }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Checking the downloaded package manually also confirms that the archive seems corrupt:

tar -xzvf /Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-155fc026083726a0/out/russimp-2.0.2-aarch64-apple-darwin-dylib.tar.gz
tar: Error opening archive: Unrecognized archive format

#Include <assimp/cexport.h>

I was recently writing up a project that uses russimp and by proxy russimp-sys. I noticed that in wrapper.h, cexport.h is not included. I was hoping, even though it would be unsafe, to use bindings from the cexport.h wrapper to help export some files that I load in after doing some work on them.

I was hoping to ask about the reasoning, would we be able to include?

wrapper.h:1:10: fatal error: 'assimp/cimport.h' file not found

Hello, when I add russimp as a dependency to my Rust project,
I get the following error:

   Compiling russimp-sys v0.2.4
error: failed to run custom build command for `russimp-sys v0.2.4`

Caused by:
  process didn't exit successfully: `C:\Users\Antonio\Documents\IdeaProjects\RustEngine\patina_engine\target\debug\build\russimp-sys-8391213aad959fd2\build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=user32
  cargo:rustc-link-lib=gdi32

  --- stderr
  wrapper.h:1:10: fatal error: 'assimp/cimport.h' file not found
  wrapper.h:1:10: fatal error: 'assimp/cimport.h' file not found, err: true
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', C:\Users\Antonio\.cargo\registry\src\github.com-1ecc6299db9ec823\russimp-sys-0.2.4\build.rs:31:10
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:515
     1: core::panicking::panic_fmt
               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\core\src\panicking.rs:92
     2: core::result::unwrap_failed
               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\core\src\result.rs:1355
     3: enum$<core::result::Result<bindgen::Bindings, tuple<>>, 0, 1, Ok>::unwrap<bindgen::Bindings,tuple<>>
               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\library\core\src\result.rs:1037
     4: build_script_build::main
               at .\build.rs:29
     5: core::ops::function::FnOnce::call_once<fn(),tuple<>>
               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\library\core\src\ops\function.rs:227
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I am using Windows 10, Cargo version 1.54.0, LLVM Version 12.0.1 (just installed it for this purpose)

C:\Users\Antonio\Documents\IdeaProjects\RustEngine\patina_engine is the location of my Rust project.

Use cmake + bindgen to generate buildings on the fly?

It looks like bindings.rs was generated with bindgen.
I would suggest add assimp as a subrepo to this repo, run CMake via the cmake crate to build assimp and then run the bindgen builder on that, all from within build.rs.

I have written a few wrappers and I am happy to lend a hand with this. I am on a Mac so I will also help making sure building russimp-sys/russimp on that platform works.

I hang out on Discord lots under the same handle I have on github. Rust servers, Rust gamedev, Bevy etc. Hit me up there if you want to chat directly.

Build.rs on Windows

Building on Windows currently has two fundamental issues.

  1. The provided library name ("assimp") and directory ("/usr/local/lib") don't match what is created by the vcpkg bootstrap script.
  2. The bootstrap script doesn't really play nice with using cargo for dependency management.

Doing a bit of digging I think i've found solutions to both of these problems. I'll submit a PR with more details.

russimp-sys v2.0.2 crate is missing assimp submodule files

If I try to build any project that depends on russimp-sys v2.0.2, with the static-link feature enabled, I get the following errors:

--feature static-link

Compiling russimp-sys v2.0.2
error: failed to run custom build command for `russimp-sys v2.0.2`

Caused by:
  process didn't exit successfully: `/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-5a77813b25b441d9/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-link-search=native=/opt/homebrew/lib/
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-darwin = None
  CMAKE_GENERATOR_aarch64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-darwin = None
  CMAKE_aarch64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-830a010e74442d13/out/static/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/assimp" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DBUILD_SHARED_LIBS=OFF" "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF" "-DASSIMP_BUILD_TESTS=OFF" "-DASSIMP_BUILD_ZLIB=ON" "-DLIBRARY_SUFFIX=" "-DCMAKE_INSTALL_PREFIX=/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-830a010e74442d13/out/static" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=14.4" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=14.4" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=14.4" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"

  --- stderr
  CMake Warning:
    Ignoring extra path from command line:

     "/Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/assimp"


  CMake Error: The source directory "/Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/assimp" does not appear to contain CMakeLists.txt.
  Specify --help for usage, or press the help button on the CMake GUI.
  thread 'main' panicked at /Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

After inspecting the crates src folder I realized that the assimp git submodule files were missing.

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.