Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Xcode Export Problem

in General Posts: 98

I've always been able to muddle my way through exporting to Xcode enough to sideload from a Mac to an iPad but I've started getting errors that /Libs/libtools.a.gz and /Libs/libcodea.z.gz are not in gzip format. Also, Xcode cannot parse the debug map for /Debug-iphoneos/[AppName].app/[AppName] when trying to generate [AppName].app.sSMY and doesn't find -lcodea in the same directory. I've tried attaching a screenshot but it doesn't show in Preview so I'm not sure it's there. I'm using Xcoce 8.1 and exporting through DropBox.

thanks

Comments

  • @DaveW I don't know what that error means exactly, but exporting still works for me, and instead of Dropbox, I use google drive, that might work better

  • @DaveW Surprisingly, today I exported my project to xCode and I was getting a similar error and it was a problem with the Codea Runtime Library. I don't know exactly how to fix it right now though, I'll tell you when I get it to work

  • JohnJohn Admin Mod
    Posts: 411

    @DaveW Yeah image attachments aren't working right now. Can you try uploading it to imgur and post a link so I can see exactly whats going on?

  • Posts: 98

    @John I'm not an imgur user but can start an account. Do you want the zipped Xcode file? I can also put it on OneDrive and post a link.

    @CamelCoder I've thought of a couple things to try. I'm only at school on Mondays and that's where the Mac with Xcode is.

    Thanks

  • Posts: 98

    I tried two things with no success. I unzipped the file on both a PC and a Mac in case there was an issue with the unzipper.

    I also created a new project, made no changes to it, exported, and got the list of errors so I'm confident it isn't something in my code.

  • @DaveW it isn't a problem with the code. Something may have changed in either XCode, or how the file is exported. I had a project from last week, same game that I was making, just not as much code. I opened that one and it worked perfectly. Then, I exported this more updated version of my game, and it doesn't work. I'm pretty sure that means it's a problem with the codea export process.

  • Posts: 98

    @CamelCoder My thinking is that neither Codea or Xcode has been updated recently. That's why I was testing the unzipper. The only thing that has changed on the Mac in the past 30 days was iMovie. I believe there was a recent IOS update on my iPad but I can't remember where that was in relation to this problem starting.

  • Posts: 1,201

    Same error on everything I try today.

    gunzip: /Users/XXXX/Downloads/SiteManager-2/Libs/libtools.a.gz: not in gzip format
    Command /bin/sh failed with exit code 1

  • @DaveW That's the same error I got, I didn't use an unzipper though, instead I just double tapped on the libtools.a.gz and it gave me another file like libtools.a.crgz. The error went away, but then a new error, linker error failed with exit code 1 started popping up and i couldn't fix it

  • Posts: 1,201

    I suspect it's a change in the back end code linked when you export a project. Any news, @John?

  • Posts: 98

    @Mark Do you mean there are remote files linked during export? I was wondering how Codea could have changed when there hasn't been an update.

  • Posts: 1,201

    Here's a temporary fix if you have a recent project file that worked. Copy over libcodea.a and libtools.a from the previous project, to the same directory where the .gz versions are found. Your project should compile without an issue.

  • @Mark I actually did that already, and then it still gave me an error, I might've done something wrong tho, I'll try it again, but that's probably your best bet right now. Thanks.

  • Posts: 1,201

    @CamelCoder don't grab the .gz versions, just the .a versions.

  • Posts: 98

    @Mark Alas, I don't have working versions of those files but school will be out until after New Years Day and I'll hope for a fix by then. I updated Xcode today to no avail.

    Thanks for the help.

  • I was also having the same issue. When I used a lib folder from last year, it builds fine. I have included a link to my lib folder from last year, just in case there is anyone else that does not have one:

    https://drive.google.com/open?id=0BxJplyUFPhf-RDRkVnJZY0tjbEU

  • So ...
    Now that the build error is fixed, I also have the problem that the "assets" are not showing up once you build in Xcode. Take a brand new project in Codea, add some images from the built-in images, export, see the images in the assets folder but they do not show up in the simulator.

    Anyone else have this issue or even better a solution?
    Thanks

  • I'm now getting a message that Xcode is blocking a clear text HTML request for security reasons. My app is just coming up with a blank screen when there are no errors in my code

  • Posts: 1,992
    @bocaaust that's Apple's new transport security. If you google that error you'll find the fix. You need to add a key to the apps info.plist allowing requests to any web site. At some point in the new year though, Apple is apparently going to start requiring that all apps use only HTTPS (rather than just HTTP).
  • I was getting same errors even after copying files. I was only able to fix errors by removing reference to files and then manually adding them from XCode app settings. My music file is also not linking now from Dropbox so I'm going to have to figure that out.
  • @yojimbo2000 I fixed it pretty easily. I wasn't sure if it was connected.
  • I'm getting an error message that the file path is null

  • Posts: 115

    Has this been fixed? I just got this same error. Copying an old Lib folder does not work for me. The lib tools.a.gz files keeps coming back.

    gunzip: /Appname/Libs/libtools.a.gz: not in gzip format

  • Posts: 213

    @zapaper look further up on this thread this problem has already been established and fixed. The files are missing when initially exported, add the two lib files to fix the error. @MrCoxall has offered copies of the files

  • Posts: 115

    Thanks CamelCoder. it gives another error now. Is anyone else having this issue? I have enabled Game Center and Iadaddon under capabilities.

    undefined symbols for architecture i386:
    "_luaL_requiref", referenced from:
    -[GameCenterAddon codea:didCreateLuaState:] in GameCenterAddon.o
    "_luaL_setfuncs", referenced from:
    _luaopen_gamecenter in GameCenterAddon.o
    "_lua_setglobal", referenced from:
    -[iAdsAddon codea:didCreateLuaState:] in iAdsAddon.o
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

  • Posts: 213
    @zapaper can you tell me how you enabled them, it seems to be a problem with the luaxlib file. Also, iAds don't work anymore, if you want ads, you have to make your own files with a different ad company
  • Posts: 14

    same problem here - after adding the two lib files I get same error as above:

    Undefined symbols for architecture x86_64:
    "_lua_setglobal", referenced from:
    -[iAdsAddon codea:didCreateLuaState:] in iAdsAddon.o
    "_luaL_setfuncs", referenced from:
    _luaopen_gamecenter in GameCenterAddon.o
    "_luaL_requiref", referenced from:
    -[GameCenterAddon codea:didCreateLuaState:] in GameCenterAddon.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Unsetting Gamecenter in XCode Capabilities Tab does not help (nad iAds is not shown at all in this tab)

    XCode Version 8.2.1

  • Posts: 14

    If I try to build nor for the simulator but for my ipad I get this error:

    ld: '/Users/sti/Desktop/Acquire/Libs/libcodea.a(ccGLStateCache.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

    BUT bit_code is enabled !

  • Posts: 1,992

    @ein_STein I think the error message is telling you to disable bitcode for the build target.

  • Posts: 14

    Unfortunately disabling BIT_CODE just brings the same error as if building for the simulator

  • Posts: 14

    how should I proceed - who solved the undefined symbols problem?
    Downloading the libs did not help

  • Posts: 14

    big advance - at least I get my code app compiled now:

    1. export Project from codea (e.g project.zip to Dropbox)
    2. export Project Xcode from codea (e.g. projectXcode.zip to Dropbox)
    3. unzip both on mac
    4. copy project.codea folder into projectXcode folder)
    5. edit libversion in projectXcode folder (change 3.2.3 to 3.2.2 - https://codea.io/lib/libcodea-3.2.3.a.gz does not exist!)
    6. manually create an empty Assets folder in projectXcode folder

    now I can compile and run the simulator ... BUT I am using Soda as dependancy. I copied Soda.codea also into the Xcode folder but I get
    a nil error for global Soda:

  • Posts: 14

    and now ?

  • Posts: 1,992

    That's interesting. First, I would raise a bug in the Codea issue tracker, as project export should handle dependencies.

    A few things to try

    First, move all of the lua files except for Main.lua out of the Soda.codea folder and into the same .codea folder as the main project (you can't have two main files)

    Now it might be that that step alone is enough to make it run.

    However, I suspect you'll also have to merge the two info.plist files in the .codea folders (be careful not to edit the Xcode file at the root of the project, which is also called info.plist). Plist files are xml, so it'll help if you use a text editor with xml or plist syntax highlighting/ checking. The significant section of the plist is the "buffer order" array, which lists all of the tabs (Lua files) in a project, in the order that Codea will compile them. Copy and paste the entries from the buffer order of the Soda info.plist into the buffer order of your project info.plist (make sure you're editing the info.plist files that are inside the .codea folders), except for the entry for "Main". Paste the Soda entries above the entries for your project (as dependencies get compiled before your project does).

    The idea is that you end up with a single .codea folder, containing all the lua files and a single info.plist file, which has a buffer order array listing all of the lua files in the folder, in the order they should be compiled, starting with the dependency files, then with your project files.

    Hopefully, that ought to do it.

  • Posts: 213

    @ein_STein I experienced the same thing as you, where it would give me silly errors, even though they were setup properly in the setup() function. Thankfully, I know why. This happens when there is an issue with Codea compiling the code. For example, if you say:

    if x==y then
        print(x)
    

    and you don't have the word "end", Codea won't let you run the program, until you fix it, but when you have it in xCode, Codea must execute the program, even tho there are syntax issues, which causes the setup() to fail. Therefore, there must be an error with your lua syntax, Soda and everything is fine, it's just some lua syntax errors.

  • Posts: 14

    Finally I got it compiled and running in the simulator - last step was to merge the info.plist files as recommended by yojimbo2000

    Thanks to all!

Sign In or Register to comment.