{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/1914","repository_url":"https://api.github.com/repos/dmlc/mxnet","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/1914/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/1914/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/1914/events","html_url":"https://github.com/dmlc/mxnet/issues/1914","id":149862963,"number":1914,"title":"MXNet Amalgamation iOS compilation","user":{"login":"RishabGargeya","id":8361488,"avatar_url":"https://avatars.githubusercontent.com/u/8361488?v=3","gravatar_id":"","url":"https://api.github.com/users/RishabGargeya","html_url":"https://github.com/RishabGargeya","followers_url":"https://api.github.com/users/RishabGargeya/followers","following_url":"https://api.github.com/users/RishabGargeya/following{/other_user}","gists_url":"https://api.github.com/users/RishabGargeya/gists{/gist_id}","starred_url":"https://api.github.com/users/RishabGargeya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RishabGargeya/subscriptions","organizations_url":"https://api.github.com/users/RishabGargeya/orgs","repos_url":"https://api.github.com/users/RishabGargeya/repos","events_url":"https://api.github.com/users/RishabGargeya/events{/privacy}","received_events_url":"https://api.github.com/users/RishabGargeya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-20T19:27:45Z","updated_at":"2016-04-21T07:52:42Z","closed_at":null,"body":"Hi all,\r\n\r\nI am using MXNet amalgamation for prediction on iOS and am running into an issue -- here is the situation:\r\nMy goal is to build a prediction model for iOS using the c_predict_api.h and mxnet_predict-all.cc files downloaded from the demo: https://github.com/pppoe/WhatsThis-iOS/tree/master/WhatIsThis/MXNet\r\n\r\nWhen building the project in xcode, I am able to successfully load a trained mxnet model and predict when building for the iPhone 6, but when building for the iPhone 5, I am getting this error:\r\n\r\n```\r\nUndefined symbols for architecture i386:\r\n  \"__tlv_bootstrap\", referenced from:\r\n      mxnet::common::ThreadLocalStore<ErrorEntry>::Get()::ptr in mxnet_predict-all.o\r\nld: symbol(s) not found for architecture i386\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\n```\r\n\r\nI am kind of confused as to why this error would show up when building for certain devices and not for others. Any ideas?\r\n\r\nThanks so much for your help!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/comments/212791717","html_url":"https://github.com/dmlc/mxnet/issues/1914#issuecomment-212791717","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/1914","id":212791717,"user":{"login":"RishabGargeya","id":8361488,"avatar_url":"https://avatars.githubusercontent.com/u/8361488?v=3","gravatar_id":"","url":"https://api.github.com/users/RishabGargeya","html_url":"https://github.com/RishabGargeya","followers_url":"https://api.github.com/users/RishabGargeya/followers","following_url":"https://api.github.com/users/RishabGargeya/following{/other_user}","gists_url":"https://api.github.com/users/RishabGargeya/gists{/gist_id}","starred_url":"https://api.github.com/users/RishabGargeya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RishabGargeya/subscriptions","organizations_url":"https://api.github.com/users/RishabGargeya/orgs","repos_url":"https://api.github.com/users/RishabGargeya/repos","events_url":"https://api.github.com/users/RishabGargeya/events{/privacy}","received_events_url":"https://api.github.com/users/RishabGargeya/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T07:52:42Z","updated_at":"2016-04-21T07:52:42Z","body":"Would this be it? I'm copying this from the \"View -> Show Report Navigator -> Build\" page, under the Link dropdown menu.\r\n\r\niPhone 5:\r\n```\r\nLd /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator/emr.app/emr normal i386\r\n    cd /Users/rishabgargeya/Desktop/test/EMR2/emr_test\r\n    export IPHONEOS_DEPLOYMENT_TARGET=9.2\r\n    export PATH=\"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\"\r\n    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -L/Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator -L/Users/rishabgargeya/Desktop/test/EMR2/emr_test/opencv2.framework -L/Users/rishabgargeya/Desktop/test/EMR2/emr_test/opencv2.framework/Versions/A -F/Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator -F/Users/rishabgargeya/Desktop/test/EMR2/emr_test/build/Debug-iphoneos -F/Users/rishabgargeya/Desktop/test/EMR2/emr_test/emr_test -F/Users/rishabgargeya/Desktop/test/EMR2/emr_test -filelist /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Intermediates/EMR.build/Debug-iphonesimulator/emr.build/Objects-normal/i386/emr.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.2 -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -framework Agrume -framework Alamofire -framework Haneke -framework IQKeyboardManagerSwift -framework ImageViewer -framework PureLayout -framework SQLite -framework SwiftyButton -framework SwiftyDropbox -framework SwiftyJSON -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Intermediates/EMR.build/Debug-iphonesimulator/emr.build/Objects-normal/i386/emr.swiftmodule -framework Foundation -framework CoreImage -framework opencv2 -framework AssetsLibrary -framework AVFoundation -framework CoreGraphics -framework Accelerate -framework Pods -Xlinker -dependency_info -Xlinker /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Intermediates/EMR.build/Debug-iphonesimulator/emr.build/Objects-normal/i386/emr_dependency_info.dat -o /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator/emr.app/emr\r\n```\r\n\r\niPhone 6:\r\n```\r\nLd /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator/emr.app/emr normal x86_64\r\n    cd /Users/rishabgargeya/Desktop/test/EMR2/emr_test\r\n    export IPHONEOS_DEPLOYMENT_TARGET=9.2\r\n    export PATH=\"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\"\r\n    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -L/Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator -L/Users/rishabgargeya/Desktop/test/EMR2/emr_test/opencv2.framework -L/Users/rishabgargeya/Desktop/test/EMR2/emr_test/opencv2.framework/Versions/A -F/Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator -F/Users/rishabgargeya/Desktop/test/EMR2/emr_test/build/Debug-iphoneos -F/Users/rishabgargeya/Desktop/test/EMR2/emr_test/emr_test -F/Users/rishabgargeya/Desktop/test/EMR2/emr_test -filelist /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Intermediates/EMR.build/Debug-iphonesimulator/emr.build/Objects-normal/x86_64/emr.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.2 -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -framework Agrume -framework Alamofire -framework Haneke -framework IQKeyboardManagerSwift -framework ImageViewer -framework PureLayout -framework SQLite -framework SwiftyButton -framework SwiftyDropbox -framework SwiftyJSON -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Intermediates/EMR.build/Debug-iphonesimulator/emr.build/Objects-normal/x86_64/emr.swiftmodule -framework Foundation -framework CoreImage -framework opencv2 -framework AssetsLibrary -framework AVFoundation -framework CoreGraphics -framework Accelerate -framework Pods -Xlinker -dependency_info -Xlinker /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Intermediates/EMR.build/Debug-iphonesimulator/emr.build/Objects-normal/x86_64/emr_dependency_info.dat -o /Users/rishabgargeya/Library/Developer/Xcode/DerivedData/EMR-fcfhyiqcnpscotepubgkbokrncab/Build/Products/Debug-iphonesimulator/emr.app/emr\r\n```\r\n\r\nThe difference seems to be i386 vs x86_64 during compilation for iPhone 5 and iPhone 6 respectively."}}