Custom Module

You must Login before you can answer or comment on any questions.

I am trying to create a custom module. I am including a third party ios library that i have downloaded to $HOME/Library/Frameworks and included in my project. I can compile in xcode fine and build the module with build.py. But when i try to titanium run or just include the module into my app i get the compile error Undefined symbols for architecture i386: which i know means that the framework couldn't be include for compile. I have modified the module.xcconfig multiple different ways but to no avail.

I have tried OTHER_LDFLAGS=$(inherited) -framework Couchbase And OTHER_LDFLAGS=$(inherited) -F${HOME}/Library/Frameworks -framework Couchbase

And a couple of other similar ways.

Please Help, Thanks.

4 Answers

Accepted Answer

maybe this helps?

http://developer.appcelerator.com/question/119049/importerror-no-module-named-markdown-when-building-module

— answered 2 years ago by Dan Tamas
answer permalink
3 Comments
  • That was close, but it got me thinking. I didn't need to modify the buld.py file. All i had to do in my OSX terminal was to run the command easy_install Markdown because i was missing the module. I was then able to buld with no errors and it worked. Thanks so much for push into the right direction.

    — commented 2 years ago by Kevin Smithson


  • The comment from Kevin Smithson was the correct answer for me.

    — commented 1 year ago by Roger Mabillard

  • Same here!

    — commented 8 months ago by Jacob Avlund

Are there any errors when you build the module? Could you provide any more details as to exactly what you have done thus far?

this is what i get when i run ./build.py

mittysMacBook:couchbase ksmithson$ ./build.py 
[WARN] please update the LICENSE file with your license text before distributing
Build settings from command line:
    SDKROOT = iphoneos4.3
 
=== BUILD NATIVE TARGET couchbase OF PROJECT couchbase WITH CONFIGURATION Release ===
Check dependencies
 
 
** BUILD SUCCEEDED **
 
Build settings from command line:
    SDKROOT = iphonesimulator4.3
 
=== BUILD NATIVE TARGET couchbase OF PROJECT couchbase WITH CONFIGURATION Release ===
Check dependencies
 
 
** BUILD SUCCEEDED **
 
Traceback (most recent call last):
  File "./build.py", line 193, in <module>
    package_module(manifest,mf,config)
  File "./build.py", line 173, in package_module
    docs = generate_doc(config)
  File "./build.py", line 54, in generate_doc
    import markdown
ImportError: No module named markdown

when i run titanium run i get

[DEBUG] module image = /Users/ksmithson/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/modules/api/images
[ERROR]
[ERROR] Error: Traceback (most recent call last):
[DEBUG] File "/Users/ksmithson/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1148, 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" % (log_id,sdk_version,debugstr)],False)
[DEBUG] File "/Users/ksmithson/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1066, in execute_xcode
[DEBUG] output = run.run(args,False,False,o)
[DEBUG] File "/Users/ksmithson/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/run.py", line 39, in run
[DEBUG] sys.exit(rc)
[DEBUG] SystemExit: 65
[ERROR] Build Failed. See: /var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mbRQWOfti/couchbase/build/iphone/build/build.log
and in the error log file there is
Ld build/Debug-iphonesimulator/couchbase.app/couchbase normal i386
    cd /var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/build/Debug-iphonesimulator -L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/lib -L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/modules/iphone/com.obscure.couchbase/0.1 -L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/../../../../tmp/debug/build -L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/../../../../tmp/staticlib/build/Debug-iphonesimulator -L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/../../../tijs/TiCore/TiCore/build/Release-iphonesimulator -F/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/build/Debug-iphonesimulator -filelist /var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/build/couchbase.build/Debug-iphonesimulator/couchbase.build/Objects-normal/i386/couchbase.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -weak_framework iAd -weak_framework iAd -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreLocation -framework MapKit -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -lsqlite3 -lz -framework AudioToolbox -weak_framework MediaPlayer -framework AVFoundation -lxml2 -framework StoreKit -lTiCore -lcom.obscure.couchbase -framework ExternalAccessory -ltiverify -lti_ios_debugger -o /var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/build/Debug-iphonesimulator/couchbase.app/couchbase
ld: warning: directory not found for option '-L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/../../../../tmp/debug/build'
ld: warning: directory not found for option '-L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/../../../../tmp/staticlib/build/Debug-iphonesimulator'
ld: warning: directory not found for option '-L/var/folders/ch/qbpf9nl55jsdrl5ll68x7xh40000gn/T/mLN9V0Sti/couchbase/build/iphone/../../../tijs/TiCore/TiCore/build/Release-iphonesimulator'
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CouchbaseMobile", referenced from:
      objc-class-ref in libcom.obscure.couchbase.a(ComObscureCouchbaseModule.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
 
 
** BUILD FAILED **
 
 
The following build commands failed:
    Ld build/Debug-iphonesimulator/couchbase.app/couchbase normal i386
(1 failure)
EXIT CODE WAS: 65
 
Exception detected in script:
Traceback (most recent call last):
  File "/Users/ksmithson/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1148, in main
    execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s" % (log_id,sdk_version,debugstr)],False)
  File "/Users/ksmithson/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1066, in execute_xcode
    output = run.run(args,False,False,o)
  File "/Users/ksmithson/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/run.py", line 39, in run
    sys.exit(rc)
SystemExit: 65

Your Answer

Think you can help? Login to answer this question!