RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

Can’t Build 1.7.0 on iOS

Open SpiralCut opened this issue 8 years ago • 13 comments

[Description of the bug] I’m unable to build RetroArch for iOS (32 or 64 bits) since my most recent try after the 1.7.0 update. Xcode throws the following error when trying to build 64bit.

Undefined symbols for architecture arm64: "_process_sinc_neon_asm", referenced from: _resampler_sinc_process_neon in griffin.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with

Steps to reproduce the bug

  1. Open the ios10 makefile in Xcode
  2. Compile for connected device
  3. Fail

Version/Commit

  • RetroArch: 581683d is latest version tried but have had issue since first trying to update to 1.7.0 a day or so after release

Environment information

  • OS: iOS 10.3.3, iOS 11.2.1
  • Compiler: OS X 10.11 (el capitan) w/ Xcode 8

SpiralCut avatar Jan 08 '18 22:01 SpiralCut

I believe you need Xcode 9 in order to compile for iOS 11 or later. That aside, I was having these same issues, with High Sierra and Xcode 9.2. I had to move back to an earlier commit in order to get it to work.

Check my note on the libretro forums:

https://forums.libretro.com/t/recent-commit-breaks-ios-11-building/14221?u=aaronouthier

aaronouthier avatar Jan 12 '18 00:01 aaronouthier

Later commits may or may not work, as I don't know exactly when the build process "broke".

aaronouthier avatar Jan 12 '18 00:01 aaronouthier

Somebody may wish to add a label iOS for easier searching.

aaronouthier avatar Jan 12 '18 18:01 aaronouthier

Xcode is not the problem, even if I set iOS 10 deployment target or iOS 9 while using the RetroArch_iOS10.xcodeproj I have the exact same error, so impossible to compile the 1.7.0 in arm64.

No problem with earlier builds. So something is broken.

Undefined symbols for architecture armv7:
  "_process_sinc_neon_asm", referenced from:
      _resampler_sinc_process_neon in griffin.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)


ld: warning: -no_pie ignored for arm64
Undefined symbols for architecture arm64:
  "_process_sinc_neon_asm", referenced from:
      _resampler_sinc_process_neon in griffin.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Alex793 avatar Jan 14 '18 09:01 Alex793

MrSeven_X on the forum recommended commit 0a2b442. That commit builds OK for iOS 11 (64bit) so the issue must have creeped in after that (post December 26).

SpiralCut avatar Jan 14 '18 12:01 SpiralCut

Ok guys, after some bisecting, I found the origin of the issue. It was a little bit complicated because between some builds we had a compilation error because an issue with "joypad_connection.c", so double bisecting (it has been fixed later).

So the ARM64 Compilation is broken since this commit : 0dd2f075fe579c701ef7c00bb74d8a0d8511251b

And exactly one or some modifications inside : libretro-common/audio/resampler/drivers/sinc_resampler.c

Then, commit b9248cf3aff28f3ab2619a98fe8a125782f0c9ff changed some lines inside, but still the broken ARM64 compilation since these commits.

Today I have not the time to check what is exactly the problem because +290 −165 lines to check...

Also, the last working build to compile in ARM64 is 3090e85064108954579ff23f5231d9862ba2b65c (compile using the last input/connect/joypad_connection.c available to avoid the joypad compilation error)

Just for fun, I tested to compile the very last build available on the GIT but using the 3090e85064108954579ff23f5231d9862ba2b65c libretro-common/audio/resampler/drivers/sinc_resampler.c and it compile and works perfectly lol

So now if someone have the time to find the problem, I will try to check but not today.

PS : Sorry if my English is not perfect, it's because I'm French ^^

Alex793 avatar Jan 15 '18 06:01 Alex793

BTW, assuming we can fix this, when are you guys finally going to help us getting a real iOS 11 build up and running? We keep asking but we never get any direct help for setting this up.

inactive123 avatar Jan 16 '18 00:01 inactive123

@twinaphex I'm not an expert with git, compilation, sources etc. but I try to help when I can with my capacities https://github.com/libretro/RetroArch/pull/5349 and also try to acquire some new by find and resolve any new issue I have.

I'm just starting to use ARM64 build with iOS 10 (same build as iOS 11), so it's the just the beginning for me with ARM64, also I don't know how to port all cores to ARM64 because many compilation errors and I don't have the knowledge on this domain. Some posted many ARM64 compiled cores but no sources or details of how they success so atm I can't learn and help for this.

BTW as I said in my post, when I have a little time I will try to find the issue and a fix for this subject, I already found the problematic commit so it's a good first step.

Everyone help with his capacities.

Alex793 avatar Jan 16 '18 00:01 Alex793

@Alex793 I would hit up MrSevenx on the retroarch apple devices section on the forum. He's been compiling many of the emulators for 64-bit and his 1.6.8 release was by far the better build compared to the current commit.

waefrebeorn avatar Jan 18 '18 21:01 waefrebeorn

@emangamer Nice, I seen he compiled many cores for ARM64 but no sources, I think he should commit all his work on ARM64 cores so everyone can help.

Alex793 avatar Jan 18 '18 21:01 Alex793

That’s why I’m saying you should talk with him I don’t think he knows how to use the github commit

On Thu, Jan 18, 2018 at 4:22 PM Alex793 [email protected] wrote:

@emangamer https://github.com/emangamer Nice, I seen he compiled many cores for ARM64 but no sources, I think he should commit all his work so all can help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/6070#issuecomment-358785746, or mute the thread https://github.com/notifications/unsubscribe-auth/AfMke7fhOwZrNlZZUbjjT6cg-sRqpQAoks5tL7YQgaJpZM4RXENp .

waefrebeorn avatar Jan 18 '18 21:01 waefrebeorn

Pushed this commit -

https://github.com/libretro/RetroArch/commit/f10b60f14fdd5dd325ba0821a6566e408d08bbea

It should now build the sinc resampler without any NEON optimizations at all. I think now that aarch64 is the main architecture, these NEON optimizations which were written with ARMv7 32bit in mind are probably out of date now.

inactive123 avatar Jan 24 '18 06:01 inactive123

Thanks @twinaphex, I will test it. I couldn't look for the compilation issue because big flu here... So thanks for your help.

Alex793 avatar Jan 24 '18 06:01 Alex793