Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7780] iOS: trying to compile not found for architecture i386

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-02-27T17:13:27.000+0000
Affected Version/sRelease 1.8.0.1, Release 1.8.1
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFrancisco Antonio Duran Ramirez
AssigneeStephen Tramer
Created2012-02-22T16:44:05.000+0000
Updated2017-03-24T18:15:48.000+0000

Description

Problem

Every time you have a static library the module does not compile, and throws the following error messages:
[ERROR]
[ERROR] Error: Traceback (most recent call last):
[DEBUG] File "/Users/tony/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/builder.py", line 1286, in main
[DEBUG] execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False)
[DEBUG] File "/Users/tony/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/builder.py", line 1192, in execute_xcode
[DEBUG] output = run.run(args,False,False,o)
[DEBUG] File "/Users/tony/Library/Application Support/Titanium/mobilesdk/osx/1.8.1/iphone/run.py", line 39, in run
[DEBUG] sys.exit(rc)
[DEBUG] SystemExit: 65
[ERROR] Build Failed. See: /var/folders/57/2nnhd4_n3kd46bpt37k6gmlw0000gp/T/mTnxUGHti/zbarscannersimple/build/iphone/build/build.log

To Reproduce:

1. Create an iOS module 2. Drag and drop a static library (something.a) into the project 3. Run the module from the command line: titanium run 4. Module does not compile Attached is a static .a library.

Attachments

FileDateSize
libzbar.a2012-02-22T16:44:05.000+00003038988

Comments

  1. Stephen Tramer 2012-02-24

    Going to get fixed as part of another bug
  2. Stephen Tramer 2012-02-24

    Not the relation I thought it was; probably S05 timeframe
  3. Stephen Tramer 2012-02-27

    This is actually an issue with the library being built without appropriate extern "C" support for C++ compiler integration. We require some C++ build steps to get Titanium to work correctly with JSCore, although I will take a closer look at where we can chop this out and whether or not we can add our own extern "C" support. In the meantime the library vendor should be contacted. This is a severe problem with their build, as it prevents it from working with any linker which is working with source compiled from C++. *NOTE*: This could be an issue with modules not using the C++ linker (which could create other problems as well). Will investigate.
  4. Stephen Tramer 2012-02-27

    Coercing the module to a C++ build did not provide the correct symbols. However, I did find the following:
       -> % nm libzbar.a | grep _CVP
                U _CVPixelBufferGetBaseAddressOfPlane
                U _CVPixelBufferGetBytesPerRowOfPlane
                U _CVPixelBufferGetHeightOfPlane
                U _CVPixelBufferGetPixelFormatType
                U _CVPixelBufferGetPlaneCount
       etc.
       
    These are all references to an additional foundation framework which we *do not* link in Titanium. The module may be required to link it in itself, and the library may not even be available for simulator.
  5. Stephen Tramer 2012-02-27

    Figured out the correct solution. Module developers must make sure that their module specifies any additional compilation flags for their projects in the module.xcconfig file. In particular, modules need to indicate which additional libraries they must link against. In this case the line
       OTHER_LDFLAGS=$(inherited) -framework CoreVideo -liconv
       
    Is required. Closing this ticket as invalid.
  6. Stephen Tramer 2012-02-27

    See comments for correct resolution to this issue.
  7. Lee Morris 2017-03-24

    Closing ticket as invalid with reference to the above comments.

JSON Source