[TIMOB-23703] Hyperloop iOS - CompileC fails due to missing ".h" file
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2016-09-24T16:41:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Hyperloop, iOS |
Labels | build, fail, hyperloop, ios |
Reporter | Rodolfo Perottoni |
Assignee | Hans Knöchel |
Created | 2016-07-29T04:48:15.000+0000 |
Updated | 2017-03-24T17:58:14.000+0000 |
Description
I'm trying to build a new project with Braintree ('pod Braintree') included in it.
Braintree is downloaded successfully, but when xcodebuild is run i get this error:
[TRACE] CompileC build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/Objects-normal/i386/braintree.o /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/hyperloop/ios/js/braintree/braintree.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[TRACE] cd /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone
[TRACE] export LANG=en_US.US-ASCII
[TRACE] export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/rodolfo/Documents/Development/android-sdk-macosx/platform-tools:/usr/local/apache-ant/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
[TRACE] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fmodules -fmodules-cache-path=/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wno-parentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEPLOYTYPE=development -D__LOG__ID__=e593fbe8-f283-42dd-9eee-5f3ccc0c1cf0 -DDEBUG=1 -DTI_VERSION=5.4.0 -DLAUNCHSCREEN_STORYBOARD=1 -DDEFAULT_BGCOLOR_RED=1 -DDEFAULT_BGCOLOR_GREEN=1 -DDEFAULT_BGCOLOR_BLUE=1 -DCOCOAPODS=1,DEPLOYTYPE=development -D__LOG__ID__=e593fbe8-f283-42dd-9eee-5f3ccc0c1cf0 -DDEBUG=1 -DTI_VERSION=5.4.0 -DLAUNCHSCREEN_STORYBOARD=1 -DDEFAULT_BGCOLOR_RED=1 -DDEFAULT_BGCOLOR_GREEN=1 -DDEFAULT_BGCOLOR_BLUE=1 -DHYPERLOOP=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=7.1 -g -fvisibility=hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/loopmodules-braintree-generated-files.hmap -I/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/loopmodules-braintree-own-target-headers.hmap -I/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/loopmodules-braintree-all-target-headers.hmap -iquote /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/loopmodules-braintree-project-headers.hmap -I/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/include/libxml2 -Iheaders -I/Users/rodolfo/Documents/Workspace/loopmodules-braintree/Pods/Headers/Public -I/Users/rodolfo/Documents/Workspace/loopmodules-braintree/Pods/Headers/Public/Braintree -I/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/DerivedSources/i386 -I/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/DerivedSources -F/Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Products/Debug-iphonesimulator -DDEBUG -isystem /Users/rodolfo/Documents/Workspace/loopmodules-braintree/Pods/Headers/Public -isystem /Users/rodolfo/Documents/Workspace/loopmodules-braintree/Pods/Headers/Public/Braintree -fobjc-arc -include /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/PrecompiledHeaders/loopmodules_braintree_Prefix-aypmzwipowsruwdtrbhtlcvzcltk/loopmodules_braintree_Prefix.pch -MMD -MT dependencies -MF /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/Objects-normal/i386/braintree.d --serialize-diagnostics /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/Objects-normal/i386/braintree.dia -c /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/hyperloop/ios/js/braintree/braintree.m -o /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/iphone/build/Intermediates/loopmodules-braintree.build/Debug-iphonesimulator/loopmodules-braintree.build/Objects-normal/i386/braintree.o
[TRACE] /Users/rodolfo/Documents/Workspace/loopmodules-braintree/build/hyperloop/ios/js/braintree/braintree.m:7:9: fatal error: 'Braintree/Braintree.h' file not found
[TRACE] #import <Braintree/Braintree.h>
[TRACE] ^
[TRACE] 1 error generated.
So, the *braintree.m* file that is being generated under */build/hyperloop/ios/js/braintree* is trying to import *Braintree.h*, but can't find it.
Steps to reproduce:
1. Create new hyperloop enabled project with appc 5.4.0-31
2. In your podfile, use *pod 'Braintree'*
3. In a controller, put this:
var core = require('Braintree/BraintreeCore');
var client = require('Braintree/BTAPIClient');
4. Try and build project with the environment mentioned above
I guess the way you are requiring it is incorrectly, unless
BraintreeCore
is a class-name. We can take a look into that next sprint.@Hans Knoechel in this case BraintreeCore is indeed a class name. But the problem itself is not the requires, but instead the "missing" *.h* file referenced in the generated *.m* file.
Yes, but the classes being generated are (party) based on the Hyperloop-code that you write. Thanks for clearing.
Closing ticket as invalid with reference to the above comments.