google / gemmlowp

Low-precision matrix multiplication
Apache License 2.0
1.78k stars 451 forks source link

iOS gemmlowp_test failed with linker #140

Closed harouwu closed 6 years ago

harouwu commented 6 years ago

Hi all at gemmlowp,

When I was playing with gemmlowp_test folder on iOS with xcode 9.4. I have linker issue with RandomEngine. (probably the one in test.h in gemmlowp_test folder)

duplicate symbol __ZN8gemmlowp12RandomEngineEv in:
    /Users/wyiming/Library/Developer/Xcode/DerivedData/gemmlowp_test-fuolktnjvyekdvhaevdpoedkksum/Build/Intermediates.noindex/gemmlowp_test.build/Debug-iphonesimulator/gemmlowp_test.build/Objects-normal/x86_64/test.o
    /Users/wyiming/Library/Developer/Xcode/DerivedData/gemmlowp_test-fuolktnjvyekdvhaevdpoedkksum/Build/Intermediates.noindex/gemmlowp_test.build/Debug-iphonesimulator/gemmlowp_test.build/Objects-normal/x86_64/benchmark.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

would you mind help looking into this? :)

bjacob commented 6 years ago

should be fixed by https://github.com/google/gemmlowp/commit/6c8f5d41aa27aec992bcb75e1279a4bcea5ba6ea , please confirm.

harouwu commented 6 years ago

@bjacob thx for the quick reply. Then I have:

CpResource /Users/wyiming/Code/gemmlowp/README /Users/wyiming/Library/Developer/Xcode/DerivedData/gemmlowp_test-fuolktnjvyekdvhaevdpoedkksum/Build/Products/Debug-iphonesimulator/gemmlowp_test.app/README
    cd /Users/wyiming/Code/gemmlowp/test/ios
    export PATH="/Applications/Xcode_9.4.0_fb.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode_9.4.0_fb.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/wyiming/Code/gemmlowp/README /Users/wyiming/Library/Developer/Xcode/DerivedData/gemmlowp_test-fuolktnjvyekdvhaevdpoedkksum/Build/Products/Debug-iphonesimulator/gemmlowp_test.app

error: /Users/wyiming/Code/gemmlowp/README: No such file or directory

looks like its looking for README instead of README.md

bjacob commented 6 years ago

ah, ... i have no idea about that one. fixes welcome.

harouwu commented 6 years ago

So it turns out that in current build, some txt/README file is required but they dont exist anymore. After creating some fake README/x86-packing***.txt, iOS gemmlowp_test builds again.

I would recommend a fix from main contributor since I am pretty new in xcode related stuff.

Anyway. Thanks! @bjacob