Xcode errors/warnings when building for iOS

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
theCodeCat
Regular
Posts: 62
Joined: Sun Sep 06, 2015 8:40 pm
Projects: Lucid9, Mystic Destinies: Serendipity of Aeons
Skype: theCodeCat
Contact:

Xcode errors/warnings when building for iOS

#1 Post by theCodeCat » Mon May 02, 2016 3:51 am

Hi,
I used the latest version of renpy and renios to make an Xcode project on a Mac computer running OSX 10.11.4 (El Capitan) with Xcode 7.3
I just installed all the software today, so it should be very up to date.

However when I build the project I get a couple warnings about absolute addressing.
The exact warnings are:

Code: Select all

ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _ff_sws_alphablendaway from /Users/ianleslie/Documents/XCode Renpy Projects/MD/prebuilt/debug/lib/libswscale.a(alphablend.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
ld: warning: 32-bit absolute address out of range (0x1009DF9B8 max is 4GB): from fft32_vfp + 0x00000020 (0x002F3B0C) to 0x1009DF9B8
ld: warning: 32-bit absolute address out of range (0x1009DFA6F max is 4GB): from _ff_decode_block_coeffs_armv6 + 0x00000554 (0x002FC2C0) to 0x1009DFA6F
ld: warning: 32-bit absolute address out of range (0x1009DFAAC max is 4GB): from bl_put_bilin_v_armv6 + 0x00000084 (0x002FE594) to 0x1009DFAAC
ld: warning: 32-bit absolute address out of range (0x1009DFA70 max is 4GB): from bl_put_bilin_v_armv6 + 0x00000080 (0x002FE594) to 0x1009DFA70
ld: warning: 32-bit absolute address out of range (0x1009DFAC0 max is 4GB): from _ff_put_vp8_epel8_h4v6_neon + 0x00000104 (0x003008FC) to 0x1009DFAC0
ld: warning: 32-bit absolute address out of range (0x1009DFAC0 max is 4GB): from _ff_put_vp8_bilin4_hv_neon + 0x0000007C (0x003013E8) to 0x1009DFAC0
ld: warning: 32-bit absolute address out of range (0x100A9318C max is 4GB): from _usedpools + 0x00000004 (0x00A93194) to 0x100A9318C
ld: warning: 32-bit absolute address out of range (0x100A9318C max is 4GB): from _usedpools + 0x00000000 (0x00A93194) to 0x100A9318C
The app still builds successfully and I was able to upload and run it on a tablet, however the app always crashes a minute or so after starting up and I strongly suspect this has to do with the warnings.

I looked into the first warning a bit and "libswscale" is part of the FFmpeg library. The app is supposed to play a short movie clip after starting up, which is it hasn't been doing so far. I think the problem with the FFmpeg library that is triggering the warnings is also causing the app to crash, so fixing these warnings is important.

I think the FFmpeg library isn't being built with the necessary options to make it "PIE", which may require adding the options covered in this stackoverflow post: http://stackoverflow.com/questions/3614 ... on-android
I've tried building the FFmpeg library myself but without any luck. I don't have any experience building libraries like this, so it all feels kind of overwhelming.

Anyways, if I could get some help here it would be very much appreciated. :)

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Xcode errors/warnings when building for iOS

#2 Post by PyTom » Mon May 02, 2016 8:06 pm

What device are you targeting here?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
theCodeCat
Regular
Posts: 62
Joined: Sun Sep 06, 2015 8:40 pm
Projects: Lucid9, Mystic Destinies: Serendipity of Aeons
Skype: theCodeCat
Contact:

Re: Xcode errors/warnings when building for iOS

#3 Post by theCodeCat » Mon May 02, 2016 11:51 pm

The device I tried it on is an iPad running version 9.3.1 but I get the same warnings when I just try building the project normally for a "Generic iOS Device".

In the Xcode configuration, the "iOS Deployment Target" is iOS 8.1 and "Targeted Device Family" is "1,2".

User avatar
theCodeCat
Regular
Posts: 62
Joined: Sun Sep 06, 2015 8:40 pm
Projects: Lucid9, Mystic Destinies: Serendipity of Aeons
Skype: theCodeCat
Contact:

Re: Xcode errors/warnings when building for iOS

#4 Post by theCodeCat » Tue May 03, 2016 12:53 am

I did some further testing by generating a fresh Xcode project for "The Question" and attempting to build it for different simulators.
I got the PIE warning when building for:
iPad 2
iPad Retina
iPhone 4s
iPhone 5
iPhone 5s

Building for any of the other simulator targets did not generate the warning.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Xcode errors/warnings when building for iOS

#5 Post by PyTom » Tue May 03, 2016 7:12 pm

I will look into this when I get a chance.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
theCodeCat
Regular
Posts: 62
Joined: Sun Sep 06, 2015 8:40 pm
Projects: Lucid9, Mystic Destinies: Serendipity of Aeons
Skype: theCodeCat
Contact:

Re: Xcode errors/warnings when building for iOS

#6 Post by theCodeCat » Wed May 04, 2016 2:44 am

Thanks.

After some more tinkering I also noticed that whenever I run the game on a device, simulator or not, I get "Got dlopen error on Foundation" in the output log as the 2nd message.

This message seems to originate from the "pyobjus" library, specifically here: https://github.com/kivy/pyobjus/blob/ma ... _runtime.h

First few output messages are:

Code: Select all

running /Users/ianleslie/Library/Developer/CoreSimulator/Devices/25D1E474-93AA-4DA4-84FD-8E12D82F19CE/data/Containers/Bundle/Application/4BCB3CB0-1587-412B-88C9-888EABF64C53/MD.app/base/main.py
Got dlopen error on Foundation
2016-05-03 23:36:43.797 MD[61531:313507] Bootstrap to the start of init.init took 0.00s
2016-05-03 23:36:43.822 MD[61531:313507] iOS device idiom 0
2016-05-03 23:36:43.823 MD[61531:313507] Early init took 0.06s
in case that helps.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Xcode errors/warnings when building for iOS

#7 Post by PyTom » Wed May 04, 2016 10:03 am

IIRC, the dlopen thing is a harmless error.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Arisae
Regular
Posts: 32
Joined: Wed Dec 24, 2014 5:39 pm
Completed: Discouraged Workers/YGGDRASIL JIGSAW PUZZLE
Projects: Working on some projects
Organization: YGGDRASIL STUDIO
Github: YGGDRASIL-STUDIO
itch: yggdrasilstudio
Location: Korea, Republic of.
Contact:

Re: Xcode errors/warnings when building for iOS

#8 Post by Arisae » Mon May 23, 2016 1:11 pm

  • rtl should be False. Open your options.rpy and check the config.rtl.
  • Check the libz.x(version number).dylib and libbz.x.dylib. If it is red(broken path), you should delete and add it manually.
  • Check the other build setting. e.g. Architectures and Valid Architectures, Enable bitcode, Generate Position-Dependent Executable, Mach-O Type.
Independent Cultural Artist. Currently working for the Project DW.

Image Image Image Image

Post Reply

Who is online

Users browsing this forum: enaielei