fusioninventory-agent icon indicating copy to clipboard operation
fusioninventory-agent copied to clipboard

Cannot run fusioninventory-agent on Apple M1

Open MicaENSL opened this issue 4 years ago • 22 comments

On a brand new MacBook Pro with M1 chipset, installation went OK but when launching /opt/fusioninventory/bin/fusioninventory-agent I got th following message: unable to execute /opt/fusioninventory/bin/fusioninventory-agent: Bad CPU type in executable. Regards,

MC

MicaENSL avatar Jan 21 '21 10:01 MicaENSL

Hi @MicaENSL Apple M1 is really new and we don't have such platform so we can't rebuild the provided perl for M1. So only Intel based OS is suportted at the moment.

g-bougard avatar Jan 21 '21 16:01 g-bougard

someone will need to download the latest version of "xcode", and add the new m1 to the build targets of the project, it will cross compile from intel

https://developer.apple.com/documentation/xcode/building_a_universal_macos_binary

we-sell-bags avatar Jan 28 '21 08:01 we-sell-bags

Hi @we-sell-bags

thank you for the link, but the main problem here is to build our dedicated perl and openssl for the arch and we don't have such computers to test the result. Indeed we could still try to build a dedicated and native installer for M1 as GH is providing such systems for the GH Actions workflow.

g-bougard avatar Jan 28 '21 08:01 g-bougard

I read this morning in the 5.32.1 perldelta page the following sentence:

MacOS (Darwin)

    The hints file for darwin has been updated to handle future macOS versions beyond 10. Perl can now be built on macOS Big Sur.

This is a first step.

g-bougard avatar Jan 28 '21 11:01 g-bougard

https://github.com/openssl/openssl/blob/52c587d60be67c337364b830dd3fdc15404a2f04/CHANGES#L62 https://github.com/openssl/openssl/commit/61168b5b8dde03f3b77ddf5e4b1b81c338c01746

next step: openssl also added m1 support in the latest stable (1.1.1j). is there a rough idea when fusioninventory-agent could become m1 compatible?

andreasbrett avatar Mar 10 '21 22:03 andreasbrett

Am I reading this correct that the problem is not necessarily the M1 chip but rather MacOS 11? I can't get 2.6-2 to run on MacOS 11 aka Big Sur.

Happy to beta test if something is available.

glassworksvfx avatar Apr 19 '21 05:04 glassworksvfx

Has there been any progress on this? I seem to fail to get the agent to run on an intel MacBook running Big Sur (MacOS 11)

glassworksvfx avatar Apr 30 '21 13:04 glassworksvfx

Hi there,

indeed I managed to produce an agent which runs on Apple M1 and with still few fixes regarding Apple Silicon CPU support. Indeed the agent is GLPI-Agent which is a fork of FusionInventory Agent 2.6. This agent has few more included features and some others are under development, but by default it behaves exactly like FusionInventory Agent 2.6.

Even if there's still no official release, I put the latest generated development packages there: http://prebuilt.fusioninventory.org/stable/macosx-arm64/

The packages are extracted from MacOSX-Build artifact produced in this Github Actions job. This development release includes perl 5.32.1 & openssl 1.1.1k.

Can you give it a try ?

g-bougard avatar May 06 '21 16:05 g-bougard

Brilliant news. Thank you. I will get testing immediately.

glassworksvfx avatar May 06 '21 16:05 glassworksvfx

Hi Guillaume, unfortunately I can't get it to run and I seem to be struggling with the same problem on every machine running MacOS 11 (Big Sur). The daemon won't launch, even after a reboot.

sudo launchctl list|grep glpi
-	1	org.glpi-project.glpi-agent

The machines on Catalina are no problem. Not sure if I'm doing something wrong but tried every possible route now.

glassworksvfx avatar May 09 '21 06:05 glassworksvfx

Hi @glassworksvfx you probably missed the fact the agent needs to have a server set in a configuration file. Did you set it up ? If not, the installation path being /Applications/GLPI-Agent.app, create a file myserver.cfg under /Applications/GLPI-Agent.app/etc/conf.d with server = http://myserver/plugins/fusioninventory. If this is not sufficient, can you try the following scripts ? /Applications/GLPI-Agent.app/bin/glpi-inventory

/Applications/GLPI-Agent.app/bin/glpi-agent --logger=stderr --debug --debug

But anyway, it's not a good idea to hijack the fusioninventory-agent issues to investigate a glpi-agent issue. You should probably better create one there and link this one to keep a following.

g-bougard avatar May 09 '21 06:05 g-bougard

Hi @g-bougard,

apologies, didn't know this wasn't the right place. I will do some more digging with the debug instructions and if need be create a post in the appropiate place.

glassworksvfx avatar May 09 '21 07:05 glassworksvfx

After correcting a couple of syntax errors in my config file (was missing the 'server = ...' entry in front of the URL) I can confirm this is working. Thank you for your help.

glassworksvfx avatar May 09 '21 07:05 glassworksvfx

Hi @g-bougard ! Do you have any news about this? We have many Mac M1 unfortunately... Regards,

VF

Loopers29 avatar Aug 13 '21 13:08 Loopers29

Hi @Loopers29 as explained earlier, you'll have to use GLPI Agent for Apple M1. The news since then is you can download the latest build from GLPI Agent nightly builds: look there for "MacOSX - Apple Silicon" build for arm64 arch.

g-bougard avatar Aug 13 '21 19:08 g-bougard

Good morning @g-bougard , So, you confirm me that no update on Fusion Inventory is planned to support the Apple M1 ?

Loopers29 avatar Aug 25 '21 09:08 Loopers29

Yes, I confirm.

g-bougard avatar Sep 01 '21 14:09 g-bougard

@ddurieux Please, can you confirm the following (I know some issues were closed but shouldn't have)?

Good morning g-bougard , So, you confirm me that no update on Fusion Inventory is planned to support the Apple M1 ?

C-Duv avatar Dec 06 '21 16:12 C-Duv

I confirm it is planned ;)

ddurieux avatar Dec 06 '21 16:12 ddurieux

@ddurieux Would you have release date for me ? :D

Loopers29 avatar Dec 06 '21 17:12 Loopers29

Thanks, I'll follow this issue then ;)

(I can access an M1 macOS if tests are needed)

C-Duv avatar Dec 06 '21 17:12 C-Duv

@Loopers29 in version 3.0 of agent, between January and March

@C-Duv yes, it can help me ;) you can contact me on my mail (david at durieux.family) or on the discord server (see on http://fusioninventory.org contact page)

ddurieux avatar Dec 06 '21 17:12 ddurieux