Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

OSX Sonoma 14.4 Issue

Recently I become aware of a failure within OCS Agent on OSX Sonoma 14.4

It happens that all of the sudden, the agent stops to communicate and there is no information to understand the problem on logs. 

I was able to find a more detailed output from the error trying to execute directly the binary in /Applications/OCSNG.app/Content/Resources, which I post below:

Mac M1:

Failed to load Ocsinventory::Agent, Can't load '/Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/auto/List/Util/Util.bundle' for module List::Util: dlopen(/Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/auto/List/Util/Util.bundle, 0x0001): tried: '/Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/auto/List/Util/Util.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/auto/List/Util/Util.bundle' (no such file), '/Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/auto/List/Util/Util.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')) at /System/Library/Perl/5.34/XSLoader.pm line 96.

 at /Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/List/Util.pm line 24.

Compilation failed in require at /Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/Scalar/Util.pm line 23.

Compilation failed in require at /Applications/OCSNG.app/Contents/Resources/lib/XML/Simple.pm line 44.

BEGIN failed--compilation aborted at /Applications/OCSNG.app/Contents/Resources/lib/XML/Simple.pm line 44.

Compilation failed in require at /Applications/OCSNG.app/Contents/Resources/lib/Ocsinventory/Agent.pm line 11.

BEGIN failed--compilation aborted at /Applications/OCSNG.app/Contents/Resources/lib/Ocsinventory/Agent.pm line 11.

Compilation failed in require at (eval 1) line 1.

BEGIN failed--compilation aborted at (eval 1) line 1.

After that, I tried to run using rosetta compatibility to arch -x86_64, which give me the error below on M1:

ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xc400080, needed 0xf880080)

I will try to use an Intel machine to get the detailed output, but I can say in advance that the same behaviour occurs in Intel machines.

in OCS Inventory NG agent for Unix by (160 points)

4 Answers

0 votes

after a phew weeks, I finally figured out the solution to this problem on Sonoma OSX 14.4+, and to be honest it's quite simple to fix.

you need to change the first line of the following file:

the first line will have the content:

and you need to update it to:

and that is it, fixed

by (160 points)
0 votes

I tried out cainat's sugested fix, and then tested it on two different M1 and a third M2 machine. Two were existing OS installs with macOS 14.4.0, the third was a fresh OS install with macOS 14.4.1. 
However, it did not work. The OCSNG.app crashes as soon as it opens.

by (180 points)
0 votes

Hi, there's an issue raised on Github. I suggest following it to see when a definitive fix might be published: https://github.com/OCSInventory-NG/UnixAgent/issues/461

I managed to get the agent running by renaming EDID.pm to end in .bak in /Applications/OCSNG.app/Contents/Resources/lib/Parse/ and starting the agent. On the inventory server I could see the agent made contact.

Last inventory: 04/16/2024 22:27
Last contact: 04/16/2024 22:27

I don't know how important https://metacpan.org/pod/Parse::EDID is for OCS. Going by the description of the project. I could probably do without the information for Apple systems.

This module provides some function to parse Extended Display Identification Data binary data structures.
Extended Display Identification Data (EDID) is a metadata format for display devices to describe their capabilities to a video source. The data format is defined by a standard published by the Video Electronics Standards Association (VESA).

If you're using an Apple Silicon chip an additional fix is required.

Downloaded the source of List::Util: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.63.tar.gz

Compile using (this will only compile for arm64):
perl Makefile.PL

If you would like to compile the bundle to be compatible with more archs:
env ARCHFLAGS='-arch arm64 -arch arm64e -arch x86_64'
perl Makefile.PL

Copy Util.bundle from your compile location Scalar-List-Utils-1.63/blib/arch/auto/List/Util and place it in: /Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/auto/List/Util

After some further testing the .app works currently for me. The above mentioned changes made it possible.

[Fri Apr 19 13:04:15 2024][info] [download] Beginning work. I am 81816.

[Fri Apr 19 13:04:15 2024][info] [download] Option turned off. Exiting.

[Fri Apr 19 13:07:13 2024][info] [download] Download is off.

[Fri Apr 19 13:07:23 2024][info] [download] Beginning work. I am 82201.

[Fri Apr 19 13:07:23 2024][info] [download] Option turned off. Exiting.

Now you should be able to start the agent if you call it directly from the terminal: sudo /Applications/OCSNG.app/Contents/Resources/ocsinventory-agent 

A workaround could be to execute the agent using cron. The app itself still doesn't appear to work.

by (140 points)
edited by
0 votes
Many thanks for sharing, nicth.
Just to add: for us using an older version of OCS, version 2.9.0, worked. (Seems we miss nothing as compared to the updated version, in our case.)
by (180 points)
Powered by Question2Answer