[TIMOB-24895] AssetCryptImpl.java symbol not found while build for Android on Linux
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Hold |
Resolution Date | 2019-07-30T15:08:38.000+0000 |
Affected Version/s | Release 6.1.0 |
Fix Version/s | n/a |
Components | Android, Tooling |
Labels | android |
Reporter | Simon Mang |
Assignee | Chris Barber |
Created | 2017-06-23T07:38:32.000+0000 |
Updated | 2019-07-30T15:08:38.000+0000 |
Description
When building a freshly created Titanium Alloy project the build fails when building the Java source files with the following error:
{noformat}
[ERROR] : Failed to compile Java source files:
[ERROR] :
[ERROR] : /home/simon/test/Asdf/build/android/gen/de/viinet/asdf/AssetCryptImpl.java:44: error: cannot find symbol
[ERROR] : Range range = assets.get(path);
[ERROR] : ^
[ERROR] : symbol: variable assets
[ERROR] : location: class AssetCryptImpl
[ERROR] : /home/simon/test/Asdf/build/android/gen/de/viinet/asdf/AssetCryptImpl.java:48: error: cannot find symbol
[ERROR] : return new String(filterDataInRange(assetsBytes, range.offset, range.length));
[ERROR] : ^
[ERROR] : symbol: variable assetsBytes
[ERROR] : location: class AssetCryptImpl
[ERROR] : Note: /home/simon/test/Asdf/build/android/gen/de/viinet/asdf/AssetCryptImpl.java uses unchecked or unsafe operations.
[ERROR] : Note: Recompile with -Xlint:unchecked for details.
[ERROR] : 2 errors
{noformat}
This is because the asset encryption does not finish and the AssetCryptImpl.java does not contain the generated variables. Manually executing the command included in the build output gives a Segmentation Fault. So there seems to be some error with the ELF .titanium/mobilesdk/linux/6.1.0.GA/android/titanium_prep.linux64
{noformat}
[INFO] : Encrypting JavaScript files: /home/simon/.titanium/mobilesdk/linux/6.1.0.GA/android/titanium_prep.linux64 "de.viinet.asdf" "/home/simon/test/Asdf/build/android/assets" "alloy/CFG.js" "app.js" "alloy/backbone.js" "alloy/constants.js" "alloy/controllers/BaseController.js" "alloy/controllers/index.js" "alloy/styles/index.js" "alloy/sync/localStorage.js" "alloy/sync/properties.js" "alloy/sync/sql.js" "alloy/underscore.js" "alloy/widget.js" "alloy.js" "ti.cloud/ti.cloud.js" "_app_props_.json"
{noformat}
Not quite sure who's responsible because with kernel linux-image-4.4.0-79-generic 4.4.0-79.100~14.04.1
it works like expected.
Attachments
File | Date | Size |
build.log | 2017-06-23T07:37:53.000+0000 | 137453 |
hello.jar | 2017-06-26T07:32:22.000+0000 | 760 |
Got same issue in ubuntu 17.10, it worked perfctly a couple of days ago, so I bet it was a kernel update the "problem" but it is exacly same output error
[~smang] So if
linux-image-4.4.0-79-generic 4.4.0-79.100~14.04.1
works, what kernel version does not work? Also, what Linux distro are you using? Ubuntu? [~knd_rt@hotmail.com] Ubuntu 17.10 does not exist.Also note that the Titanium Android build chooses the 32-bit vs 64-bit version of titanium_prep by using the cpu architecture for which Node.js was compiled. In other words, if it is running
titanium_prep.linux64
, then you are running the 64-bit version of Node.js which means you're on a 64-bit Linux kernel and 64-bit hardware. Now, here's the important part,titanium_prep
dynamically links to the Java Virtual Machine library. In this case, it is critical that you have the 64-bit version of this library installed. From what I recall, there should be ai386
andamd64
versions oflibjvm.so
. It's possible that the seg fault is being caused bylibjvm.so
. I'm not sure how to test this. Maybe you could check ifjava
and/or a Java app works with your updated kernel?@cbarber
Linux 4.4.0-81-generic #104~14.04.1-Ubuntu x86_64 GNU/Linux
like I mentioned above in the "Environment" tag of this issue does not work. And I guess knd_rt meant 16.10 ;) I created a HelloWorld java example. And compiling and running it works great on the 4.4.0-81 kernel.BTW my java version {noformat} java -version java version "1.8.0_72" Java(TM) SE Runtime Environment (build 1.8.0_72-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode) {noformat}
[~smang] Doh, I missed the environment information. Thanks for the info. I'll see about trying to reproduce the issue.
Confirmed the seg fault on Ubuntu 17.04 with Java 1.8 OpenJDK 64-bit and kernel 4.10.0-24-generic.
It appears the bug is widespread and affects other software besides Titanium: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1699772. I'm not certain at this time that A) we can do anything or B) we need to do anything. Once the problem is fixed, we can revisit this ticket and see if it's fixed.