bindgen icon indicating copy to clipboard operation
bindgen copied to clipboard

Fix builds for 0.7.0

Open kalinon opened this issue 5 years ago • 6 comments

Currently the builds are broken: https://travis-ci.org/github/Papierkorb/bindgen

kalinon avatar May 27 '20 17:05 kalinon

"LLVM_VER" "GREATER_EQUAL" "10"
  Unknown arguments specified

I think it caused by old CMake.

ZaWertun avatar May 27 '20 18:05 ZaWertun

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

kalinon avatar May 27 '20 21:05 kalinon

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.

docelic avatar May 27 '20 22:05 docelic

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?

docelic avatar Jun 17 '20 09:06 docelic

probably not. i probably just introduced that build bug.

kalinon avatar Jun 17 '20 11:06 kalinon

Looks like builds now fail with

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

The culprit may be

https://github.com/Papierkorb/bindgen/blob/3f028833f059e70b89cfa03b0686e145b70921b1/clang/find_clang.cr#L60-L63

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

https://github.com/Papierkorb/bindgen/blob/3f028833f059e70b89cfa03b0686e145b70921b1/clang/find_clang.cr#L145-L147

HertzDevil avatar Jun 23 '20 04:06 HertzDevil