Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24480] Android: appc run based module builds fail due to double-namespaced classes in KrollGeneratedBindings.gperf

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-03-20T19:07:18.000+0000
Affected Version/sRelease 6.0.2
Fix Version/sRelease 6.0.3
ComponentsAndroid, CLI
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2017-03-13T15:17:07.000+0000
Updated2017-03-21T14:38:46.000+0000

Description

I know we'd like to make the full cut over to using the node-based module builds, but all of our existing modules are still built using ant and I just tried to use appc run to build the hyperloop module on a 6.0.0 SDK. It failed with:
[INFO]  Producing [ModuleName]Bootstrap files using /Users/cwilliams/repos/hyperloop.next/android/build/generated/json/org/appcelerator/titanium/bindings/hyperloop-android.json
Generating BootstrapJS.cpp from bootstrap.js
[INFO]  Running the Android NDK ndk-build
[ERROR] Failed to run ndk-build
[ERROR]   
[ERROR] jni/Android.mk:35: warning: overriding commands for target /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.cpp'
[ERROR] jni/Android.mk:35: warning: ignoring old commands for target /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.cpp'
[ERROR] In file included from jni/../HyperloopBootstrap.cpp:19:0:
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:18:28: warning: declaration 'struct titanium::bindings::BindEntry' does not declare anything
[ERROR]  struct titanium::bindings::BindEntry;
[ERROR]                             ^
[ERROR] In file included from jni/../HyperloopBootstrap.cpp:19:0:
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf: In static member function 'static titanium::bindings::BindEntry* HyperloopBindings::lookupGeneratedInit(const char*, unsigned int)':
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:20:43: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.BaseProxy,::hyperloop::hyperloop::BaseProxy::bindProxy,::hyperloop::hyperloop::BaseProxy::dispose
[ERROR]                                            ^
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:20:88: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.BaseProxy,::hyperloop::hyperloop::BaseProxy::bindProxy,::hyperloop::hyperloop::BaseProxy::dispose
[ERROR]                                                                                         ^
[ERROR] In file included from jni/../HyperloopBootstrap.cpp:19:0:
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:21:44: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.ClassProxy,::hyperloop::hyperloop::ClassProxy::bindProxy,::hyperloop::hyperloop::ClassProxy::dispose
[ERROR]                                             ^
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:21:90: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.ClassProxy,::hyperloop::hyperloop::ClassProxy::bindProxy,::hyperloop::hyperloop::ClassProxy::dispose
[ERROR]                                                                                           ^
[ERROR] In file included from jni/../HyperloopBootstrap.cpp:19:0:
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:24:47: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.InstanceProxy,::hyperloop::hyperloop::InstanceProxy::bindProxy,::hyperloop::hyperloop::InstanceProxy::dispose
[ERROR]                                                ^
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:24:96: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.InstanceProxy,::hyperloop::hyperloop::InstanceProxy::bindProxy,::hyperloop::hyperloop::InstanceProxy::dispose
[ERROR]                                                                                                 ^
[ERROR] In file included from jni/../HyperloopBootstrap.cpp:19:0:
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:23:54: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.DynamicSubclassProxy,::hyperloop::hyperloop::DynamicSubclassProxy::bindProxy,::hyperloop::hyperloop::DynamicSubclassProxy::dispose
[ERROR]                                                       ^
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:23:110: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.DynamicSubclassProxy,::hyperloop::hyperloop::DynamicSubclassProxy::bindProxy,::hyperloop::hyperloop::DynamicSubclassProxy::dispose
[ERROR]                                                                                                               ^
[ERROR] In file included from jni/../HyperloopBootstrap.cpp:19:0:
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:22:56: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.InterfaceSubclassProxy,::hyperloop::hyperloop::InterfaceSubclassProxy::bindProxy,::hyperloop::hyperloop::InterfaceSubclassProxy::dispose
[ERROR]                                                         ^
[ERROR] /Users/cwilliams/repos/hyperloop.next/android/build/generated/KrollGeneratedBindings.gperf:22:114: error: 'hyperloop::hyperloop' has not been declared
[ERROR]  hyperloop.InterfaceSubclassProxy,::hyperloop::hyperloop::InterfaceSubclassProxy::bindProxy,::hyperloop::hyperloop::InterfaceSubclassProxy::dispose
[ERROR]                                                                                                                   ^
[ERROR] make: *** [/Users/cwilliams/repos/hyperloop.next/android/build/generated/obj/local/armeabi-v7a/objs/hyperloop/__/HyperloopBootstrap.o] Error 1

Comments

  1. Christopher Williams 2017-03-13

    This is still occurring in ti.facebook module builds on our CI system, and I can reproduce locally on 6.0.2.GA. The error stems from pre-pending the module namespace to the proxy class names even when the full proxy name already includes the module namespace in it.
  2. Christopher Williams 2017-03-13

    master: https://github.com/appcelerator/titanium_mobile/pull/8882 6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8883
  3. Abir Mukherjee 2017-03-14

    [~cwilliams] Can you give me some guidance on how to validate this ticket? Do I just create an app with hyperloop enabled and add ti.facebook module to the project? If you have a suggested test case or demo app, that would help greatly.
  4. Hans Knöchel 2017-03-15

    [~amukherjee] This has nothing to do with Hyperloop. Use this PR to build the Facebook module with appc run -p android --build-only.
  5. Lokesh Choudhary 2017-03-15

    Merged PR's waiting for build to close ticket.
  6. Lokesh Choudhary 2017-03-15

    Verified the fix with SDK 6.1.0.v20170315131319 & 6.0.3.v20170315114122. Closing.
  7. Hans Knöchel 2017-03-18

    I still get those build issues with 6.0.3.RC (6.0.3.v20170317093820) and appc run -p android --build-only. Building with ant clean; ant; works.
  8. Christopher Williams 2017-03-20

    I'm also still getting the issue in the ti.facebook build. Not sure why.
  9. Christopher Williams 2017-03-20

    6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8895 Please note that master builds *should* work fine, there was a one-line missing change on the 6_0_X fix.
  10. Lokesh Choudhary 2017-03-21

    Verified the fix. Built ti.facebook module without any issues. Closing. Appc Studio : 4.8.1.201612050850 SDK Version : 6.0.3.v20170320120738 Mac OS Version : 10.12.3 Xcode Version : Xcode 8.2.1 Build version 8C1002 Appc CLI AND Appc NPM : {"NPM":"4.2.8","CLI":"6.1.0"} Ti CLI : 5.0.11 Alloy : 1.9.5 Node : v4.6.0

JSON Source