gnuradio / volk

The Vector Optimized Library of Kernels

Home Page:http://libvolk.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross compile VOLK for iOS ARM targets maybe broken

w1ebr opened this issue · comments

Cross compiling for iOS on macOS x86/64 just isn't working. I don't have an M1 Mac. Maybe I should try cross compiling on linux to produce the assembly files that I can then bring back to compile for iOS... Any ideas?

It seems like the developer experience to build for iOS is less than satisfactory.

The title of your issue seems to be misleading because I can't figure out what the description and the title have in common. Could you update the title and add more context to your question? I assume this is necessary to discuss the issue.

Hello Johannes, the title had to do with the first version of my comment, which was that I got to the point in the process where I had assembly language programs for NEON but they contained "@" signs in many places where it appeared to be a comment. I wondered if the presence of "@" indicated that the perl processing step had not completed.

Today I tried to create the library in linux, cross compiling for aarch64. The make test completed successfully. However, the assembly code files still look the same as running under Xcode. I can't figure out how the ".s" files are used. Is there any documentation that explains how the library is built using C code, perl templates and some assembly code?

If not, I am in way over my head...

Thanks for the help!

We try to minimize assembly code usage. In most cases, the assembly exists for new targets that are not well supported in compilers at the time.

I don't know if this is still relevant. Did you find a way to compile for a iOS target? My lack of hardware etc. make it difficult to reproduce the issue.

Yes, I did. I was able to edit the set of files to force it to compile for an M1 processor and iOS. In the meantime, I bought an M3 MacBook Pro and that allows me to run the optimization test cases (under MacOS).

The biggest challenges at this point are the restrictions iOS imposes on USB access and the deprecation of OpenGLES (to get an SDR running).

Gene

@w1ebr are you able to share your changes? This might be interesting for others.

Do I understand correctly that an Apple Silicon machine enables you to compile for iOS etc. without any hiccups?

I will revisit what I did. I know I didn't leave things in a cleaned-up state but I still got it to compile.

The Volk package checks to see what processor is compiling the code and that's one area that was difficult for me (using a MBP with an Intel processor, it wouldn't create the right configuration. With the Apple silicon being just a couple of generations different, that became a non-issue. However, since iOS does not have a command line interface, I didn't test the compilation.

Sorry I didn't leave things in a better state. I will go back and see what I can do in case anyone else wants to brave app writing on iPadOS for M1 chips (or newer M processors)

Gene