Open shankar667 opened 7 years ago
@shankar667 are you getting that warning using this project, or with your own project? Is the warning preventing you from building and/or running the application?
If you are getting the error with your own project, then please submit a ticket to the helpdesk (https://red5pro.zendesk.com/hc/en-us/requests/new) so that we can assist you there.
I'm getting that warning using this project and also my own project and it's not preventing from building the application.
Warning from this project:
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _av_d2str from /Users/staff/Desktop/test/streaming-ios-master/R5ProTestbed/R5Streaming.framework/R5Streaming(avstring.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
I've done some more research and finally set Generate Position-Dependent Executable = Yes
in Targets and Project -> Build Settings then warning won't appears but I'm not sure wether apple will accept the build, can you please more investigate in this issue and guide us with proper solutions?
As per my research Generate Position-Dependent Executable
will apply entire application not only for R5Streaming.framework
, is this acceptable?
And based on the reference URL:
https://developer.apple.com/library/content/qa/qa1788/_index.html#/apple_ref/doc/uid/DTS40013354.
I also verified using the command otool -hv
the application was built as PIE . The results shows as below
Mach header
magic cputype cpusubtype caps filetyp ncmds sizeofcmds lags
MH_MAGIC ARM V7 0x00 EXECUTE 66 6516 NOUNDEFS DYLDLINK TWOLEVEL BINDS_TO_WEAK
we have those settings set as described in the article you posted
running otool
on a build of streaming-ios app:
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC ARM V7 0x00 EXECUTE 50 5300 NOUNDEFS DYLDLINK TWOLEVEL BINDS_TO_WEAK
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 ARM64 ALL 0x00 EXECUTE 50 6056 NOUNDEFS DYLDLINK TWOLEVEL BINDS_TO_WEAK PIE
I see PIE set for ALL ARM64
Yes, of course. I also see the PIE for ARM64
because your R5Streaming.framework
enabled PIE for ARM64
architecture, but Xcode not enabled PIE support by default, in settings. So, that the warning displays all the time.
As described in my above article Generate Position-Dependent Executable = Yes
solved my problem at present. But can you clarify "is this setting will cause to reject the build"?
I'm sorry, that is more of a question for Apple.
Hi, I'm using Red5Pro SDK for iOS and getting the following warning, can you please guide me to resolve this issue?
Also, I've done some research, most of the people suggesting the reference: https://developer.apple.com/library/content/qa/qa1788/_index.html#/apple_ref/doc/uid/DTS40013354 but I didn't see the option "Don't Create Position Independent Executables" in Targets section -> "Build Settings"
I'm using Xcode 8.3.3 with Deployment target is 8.0
Thank you!