evermeer / PassportScanner

Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer.
BSD 3-Clause "New" or "Revised" License
457 stars 101 forks source link

could not build the project #20

Closed aatish-rajkarnikar closed 5 years ago

aatish-rajkarnikar commented 5 years ago

i downloaded the project and tried to build but facing some difficulties. i am using Xcode 10. here is the screenshot of the error.

screen shot 2018-10-08 at 2 00 02 pm
aatish-rajkarnikar commented 5 years ago

i was able to solve above issues by changing the swift language version to 4 in build setting. however another issue shows up. do you have any idea what i might be missing?

screen shot 2018-10-08 at 2 25 05 pm
evermeer commented 5 years ago

I just pushed an updated version to GitHub that builds again. The cocoapods publish is still running (can take 15 minutes)

aatish-rajkarnikar commented 5 years ago

Thank you for the response... i will check and let you know!! 👍

evermeer commented 5 years ago

Tip: When doing a pod update you will get a build error, you have to rename one of the 2 config_auto.h files (for instance to config_auto2.h) This is an issue with the Tesseract pod in Xcode 10

aatish-rajkarnikar commented 5 years ago

okay! i will keep note of that!

aatish-rajkarnikar commented 5 years ago

there is still no update on master branch. am i supposed to check testSwiftOCR branch?

aatish-rajkarnikar commented 5 years ago

i did checked that branch too coz it is the only branch with a commit in an hour. and i can see that you switched from Tesseract to SwiftOCR which is completely fine but inside the project you are still using tesseract. so i still cannot build.

evermeer commented 5 years ago

the 'pod trunk push' failed without much details. I'm currently at work. Will try again this evening (now 3PM)

punto2018 commented 5 years ago

Hi, I've tried with both xcode 9 and 10 and it fails when compiling. Errors are the following:

schermata 2018-10-09 alle 09 54 25

Any idea? Thanks

aatish-rajkarnikar commented 5 years ago

@punto2018 i had the same issue and there were some spell mistakes like "h" missing in adaptiveTreshold, extra "b" in abbortScan and extra "l" in sucessfullScan. i still could not fix the override issue.

evermeer commented 5 years ago

@punto2018 @aatish-rajkarnikar Yes, these methods were corrected in GpuImage2 and are fixed on GitHub. But for some reason I'm not able to push it to cocoapods.

   Build system information
    error: Multiple commands produce '/Users/evermeer/Library/Developer/Xcode/DerivedData/App-gqnvdxexmbzjomfqihexcvijpngc/Build/Products/Release-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/PrivateHeaders/config_auto.h':
    1) Target 'TesseractOCRiOS' (project 'Pods') has copy command from '/var/folders/j2/52xmmb8j27j_41bv8lg0cp1r0000gn/T/CocoaPods-Lint-20181008-58176-15aag8j-PassportScanner/Pods/TesseractOCRiOS/TesseractOCR/include/leptonica/config_auto.h' to '/Users/evermeer/Library/Developer/Xcode/DerivedData/App-gqnvdxexmbzjomfqihexcvijpngc/Build/Products/Release-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/PrivateHeaders/config_auto.h'
    2) Target 'TesseractOCRiOS' (project 'Pods') has copy command from '/var/folders/j2/52xmmb8j27j_41bv8lg0cp1r0000gn/T/CocoaPods-Lint-20181008-58176-15aag8j-PassportScanner/Pods/TesseractOCRiOS/TesseractOCR/include/tesseract/config_auto.h' to '/Users/evermeer/Library/Developer/Xcode/DerivedData/App-gqnvdxexmbzjomfqihexcvijpngc/Build/Products/Release-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/PrivateHeaders/config_auto.h'

    ** BUILD FAILED **

I did have that problem locally. It could be fixed by simply renaming one of the config_auto.h files. I still have not found out how to solve this issue.

apparently it's a know tesseract issue that won't be fixed: https://github.com/tesseract-ocr/tesseract/issues/1524

evermeer commented 5 years ago

It appeared not to be a tesseract issue but an issue with the implementation of tesseract in the library TesseractOCRiOS. fortunately someone was able to fix that issue and published it as cocoa pod TesseractOCRSDKiOS. I was able to publish a new PasportScanner version 3.0.3

aatish-rajkarnikar commented 5 years ago

Thanks for the help now its build sucessfuly