bazel-xcode / bazel-xcode/PodToBUILD

Header file not found

Open
#118 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
330
Forks
68
PR merge metrics
No merged PRs in 30d

Description

Hey, Thank you so much for developing such a great tool!

Probably because I am not familiar with bazel, I just want to simply use the open source library "FBMemoryProfiler" in the project, but when I execute the command `bazel build //:PodToBuild-Example --sandbox_debug --keep_going`, the following error will be reported:
截屏2020-02-27上午10 11 08

```
While building module 'FBRetainCycleDetector' imported from bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBMemoryProfiler/FBMemoryProfiler_module_map/../../../../../../external/FBMemoryProfiler/FBMemoryProfiler/FBMemoryProfiler.h:22:
In file included from :1:
bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBRetainCycleDetector/FBRetainCycleDetector_module_map/../../../../../../external/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/BaseType.h:12:9: fatal error: 'string' file not found
#import
^~~~~~~~
While building module 'FBMemoryProfiler' imported from external/FBMemoryProfiler/FBMemoryProfiler/RetainCycles/FBRetainCyclePresenter.m:9:
In file included from :1:
bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBMemoryProfiler/FBMemoryProfiler_module_map/../../../../../../external/FBMemoryProfiler/FBMemoryProfiler/FBMemoryProfiler.h:22:9: fatal error: could not build module 'FBRetainCycleDetector'
#import
~~~~~~~^
external/FBMemoryProfiler/FBMemoryProfiler/RetainCycles/FBRetainCyclePresenter.m:9:9: fatal error: could not build module 'FBMemoryProfiler'
#import "FBRetainCyclePresenter.h"
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
ERROR: /private/var/tmp/_bazel_bytedance/f40f007aea084906eed728c98ae31477/external/FBMemoryProfiler/BUILD.bazel:234:1: Couldn't build file external/FBMemoryProfiler/_objs/FBMemoryProfiler/arc/FBMemoryProfilerViewController.o: C++ compilation of rule '@FBMemoryProfiler//:FBMemoryProfiler' failed (Exit 1) sandbox-exec failed: error executing command
(cd /private/var/tmp/_bazel_bytedance/f40f007aea084906eed728c98ae31477/sandbox/darwin-sandbox/163/execroot/__main__ && \
exec env - \
APPLE_SDK_PLATFORM=iPhoneSimulator \
APPLE_SDK_VERSION_OVERRIDE=13.2 \
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
PATH='/Users/bytedance/.rvm/gems/ruby-2.5.0/bin:/Users/bytedance/.rvm/gems/ruby-2.5.0@global/bin:/Users/bytedance/.rvm/rubies/ruby-2.5.0/bin:/usr/local/sbin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/bin:/opt/puppetlabs/bin:/usr/local/munki:/bin:/usr/local/opt/fzf/bin:/Users/bytedance/go/bin:/Users/bytedance/.rvm/bin:/Users/bytedance/bin:/Users/bytedance/.rvm/bin' \
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk \
TMPDIR=/var/folders/2d/glwc0r6d3lv498516d9yqyl80000gp/T/ \
XCODE_VERSION_OVERRIDE=11.3.1.11C504 \
/usr/bin/sandbox-exec -f /private/var/tmp/_bazel_bytedance/f40f007aea084906eed728c98ae31477/sandbox/darwin-sandbox/163/sandbox.sb /var/tmp/_bazel_bytedance/install/7afe40059062a3d2a6e3d7dae41ab49a/process-wrapper '--timeout=0' '--kill_delay=15' external/local_config_cc/wrapped_clang -arch x86_64 '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -O0 -DDEBUG -Wshorten-64-to-32 -Wbool-conversion -Wconstant-conversion -Wduplicate-method-match -Wempty-body -Wenum-conversion -Wint-conversion -Wunreachable-code -Wmismatched-return-types -Wundeclared-selector -Wuninitialized -Wunused-function -Wunused-variable -iquote external/FBMemoryProfiler -iquote bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBMemoryProfiler -iquote bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin -Iexternal/FBAllocationTracker/pod_support/Headers/Public -Ibazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBAllocationTracker/FBAllocationTracker_module_map -Iexternal/FBAllocationTracker/FBAllocationTracker_module_map -Iexternal/FBRetainCycleDetector/pod_support/Headers/Public -Ibazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBRetainCycleDetector/FBRetainCycleDetector_module_map -Iexternal/FBRetainCycleDetector/FBRetainCycleDetector_module_map -Iexternal/FBMemoryProfiler/pod_support/Headers/Public -Ibazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBMemoryProfiler/FBMemoryProfiler_module_map -Iexternal/FBMemoryProfiler/FBMemoryProfiler_module_map -MD -MF bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBMemoryProfiler/_objs/FBMemoryProfiler/arc/FBMemoryProfilerViewController.d -DOS_IOS -fno-autolink -isysroot __BAZEL_XCODE_SDKROOT__ -F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks -F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -fobjc-arc '-mios-simulator-version-min=9.0' -fexceptions -fasm-blocks '-fobjc-abi-version=2' -fobjc-legacy-dispatch -Wnon-modular-include-in-framework-module -g '-stdlib=libc++' '-DCOCOAPODS=1' '-DOBJC_OLD_DISPATCH_PROTOTYPES=0' -fdiagnostics-show-note-include-stack -fno-common -fembed-bitcode-marker '-fmessage-length=0' -fpascal-strings -fstrict-aliasing '-Wno-error=nonportable-include-path' '-DPOD_CONFIGURATION_RELEASE=0' -Iexternal/FBMemoryProfiler/pod_support/Headers/Public/FBMemoryProfiler/ '-fmodule-name=FBMemoryProfiler_pod_module' -fmodules '-fmodules-cache-path=bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/_objc_module_cache' -O0 '-DDEBUG=1' -c external/FBMemoryProfiler/FBMemoryProfiler/Controllers/FBMemoryProfilerViewController.m -o bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBMemoryProfiler/_objs/FBMemoryProfiler/arc/FBMemoryProfilerViewController.o)
While building module 'FBMemoryProfiler' imported from external/FBMemoryProfiler/FBMemoryProfiler/Controllers/FBMemoryProfilerViewController.m:9:
While building module 'FBRetainCycleDetector' imported from bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBMemoryProfiler/FBMemoryProfiler_module_map/../../../../../../external/FBMemoryProfiler/FBMemoryProfiler/FBMemoryProfiler.h:22:
In file included from :1:
bazel-out/ios-x86_64-min9.0-applebin_ios-ios_x86_64-fastbuild/bin/external/FBRetainCycleDetector/FBRetainCycleDetector_module_map/../../../../../../external/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/BaseType.h:12:9: fatal error: 'string' file not found
#import
```

The example project I used is as follows:
[Example.zip](https://github.com/pinterest/PodToBUILD/files/4259152/Example.zip)

Is there something straightforward I'm missing here? It feels like this should be mostly parallel to PINOperation, but that example works fine.

Thanks so much !

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.