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

Support for ARM-based processor #5914

Open
tothzola opened this issue Dec 9, 2021 · 30 comments
Open

Support for ARM-based processor #5914

tothzola opened this issue Dec 9, 2021 · 30 comments
Labels
appveyor enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. installer Status: Blocked by other issue

Comments

@tothzola
Copy link

tothzola commented Dec 9, 2021

Hello RubberDuckDev Team,
first big big thanks for this great app, very helpful for VBA development !
Recently updated my hardware and want to ask if there will be ARM RubberDuckVBA version? Thank you and keep up the good work.

ARM - Windows 11

System: (Processor Apple Silicon, ARM Virtual Machine)
Edition: Windows 11 Home
Version: 21H2

Office 2019:
Microsoft® Excel® 2019 (Version 2112 Build 16.0.14729.20038) 64-bit

@tothzola tothzola added the support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask! label Dec 9, 2021
@Vogel612
Copy link
Member

Vogel612 commented Dec 9, 2021

Rubberduck is currently compiled with the Platform AnyCPU, which for probably historical reasons does not seem to include ARM. Since all releases are created through appveyor, this should be fixable by extending the build matrix in .appveyor.yml:

Rubberduck/appveyor.yml

Lines 28 to 32 in 5a0ac77

# build-matrix: all Release CPUs on Visual Studio
image: Visual Studio 2019
configuration: Release
platform: Any CPU

I'm not certain how that would impact the installer, maybe @bclothier can shed some light on that. As a workaround it should be definitively possible to build it locally with the Platform set to ARM for an ARM-compatible build.

@tothzola
Copy link
Author

Hello, any news, can the installer be build for arm support?
Thanks

@Vogel612 Vogel612 added appveyor enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. installer and removed support Whether you're using Rubberduck or you've forked it and have questions, never hesitate to ask! labels Jan 14, 2022
@bclothier
Copy link
Contributor

I apologize for having missed this question when Vogel pinged me last month.

Can you please clarify when you see the dialog? As soon as you try to run the installer, correct?

I think we need to first answer whether the Rubberduck's code itself can compile on ARM and I don't have an ARM system handy to prove this.

What I'd want to do is see if we can get a volunteer to try and install Rubberduck manually without the installer so we can verify it will work on ARM without issues and if we can prove that, we can try and extend the installer to run on ARM.

@bclothier
Copy link
Contributor

Just to leave notes for development:

Inno Setup has a flag for ARM64 here:
ProcessorArchitecture

However, we have this entry:

May be as simple as adding arm64 to the line but even if that means installer will work on ARM, doesn't mean Rubberduck itself will work on ARM.

@tothzola
Copy link
Author

Hello, thanks for the answer.

Sure I can volunteer to install RubberDuckVBA, on my system.

Can you walk me thru how could I install it manually I only installed trough the installer, and yes the message above appears as soon as click on the installer.

System is Apple silicon (M1 Pro) Windows 11 on Parallels 17.

@bclothier
Copy link
Contributor

When there's time, a zip file and instruction will be prepared here. Thanks for volunteering!

@bclothier
Copy link
Contributor

Also, forgive me for asking such basic question but I want to be super duper sure --- we can run VBA code on an ARM system, right?

@tothzola
Copy link
Author

Ok I did some quick testing on my personal add-in, everything runs ok just on function doesn't get recognized. The input function. But I do some research, will get it done.

Meanwhile in the task manager excel runs on ARM(x64 compatibility mode).

@tothzola
Copy link
Author

Hello @bclothier, any updates on this issue? Thanks

@lvavesaath
Copy link

My VBA-apps work perfectly on ARM-processor. Support for ARM would be much appreciated. I can do some testing if that would help.

@tothzola
Copy link
Author

tothzola commented Jul 5, 2022

Hello @Developers, any update on this issue?

Thanks

@Vogel612
Copy link
Member

Vogel612 commented Jul 5, 2022

@tothzola

As a workaround it should be definitively possible to build it locally with the Platform set to ARM for an ARM-compatible build.

None of the developers have an ARM machine to run any tests surrounding this, as such your best bet on getting support for it is spending an hour on setting a local build and installer up for yourself and submitting a PR if it works :) All the necessary steps after cloning and opening in Visual Studio are already outlined in this thread.

@arthur-verta
Copy link

Hi and thanks for the lib !!

Same problem here, unfortunately i don't know how to build locally, but will be happy to help if someone can guide me.

@tothzola
Have you found a solution ?

@tothzola
Copy link
Author

Hi and thanks for the lib !!

Same problem here, unfortunately i don't know how to build locally, but will be happy to help if someone can guide me.

@tothzola

Have you found a solution ?

@arthur-verta hello, I did try to compile my own version locally but I couldn't figure out how, so unfortunately no.
Keep me updated if you succeed. Thanks

@lvavesaath
Copy link

lvavesaath commented Sep 29, 2022 via email

@T2MWorks-Mitch
Copy link

any updates on this? love rubberduck but have now migrated to apple silicon like @lvavesaath I am willing to test if needed

@arthur-verta
Copy link

Nothing here... Still stuck and still available to help if someone is wanting to guide us on how to compile it 👍

@bclothier
Copy link
Contributor

Because I don't have an ARM64 processor and because there seems to be an issue with using the build to build an ARM output, this makes things a bit more complicated so before we go to the trouble, I want to confirm this is a working version of ARM64 build. If any of you can confirm that this is working, we can look into integrating this in the build process.

This is the setup file as a zip since GitHub doesn't allow uploading exe file directly. Unzip it then run the setup. This will not run on any other architecture.
Rubberduck.Setup.ARM64.zip

@T2MWorks-Mitch
Copy link

hey @bclothier thank for this. I have attempted to get this working , but the COM addin does not seem to want to load. The installer runs fine , but I get "rubberduck add-in failed to load" error when launching the IDE.
I have tried installing for single user as well as all users. I was able to run the .bat file sucessfully but no change in the error message .
I also tried to run the regasm command from the the troubleshooting guide , and it resulted in a "rubberduck.dll is not a valid assembly" error

My MSO is Version 2211 Build 16.0.15831.20202) 64-bit on windows 11 Enterprise for ARM64

@arthur-verta
Copy link

hey @bclothier thanks for the zip.
Same thing here. I installed it as administrator, without problem. Then got the following error message when opening VBA or going to the add-in manager :

image

on Microsoft® Excel® for Microsoft 365 MSO (Version 2211 Build 16.0.15831.20202) 64-bit

@bclothier
Copy link
Contributor

I did some research and one thing I noticed is that the Rubberduck's DLL files are reported as ARM64 so that's right. I determined this using ROM Properties. However, the dependent DLLs that aren't owned by Rubberduck does not appear to be generated as ARM64. I do not know if that's a factor but if the dependent DLLs fail to load due to incompatibility, that might be why.

Furthermore, Rubberduck depends on Easyhook and unfortunately, it's not clear whether it is capable of running on ARM64 platform. We would need to verify that it will work there as I don't see any special build for ARM64. It might just work as-is but I can't be 100% sure that's the case.

Finally, I looked at the tlbexp, regasm can tell you that there are no specific flags for ARM64. I got nothing about generating the type library. Given that COM is an ABI, it might be that there is no difference. If that is true, then I would expect that you would be able to use VBIDE's Tools -> References and manually browse to the Rubberduck.x64.tlb and it should then load and expose all the objects within that library. If that is the case, then it's likely not an issue with type library generation but rather the dependent DLLs not being able to load with the ARM64 build.

I can post a branch for those with a ARM64 version of Visual Studio and see if they have any better luck building and running it.

@tothzola
Copy link
Author

tothzola commented Jan 8, 2023

Hy @bclothier, I also installed the Rubberduck ARM64 setup, so far have the same issue.
Don't know any details maybe this screenshot tells you more to te problem:

image

It displays as loaded but missing extension ... ?

*Edit:
Also checked the VBIDE's Tools -> References -> Rubberduck.x64.tlb

image

Objects can be referenced.

Microsoft® Excel® 2016 MSO (16.0.14332.20431) 64-bit

Thanks & Cheers
Zoltan.

@bclothier
Copy link
Contributor

Ok, so I got the confirmation that yes, EasyHook indeed can only run on x86 architecture and we would need to get an ARM build of EasyHook before we can then run Rubberduck on ARM. In the light of that information, we're effectively blocked on this until EasyHook can provide an ARM build.

Incidentally, it should be pointed out that Rubberduck has a number of other dependencies as well. For example, the Castle Windsor makes no mention of any ARM support and the ROM properties report their DLL as 32-bit "Intel i386 (.NET)" as shown below. This seems to be true for all other dependent DLLs including ANTLR and various Microsoft stuff:
image
Note: I think that the reporting those as "32-bit" may be technically incorrect if they've been compiled for Any CPU but for our goals here, that's still a problem because we need ARM and I assume it has to be ARM64 all the way down for the project to run correctly.

@T2MWorks-Mitch
Copy link

@bclothier Thanks for efforts , unfortunate that external dependencies are blocking this.

A quick look at the easyhook repo shows that this has been discussed since the ARM based WinRT came out (7 yrs ago!) and there was never a resolution.

Maybe with the introduction of the M series hardware there will be more interest in ARM compatibility.

I have Win64 resources to run things in case , but have been trying to reduce my machine sprawl and have been moving to the MBP with parallels for Win.
Parallels is excellent but it can't emulate Wintel I guess

@bclothier
Copy link
Contributor

Parallels is a virtualization software rather than an emulator so if your MBP is based on an ARM processor rather than an Intel processor, then Parallels has to work with ARM-based Windows software. An emulator would be much slower. If you have any Mac that still has an Intel processor, then Parallels should be able to allow you to use x86-compiled software. I know that really doesn't help with the machine sprawl, though.

@arthur-verta
Copy link

Thanks @bclothier for enlightment.

Have some of you found Rubberduck replacement solution, by any chance, running on ARM ? Even paying product ?

@retailcoder
Copy link
Member

IIRC EasyHook is only used for hooking the Fakes API (and the "beep" suppressor for autocompletion features); if it's the only thing holding back an ARM64 build, there's probably a way to fork RD and build it without this dependency (obviously at the cost of the Fakes API not making it). As for a replacement, I'm not sure about ARM64 but I think twinBASIC is a serious contender.

@arthur-verta
Copy link

Actually twinBASIC is also unavailable for ARM at this time.

As a temporary solution, I've been setupping an Azure Virtual Machine running on Windows 11 64 Bits. Rubberduck is running like a charm on it, and i can access it from my MacBook M1.

It is a solution that work fine if you just need to do a Rubberduck check / cleaning from time to time. I won't recommend if you need Rubberduck during full-time developing, as it would get expensive, and some latency can be experienced.

For information, pricing is billed per minutes of machine running on Azure. As an example, for a competitive machine, it cost about 0,20$/hour (equiv. 140$ if running full-time during a month). So if you turn off the machine when you are not using it, the budget can remain very reasonable.

@reinies
Copy link

reinies commented Sep 6, 2023

Hey @bclothier,

is there really a arm64 build necessary? Windows on ARM machines can run x64 and x86 executables. Maybe only the check for the system should be removed.

I want to compile it myself for testing. But unfortunately it wont compile out of the box. Is there a developer.md / documentation for developers to start?
So I know what to install to build this. (Visual Studio 2022, .Net 4.6.2...)

@Vogel612
Copy link
Member

@reinies we have a wiki article about getting a local build started: https://github.com/rubberduck-vba/Rubberduck/wiki/Contributing

Note that the article was last edited in January 2023 and dates back to quite a while before that, so it might not be perfectly accurate to the actual state of the build process.

We basically have a multistep build that performs everything you need.
If you need any help with the process, I can highly recommend our public discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appveyor enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. installer Status: Blocked by other issue
Projects
None yet
Development

No branches or pull requests

8 participants