Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18071] CLI: Fail build if compiled architectures do not match module manifest

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-12-15T19:29:57.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.5.0, Release 4.0.0
ComponentsAndroid, BlackBerry, CLI, iOS, Tooling
Labelsqe-assigned
ReporterIngo Muschenetz
AssigneeTim Poulsen
Created2014-11-21T20:43:07.000+0000
Updated2015-01-18T04:14:33.000+0000

Description

With the addition of 64-bit support, it becomes helpful to know the architectures available in a compiled module. We can then use this ins tooling to make sure modules are compiled correctly for use. See TIMOB-18065 for more information. Once the module build is complete, we need to check the architectures specified and fail the build if they do not match. * If the line exists, but is wrong, suggest the updated version. If they are missing 64-bit for iOS, warn them * If the line does not exist, suggest what it should be.

Comments

  1. Ingo Muschenetz 2014-12-01

    Feon, is this something you or [~skypanther] could tackle?
  2. Feon Sua Xin Miao 2014-12-02

    I can give it a shot.
  3. Feon Sua Xin Miao 2014-12-05

    PR: https://github.com/appcelerator/titanium_mobile/pull/6433 Functional Test: 1. create a module
    ti create -p all -t module -n test -u http:// --id com.appc.test

    For iOS

    1. cd into module iphone directory 2. comment out architectures: armeabi armeabi-v7a x86 in manifest 3. run ./build.py 4. build should fail with follow error
     missing required manifest key 'architectures' 
    5. edit architectures value in manifest, build again build should fail
     
       [WARN] there is discrepancy between the architectures specified in module manifest and compiled binary.
       [WARN] architectures in manifest: i386, arm64, armv7
       [WARN] compiled binary architectures: x86_64, i386, arm64, armv7
       please update manifest to match module binary architectures.
       
    6. undo all changes to manifest, module should be build successfully.

    For Android

    1. cd into module android directory 2. comment out architectures: armeabi armeabi-v7a x86 in manifest 3. run ant 4. build should fail with follow error
       BUILD FAILED
       /Users/feonsua/work/testapps/360/mods/newTestMod/android/build.xml:11: Missing required manifest key 'architectures'.
       
    5.edit architectures value in manifest, build should fail
       check.build.arch:
            [echo] Architectures in manifest: armeabi armeabi-v7a
            [echo] Compiled binary architectures: armeabi;armeabi-v7a;x86
       
       BUILD FAILED
       /Users/feonsua/Library/Application Support/Titanium/mobilesdk/osx/3.6.0/module/android/build.xml:374: The following error occurred while executing this line:
       /Users/feonsua/Library/Application Support/Titanium/mobilesdk/osx/3.6.0/module/android/build.xml:376: There is discrepancy between the architectures specified in manifest and compiled binary.
       
    6. undo all changes to manifest, module should be build successfully.
  4. Tim Poulsen 2014-12-05

    FR/CR passed. PR merged.
  5. Tim Poulsen 2014-12-05

    Reopen to backport to 3_5_X
  6. Tim Poulsen 2014-12-05

    3_5_X backport https://github.com/appcelerator/titanium_mobile/pull/6434
  7. Praveen Innamuri 2014-12-06

    PR passed, but found a parity with iphone module build. If x86_64 arch is removed, then there is a warning in the build logs, but the build still succeed. However, if any arch is missing for android module, then the build has failed with appropriate warning. Created TIMOB-18145 for this.
  8. Eric Wieber 2014-12-09

    Verified fixed using: Titanium SDK 3.5.0.v20141208122514 Studio 3.4.1.201410281743 Xcode 6.1.1
  9. Jon Alter 2014-12-15

    Getting this error in the log when building an iOS module even though the architectures being built are correct:
       [WARN] built module is missing 64-bit support.
       [WARN] there is discrepancy between the architectures specified in module manifest and compiled binary.
       [WARN] architectures in manifest: x86_64, i386, arm64, armv7
       [WARN] compiled binary architectures: x86_64, (cputype, i386, (16777228), armv7, cpusubtype, (0))
       please update manifest to match module binary architectures.
       

    PR

    master: https://github.com/appcelerator/titanium_mobile/pull/6482 3_5_X: https://github.com/appcelerator/titanium_mobile/pull/6485
  10. Vishal Duggal 2014-12-15

    PRs merged 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6485
  11. Lokesh Choudhary 2015-01-07

    Verified using functional test by [~fmiao] for android & as expected build fails if compiled architectures do not match module manifest. Environment: Appc Studio : 3.4.1.201410281743 Ti SDK : 3.5.0.v20150106150919, 3.6.0.v20150106160923 CLI : 3.4.1 Alloy : 1.5.1 GA Code Processor : 1.1.1 MAC Yosemite : 10.10
  12. Eric Merriman 2015-01-12

    Closing as fixed.
  13. 曹俊 2015-01-17

    what time or which version do you publish it?
  14. Ingo Muschenetz 2015-01-18

    [~mdsb100] What do you mean?

JSON Source