zxingify / zxingify-objc

An Objective-C Port of ZXing
Apache License 2.0
3.06k stars 752 forks source link

Xcode 12 and Carthage build failure #510

Closed Streetmage closed 3 years ago

Streetmage commented 3 years ago

I'm using the latest Xcode 12 and Carthage (v0.36.0) to build framework and have the further issue while compiling.

/Carthage/Checkouts/ZXingObjC/ZXingObjC/datamatrix/decoder/ZXDataMatrixDecodedBitStreamParser.m:224:57: error:
 expression does not compute the number of elements in this array; 
element type is 'const unichar' (aka 'const unsigned short'), not 'char' [-Werror,-Wsizeof-array-div]
        } else if (cValue < sizeof(C40_BASIC_SET_CHARS) / sizeof(char)) {

Compilation itself fails without creating a framework.

Now, the only workaround I see is to get ZXingObjC framework that was built with previous Xcode 11 and put it outside the Carthage folder.

willemfrishert commented 3 years ago

@Streetmage I'm hitting the same issue but it appears that it was already fixed on master as part of this commit by https://github.com/zxingify/zxingify-objc/commit/5267eb79fbe3f9cec7cad889b15a6c9ab8670724 by @benjohnde.

As a temporary solution I'm pointing my Cartfile to use the latest hash on master. The downside is that it won't automatically pick up the next minor/patch release but at least you will have a stable build, even when master gets updated

github "zxingify/zxingify-objc" "5267eb79fbe3f9cec7cad889b15a6c9ab8670724"

@benjohnde do we have any timeline when this could be released?

benjohnde commented 3 years ago

I am very sorry for the inconvenience. Release is done and should work, please feedback if that helps.

willemfrishert commented 3 years ago

Thanks @benjohnde. I just tested release 3.6.7 with Xcode 12 and Carthage (v0.36.0) and can confirm that it works for me.

@Streetmage, could you also confirm from you side?