jackba / tibar

Automatically exported from code.google.com/p/tibar
0 stars 0 forks source link

Doesnt compile #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The problem description:

What version of the product are you using? On what operating system?
Titanium Mobile SDK: 1.5.1
Titanium Developer: 1.2.2
XCode:3.2.5
iOS:4.2
iPhone:(trying to compile for simulator or module zip from source)
iPhone iOS:(trying to compile for simulator or the module zip from source)

I get this error (which seems to be the same) both when I try to compile some 
project with the module included and when I try to compile the module from 
source:

[INFO] Compiling JavaScript...one moment
[INFO] No JavaScript errors detected.
[INFO] One moment, building ...
[INFO] Detected third-party module: tibar/0.4.2
[INFO] Titanium SDK version: 1.5.1
[INFO] iPhone Device family: iphone
[INFO] iPhone SDK version: 4.2
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application 
Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 1003, in main
execute_xcode("iphonesimulator%s" % 
iphone_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s 
DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s" % 
(log_id,sdk_version)],False)
File "/Library/Application 
Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 925, in 
execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/run.py", 
line 31, in run
sys.exit(rc)
SystemExit: 1

The log from my compiling "session" from source I attach as a file.

This error doesnt require to use the module, it is sufficient to add this line 
into the tiapp.xml:

<modules>
        <module version="0.4.2">tibar</module>
</modules>

Original issue reported on code.google.com by annakozy...@gmail.com on 7 Feb 2011 at 12:58

Attachments:

GoogleCodeExporter commented 9 years ago
Well, I created a brandnew module, and there are 2 things I discovered:

1. I cannot link libzbar.a to the new module, if I do link it, the command 
"titanium run" gives an error

2. If I dont link libzbar, it seems to compile, but when I add this like, it 
doesnt compile again:

id <NSFastEnumeration> results = [info objectForKey: 
ZBarReaderControllerResults];

The variable ZBarReaderControllerResults is declared as extern NSString* const 
in some place, and I suspect, it's because of the missing library... 

Original comment by annakozy...@gmail.com on 7 Feb 2011 at 5:09

GoogleCodeExporter commented 9 years ago
Well, seems like I managed to recompile it all with the configuration given. 
That's how I did it (a little different from what says the page):

- create a brand new project, compile in Titanium (or I think you can take an 
existing project that doesnt have TiBar declared)
- open the project in Xcode, the frameworks look red. 
- change SDK to 4.2 or latest, close and reopen (the frameworks should become 
black)
- rebuild and make sure it runs.
- add libtibar.a from /Library/Application Support/Titanium/modules/tibar/0.4.2 
(the zip provided should be already extracted there)
- add AVFoundation.framework, CoreVideo.framework, CoreMedia.framework, 
libiconv.dylib (the QuartzCore I already had linked by Titanium)
- rebuild and make sure it runs in simulator (in Xcode). 
- return to Titanium and declare the module in tiapp.xml
- now that it has all the libraries fixed manually in Xcode, linking the module 
in tiapp.xml wont make much difference and it will compile. 

I still have to check if it will recognize the javascript and all, but I think 
it will...

Original comment by annakozy...@gmail.com on 8 Feb 2011 at 11:29

GoogleCodeExporter commented 9 years ago
Thanks Anna.  Awesome job!

Original comment by mcraw...@gmail.com on 11 Feb 2011 at 4:11

GoogleCodeExporter commented 9 years ago
The thing you propose seems to be very complicated.
An easier way is :
- go in your [projectName]/build/iphone/.
  - delete all the files except [projectName].xcodeproj (that's to say: build/, Classes/, headers/, Info.plist, ...). If you are not sure, make a copy before.
  - build your project with Titanium to recreate the files deleted (the build will fail)
  - open your project with Xcode ([projectName]/build/iphone/[projectName].xcodeproj)
  - if the SDK is not found, add it (cf. http://code.google.com/p/tibar/ step 2) (and reopen you Xcode project)
  - add the different librairies (cf. http://code.google.com/p/tibar/ step 2)
  - clean all Target with Xcode
  - close Xcode
  - recompile with Titanium

Thus, it should work and you didn't have to create a new Titanium project.

Original comment by rmnsal...@gmail.com on 12 Feb 2011 at 10:33

GoogleCodeExporter commented 9 years ago
I solved the compilation problem when running into the emulator thanks to your 
posts.
I am still not able to deploy the application to the device, even with the 
simplest project remade from scratch i always get this error:

Error: Traceback (most recent call last):
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 1143, in main
    execute_xcode("iphoneos%s" % iphone_version,args,False)
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 925, in execute_xcode
    output = run.run(args,False,False,o)
  File "/Librar   ....

It's a standard titanium project (Titanium sdk 1.5.1 on iOS SDK 4.2 on Snow 
Leopard 10.6.6) referencing TiBar 4.0.2 after the Xcode suggested modifications.

Again it runs ok into the emulator... Please help!!!

Thank a lot

Alex

Original comment by alessand...@gmail.com on 14 Feb 2011 at 10:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Experiencing exact same problem as Alex. Found out that Titanium recreates 
.xcodeproj when compiling for "Run on device", probably in order to write 
provision information in it. Bad thing is that this overwrites the added 
frameworks throug xcode. Any hints/workarounds greatly appreciated. Thanks

Anders

Original comment by herq...@gmail.com on 20 Feb 2011 at 9:35

GoogleCodeExporter commented 9 years ago
We try to resolve this problem. Thanks for info.

Original comment by lukasz.r...@gmail.com on 24 Feb 2011 at 7:31

GoogleCodeExporter commented 9 years ago
Same issue here. Appcelerator seems to remove the referenced libraries when it 
runs on device.

Original comment by j...@whatsg00d.com on 11 Mar 2011 at 7:50

GoogleCodeExporter commented 9 years ago
Another solution is to just open the .xcodeproj in the build/iphone folder with 
xcode and deploy on your device from there (Build and run). Just run it on the 
simulator with the Appcelerator GUI first so the xcodeproj includes the latest 
changes.

Original comment by f...@contigua.de on 18 Apr 2011 at 7:33

GoogleCodeExporter commented 9 years ago
I'm still having issues here to get it working/compiling for iOS SDK 4.2 and Ti 
SDK 1.6.2 (and above)

Original comment by kos...@gmail.com on 30 Apr 2011 at 7:09

GoogleCodeExporter commented 9 years ago
hi, 
i've this error (cf below). how can i fix it ?

[ERROR] Error: Traceback (most recent call last):
  File "/Users/stagiaire/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone/builder.py", line 1465, in main
    execute_xcode("iphoneos%s" % iphone_version,args,False)
  File "/Users/stagiaire/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone/builder.py", line 1224, in execute_xcode
    output = run.run(args,False,False,o)
  File "/Users/stagiaire/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone/run.py", line 41, in run
    sys.exit(rc)
SystemExit: 65

Original comment by makay...@gmail.com on 20 Jun 2012 at 10:40