[TIMOB-20117] scons not sees env variables
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2016-07-29T14:10:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling |
Labels | build, scons, sdk |
Reporter | Andrey Tkachenko |
Assignee | Chris Barber |
Created | 2015-11-21T19:58:26.000+0000 |
Updated | 2017-03-22T17:48:03.000+0000 |
Description
Steps to success build:
$ cd ~/Documents/work/titanium/titanium_mobile/
$ scons
scons: Reading SConscript files ...
Installing npm packages...
npm WARN package.json doctools@0.0.0 license should be a valid SPDX license expression
Building MobileSDK version 5.2.0, githash 94c017f
Exception: No Android SDK directory found:
File "/Users/falko/Documents/work/titanium/titanium_mobile/SConstruct", line 119:
sdk = AndroidSDK(ARGUMENTS.get("android_sdk", None), 23)
File "/Users/falko/Documents/work/titanium/titanium_mobile/support/android/androidsdk.py", line 48:
raise Exception('No Android SDK directory found')
$ echo $ANDROID_HOME
/Users/falko/Library/android-sdk-macosx/
$ scons android_sdk=$ANDROID_HOME
scons: Reading SConscript files ...
Installing npm packages...
npm WARN package.json doctools@0.0.0 license should be a valid SPDX license expression
Building MobileSDK version 5.2.0, githash 94c017f
java -cp /Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/ant.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/ant-launcher.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/xercesImpl.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/xml-apis.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/ant-nodeps.jar org.apache.tools.ant.launch.Launcher -Dant.home=build -Dkroll.v8.build.x86=1 -Dandroid.sdk=/Users/falko/Library/android-sdk-macosx/ -Dandroid.platform=/Users/falko/Library/android-sdk-macosx/platforms/android-23 -Dndk.build.args=JAVAH=javah -Dbuild.githash=94c017f -Dgoogle.apis=/Users/falko/Library/android-sdk-macosx/add-ons/addon-google_apis-google-23 -Dbuild.version=5.2.0 -buildfile build.xml full.build
Buildfile: /Users/falko/Documents/work/titanium/titanium_mobile/android/build.xml
clean.all:
[mkdir] Created dir: /Users/falko/Documents/work/titanium/titanium_mobile/dist/android/classes/ant-tasks
[javac] Compiling 8 source files to /Users/falko/Documents/work/titanium/titanium_mobile/dist/android/classes/ant-tasks
BUILD FAILED
/Users/falko/Documents/work/titanium/titanium_mobile/android/build/common.xml:618: The following error occurred while executing this line:
/Users/falko/Documents/work/titanium/titanium_mobile/android/build/common.xml:651: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre"
Total time: 0 seconds
$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
$ JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/ scons android_sdk=$ANDROID_HOME
*Success!*
FYI: http://www.smorgasbork.com/2015/05/15/compiling-titanium-mobile-sdk-from-scratch/
We have removed scons and replaced it with a Node script. View Titanium SDK's readme for how to build.
Closing ticket as the issue will not fix and with reference to the above comments.