Closed alizainprasla closed 5 years ago
Build command to reproduce this? "make -j16 dist" works on my system building the latest with Xcode 10.2.
The build uses j2objc/scripts/sysroot_path.sh, which for watchos returns (again on my system):
$ scripts/sysroot_path.sh --watchos
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS5.2.sdk
What does that return on your system? It should return an existing SDK directory.
@tomball Thanks for your response.
I was using xcode 10.1. i changed my xcode to version 10.2 and default it from terminal
sudo xcode-select -switch /Applications/Xcode10.2.1/
I tried again with the required tool.
java : javac 1.8.0_211
**xcode** : 10.2.1
**maven** : Maven home: /usr/local/Cellar/maven/3.6.1/libexec
Java version: 1.8.0_211, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Default locale: en_PK, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.5", arch: "x86_64", family: "mac"
and then run make -j16 dist
and got this error.
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/patterns/FunctionPattern.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/XPath.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/Arg.o] Error 1
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/axes/DescendantIterator.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/axes/IteratorPool.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/patterns/NodeTestFilter.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/patterns/StepPattern.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/VariableStack.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/domapi/XPathStylesheetDOM3Exception.o] Error 1
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/patterns/NodeTest.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/WhitespaceStrippingElementMatcher.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/res/XPATHErrorResources.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/res/XPATHMessages.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/patterns/UnionPattern.o] Error 1
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/patterns/ContextMatchStepPattern.o] Error 1
clang: error: no such sysroot directory: '-fembed-bitcode' [-Werror,-Wmissing-sysroot]
make[1]: *** [/Users/alizain/Downloads/j2objc-master/xalan/build_result/objs-iphone64/org/apache/xpath/axes/UnionChildIterator.o] Error 1
make: *** [xalan_dist] Error 2
@tomball. while i am installing j2objc. Below are last logs and i stop processing. Does it complete installation ?
install -m 0644 /Users/alizain/Downloads/j2objc-master/guava/android/build_result/objs-macosx/libguavaandroid.a /Users/alizain/Downloads/j2objc-master/guava/android/build_result/macosx/libguavaandroid.a
Building libguava.a
Building libguava.a
Building libguava.a
Building libguava.a
Building libguava.a
Building libguava.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-appletvos/libguava.a /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-appletvsimulator/libguava.a -output /Users/alizain/Downloads/j2objc-master/guava/build_result/appletvos/libguava.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/alizain/Downloads/j2objc-master/guava/android/build_result/objs-iphone64/libguavaandroid.a /Users/alizain/Downloads/j2objc-master/guava/android/build_result/objs-simulator64/libguavaandroid.a -output /Users/alizain/Downloads/j2objc-master/guava/android/build_result/libguavaandroid.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/alizain/Downloads/j2objc-master/guava/android/build_result/objs-watchv7k/libguavaandroid.a /Users/alizain/Downloads/j2objc-master/guava/android/build_result/objs-watch64/libguavaandroid.a /Users/alizain/Downloads/j2objc-master/guava/android/build_result/objs-watchsimulator/libguavaandroid.a -output /Users/alizain/Downloads/j2objc-master/guava/android/build_result/watchos/libguavaandroid.a
install -m 0644 /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-macosx/libguava.a /Users/alizain/Downloads/j2objc-master/guava/build_result/macosx/libguava.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-iphone64/libguava.a /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-simulator64/libguava.a -output /Users/alizain/Downloads/j2objc-master/guava/build_result/libguava.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-watchv7k/libguava.a /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-watch64/libguava.a /Users/alizain/Downloads/j2objc-master/guava/build_result/objs-watchsimulator/libguava.a -output /Users/alizain/Downloads/j2objc-master/guava/build_result/watchos/libguava.a
Yes, Guava is the last library built. To verify it built correctly, you can optionally run "make -j16 test".
@tomball Thanks sir.
I run make -j16 test and result and the end was completed.
Building test executable...
../dist/j2objcc -g -Wall -Werror -Wshorten-64-to-32 -Wimplicit-function-declaration -Wmissing-field-initializers -Wduplicate-method-match -Wno-unused-variable -Wno-nullability-completeness -Wno-unused-label -Wno-dangling-else -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -ljre_emul -l junit -L/Users/alizain/Downloads/j2objc-master/jre_emul/build_result/tests -l test-support -ObjC ...
JUnit version 4.11
....................
I am not able to run j2objc on my command line.
"I am not able to run j2objc on my command line." That tells me (or any other engineer) next to nothing. Consider reading How to Report Bugs Effectively.
Since you successfully built j2objc, my guess is you are new to command line shells. Scripts and executables cannot be found by a shell unless you either a) include the command's full path, or b) add the directory of that path to the shell's PATH variable. To run using j2objc's full path, run "wherever-the-j2objc-copy-is/dist/j2objc".
Running "echo $PATH" will list each directory your shell will look for an executable, separated by ':' characters. Is your "wherever-the-j2objc-copy-is/dist" listed in your PATH? If not, you can temporarily add it with the following:
export PATH="$PATH:wherever-the-j2objc-copy-is/dist"
This enables the shell to locate all of j2objc's commands, but only in that shell window (open a new one, and the PATH won't have that update). To permanently add that directory, edit your "~/.bashrc" file and add the export command above.
Command shells are awesome productivity boosters for software developers, and well worth the time learning them in depth. There are lots of free resources, such as A Command Line Primer for Beginners.
And if you're already a shell expert, please accept my apology and read the blog on writing good bug reports.
Please accept my apology for unpleasant question. Will definitely take care to the guideline you shared. I am new to command line shells. Thank you for your detailed instructions to incomplete question. It's working smooth.
Facing issue while installing j2objc