Giter Site home page Giter Site logo

Comments (4)

mfronczyk avatar mfronczyk commented on June 8, 2024 1

I removed this flag:

      .flag("-march=native")

and building proceeded, but now I have some problems with bindgen. Why is this flag needed?

from croaring-rs.

squarfed avatar squarfed commented on June 8, 2024

Same problem under android

from croaring-rs.

mcdallas avatar mcdallas commented on June 8, 2024

I had the same problem when trying to cross compile for ARM.

running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=armv7-a" "-Wall" "-Wextra" "-std=c11" "-march=native" "-O3" "-o" "/home/mike/Projects/grin/target/armv7-unknown-linux-gnueabihf/release/build/croaring-sys-11b6789469044cb7/out/CRoaring/roaring.o" "-c" "CRoaring/roaring.c"
cargo:warning=cc1: error: unrecognized argument in option ‘-march=native’
cargo:warning=cc1: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv5tej armv6 armv6-m armv6j armv6k armv6kz armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc armv8-m.base armv8-m.main armv8-m.main+dsp armv8.1-a armv8.2-a armv8.2-a+dotprod armv8.2-a+fp16 armv8.2-a+fp16+dotprod iwmmxt iwmmxt2
exit code: 1

I removed the .flag("-march=native") then run into:

running: "ar" "crs" "/home/mike/Projects/grin/target/armv7-unknown-linux-gnueabihf/release/build/croaring-sys-125e23bd39f5a4ce/out/libroaring.a" "/home/mike/Projects/grin/target/armv7-unknown-linux-gnueabihf/release/build/croaring-sys-125e23bd39f5a4ce/out/CRoaring/roaring.o"
exit code: 0
cargo:rustc-link-lib=static=roaring
cargo:rustc-link-search=native=/home/mike/Projects/grin/target/armv7-unknown-linux-gnueabihf/release/build/croaring-sys-125e23bd39f5a4ce/out

--- stderr
/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found, err: true
thread 'main' panicked at 'Unable to generate bindings: ()', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

which went away with apt-get install libc6-dev-i386

from croaring-rs.

saulius avatar saulius commented on June 8, 2024

Why is this flag needed?

Official CRoaring build scripts use this flag to enable CPU optimizations.

I removed this flag:

Can you please tell me if switching: .flag("-march=native") to .flag_if_supported("-march=native") helps in this case? I can't reproduce this on Mojave.

from croaring-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.