Giter Site home page Giter Site logo

Fix builds for 0.7.0 about bindgen HOT 6 OPEN

papierkorb avatar papierkorb commented on June 16, 2024
Fix builds for 0.7.0

from bindgen.

Comments (6)

ZaWertun avatar ZaWertun commented on June 16, 2024
"LLVM_VER" "GREATER_EQUAL" "10"
  Unknown arguments specified

I think it caused by old CMake.

from bindgen.

kalinon avatar kalinon commented on June 16, 2024

ah. yeah i ran into this somewhere else. may need to compile it

from bindgen.

docelic avatar docelic commented on June 16, 2024

Given that @ZaWertun added the GenericVersion class which has since been used in a couple more places in bindgen/qt5, how about we simply don't make this check in cmake, but elsewhere?

One option would be to simply extend find_clang.cr so that it accepts two versions from command line and returns the result of comparison (done via GenericVersion) through its exit status.

Or another alternative could be that we ourselves detect and set the c++ standard as part of find_clang rather than expecting cmake to detect and pass it.

from bindgen.

docelic avatar docelic commented on June 16, 2024

GREATER_EQUAL 10 was just fixed by using GREATER 9.

The issue that pops up now is:

In src/bindgen/library.cr:5:1
 5 | require "json_mapping"
     ^
Error: can't find file 'json_mapping'

Is it possible that shards is not being run in these builds?

from bindgen.

kalinon avatar kalinon commented on June 16, 2024

probably not. i probably just introduced that build bug.

from bindgen.

HertzDevil avatar HertzDevil commented on June 16, 2024

Looks like builds now fail with

clang: error: -Wl,-fuse-ld=gold: 'linker' input unused [-Werror,-Wunused-command-line-argument]

The culprit may be

OPTIONS[:llvm_cxx_flags] = output_of(OPTIONS[:llvm_config], "--cxxflags")
.gsub(/-fno-exceptions/, "")
.gsub(/-W[^alp].+\s/, "")
.gsub(/\s+/, " ")

It should be okay to drop linker flags here (-Wl,*) as the generated command line is compile-only (-c):

bindgen/clang/find_clang.cr

Lines 145 to 147 in 3f02883

build: "#{clang} #{llvm_cxx_flags} #{system_include_dirs.map{ |x| "-I#{File.expand_path(x)}" }.join(' ')}" \
" -c -o {SPEC_NAME}.o {SPEC_NAME}.cpp -I.. -Wall -Werror -Wno-unused-function" \
"#{dynamic ? "" : " -fPIC" }",

from bindgen.

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.