Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VST architecture "hf" for ARM #443

Merged
merged 1 commit into from
Sep 26, 2020
Merged

Conversation

jpcima
Copy link
Collaborator

@jpcima jpcima commented Sep 26, 2020

sfztools/sfizz-ui#79
Detection the vst architecture by uname
Only if not cross-compiling, and only if not Intel (it can be messed with by flags -m32/-m64)

@jpcima jpcima requested a review from paulfd September 26, 2020 12:10
@x42
Copy link

x42 commented Sep 26, 2020

Also when compiling natively on a Raspberry Pi this fails. -- Rapbian is a debian armhf system.

https://steinbergmedia.github.io/vst3_doc/vstinterfaces/vst3loc.html#linuxformat
specifies based on the RPM Terminology + "-linux"

RPM terminology for armhf is armv7hl

It'd probably be safest to extract this from gcc -dumpmachine or gcc --print-multiarch -- that also works when cross-compiling

@jpcima
Copy link
Collaborator Author

jpcima commented Sep 26, 2020

It'd probably be safest to extract this from gcc -dumpmachine or gcc --print-multiarch -- that also works when cross-compiling

It does not seem to provide useful results. On a generic arm gcc compiler, the result is of the form arm-* regardless of flags.

If uname also is incorrect, I don't have the slightest idea on how to resolve this.
I'll see about emulating Raspian and researching into this issue.

@falkTX
Copy link
Contributor

falkTX commented Sep 26, 2020

JUCE has a way around this, by running a CLI tool that it itself builds, and getting the proper output filename from there
See juce-framework/JUCE@6f22faf

@x42
Copy link

x42 commented Sep 26, 2020

I suppose that plugin-hosts on armhf/armv7hl can also load plugins that don't use the hardware floating point unit (ie. armv7l).
But since pretty much all DSP is floating point and most v7 microarchitectures have a FPU (incl. RPi 3,4 which are most popular) it likely makes no sense to distribute any armv7l binaries.

@jpcima
Copy link
Collaborator Author

jpcima commented Sep 26, 2020

But since pretty much all DSP is floating point and most v7 microarchitectures have a FPU (incl. RPi 3,4 which are most popular) it likely makes no sense to distribute any armv7l binaries.

Yes that's a fair assumption. Are you suggesting that, as we see some architecture armvN, we append hl at the end of it and that's it? if this would work, I'll be perfectly fine with this solution.

JUCE has a way around this, by running a CLI tool that it itself builds, and getting the proper output filename from there

I'm seeing armv7l listed, no armv7hl though.

@x42
Copy link

x42 commented Sep 26, 2020

Well, that's the bug I had reported. The VST specification mandates "RPM Terminology". ARM v7 with hardware floating point support is called armv7hl in Red-Hat land.

Personally I'd prefer to argue that using arch-tripletts would be preferable to RPM terminology, but that's a different story.

The suffix `hl` indicates a little-endian processor with FPU
@jpcima jpcima force-pushed the arm-vst-architecture branch from b196baf to ec10321 Compare September 26, 2020 22:08
@jpcima jpcima changed the title VST architecture detection by uname VST architecture "hf" for ARM Sep 26, 2020
@jpcima
Copy link
Collaborator Author

jpcima commented Sep 26, 2020

OK done, it's armv7hl from now.

@jpcima jpcima merged commit e05e651 into sfztools:develop Sep 26, 2020
@paulfd
Copy link
Member

paulfd commented Sep 27, 2020

In this case you might also want to report a bug in Reaper, because it seems my version does not recognize armv7hl-linux in the vst3 content folder. At this point I would argue for pragmatism and add a symlink.

@paulfd
Copy link
Member

paulfd commented Sep 27, 2020

(I will report the bug in Reaper, it was more rhetorical ;-))

@jpcima
Copy link
Collaborator Author

jpcima commented Sep 27, 2020

Looking at the VST3 host, official code
public.sdk/source/vst/hosting/module_linux.cpp

We have this to determine the architecture directory.
https://github.com/steinbergmedia/vst3_public_sdk/blob/a395ed998bfee1969d623c15a5825160de7fd32c/source/vst/hosting/module_linux.cpp#L61-L70

What's the value utsname.machine on ARM computers?

@x42
Copy link

x42 commented Sep 27, 2020

Looking around it seems that many projects use armv7l :(

perhaps we should take this to https://github.com/steinbergmedia/vst3sdk/issues or https://github.com/steinbergmedia/vst3_pluginterfaces/pulls to clarify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants