Skip to content

Conversation

bartchr808
Copy link
Contributor

@bartchr808 bartchr808 commented Apr 21, 2019

PR stems from the conversation found with @rxwei in the mailing list here. Three things to note:

  1. I only have a macOS system so I cannot verify this on Linux. However, instructions are simple enough that this shouldn't be a problem.
  2. I'm still unsure what to do with java8. After running:
brew update 
brew tap caskroom/versions 
brew search java

java8 does not show up likely due to this PR (or something buggy on my computer...more on this in point 3.). I can add manual installation instructions instead of brew cask install caskroom/versions/java8 depending on what everyone thinks (I manually installed it).

  1. Unsure if these changes are related or if this is some other problem, but I'm having issues building swift using the utils/build-script --enable-tensorflow --release-debuginfo command as I get the following error:
clang: error: no such file or directory: 'Projects/swift-workspace/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/lib/Transforms/Hello/LLVMHello.exports'

However, I can't build swift from master either (instead it can't find the file Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/tools/clang/tools/driver/Info.plist) so this is likely some bug on my end unrelated to Bazel, java8, or the tensorflow branch. So I'll try to debug it myself. If I continue to have issues I will ping for help in the mailing list.

Copy link
Contributor

@rxwei rxwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rxwei
Copy link
Contributor

rxwei commented Apr 21, 2019

  1. Unsure if these changes are related or if this is some other problem, but I'm having issues building swift using the utils/build-script --enable-tensorflow --release-debuginfo command as I get the following error:

The error seems not to be a Bazel problem but related to LLVM. Here's the build command I use daily:

utils/build-script --enable-tensorflow --skip-build-benchmarks --llvm-targets-to-build X86 -R --no-swift-stdlib-assertions --export-compile-commands

Could you give this a try?

@rxwei rxwei merged commit 0d9cb2f into swiftlang:tensorflow Apr 21, 2019
@bartchr808
Copy link
Contributor Author

Could you give this a try?

It seems to still fail by not finding the file LLVMHello.exports like before. Still haven't found anything as to what may be causing this issue. I've tried completely uninstalling xcode, reinstalling it, and using the v0.2 swift tensorflow release toolchain. For more context on the error:

-- Build files have been written to: /Users/bart/Desktop/Side Projects/swift-workspace/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64
+ popd
~/Desktop/Side Projects/swift-workspace/apple-swift-fork
symlinking the system headers (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../usr/include/c++) into the local clang build directory (/Users/bart/Desktop/Side Projects/swift-workspace/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/include).
+ ln -s -f /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../usr/include/c++ '/Users/bart/Desktop/Side Projects/swift-workspace/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/include'
+ /usr/local/bin/cmake --build '/Users/bart/Desktop/Side Projects/swift-workspace/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64' -- -j4 all
[909/2625] Linking CXX shared module lib/LLVMHello.dylib
FAILED: lib/LLVMHello.dylib
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wno-class-memaccess -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -O3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -bundle -Wl,-headerpad_max_install_names -Wl,-flat_namespace -Wl,-undefined -Wl,suppress   -Wl,-dead_strip -Wl,-exported_symbols_list,/Users/bart/Desktop/Side Projects/swift-workspace/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/lib/Transforms/Hello/LLVMHello.exports -o lib/LLVMHello.dylib lib/Transforms/Hello/CMakeFiles/LLVMHello.dir/Hello.cpp.o  -Wl,-rpath,@loader_path/../lib && :
clang: error: no such file or directory: 'Projects/swift-workspace/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/lib/Transforms/Hello/LLVMHello.exports'
[912/2625] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/LoopVectorize.cpp.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

@bartchr808 bartchr808 deleted the bazel-java8-update branch April 21, 2019 22:15
@rxwei
Copy link
Contributor

rxwei commented Apr 22, 2019

Try sudo xcode-select -s /Applications/Xcode.app before building?

rxwei pushed a commit to rxwei/swift that referenced this pull request May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants