Skip to content

libhostpolicy.dylib incompatible architecture on macOS (arm64) with .NET 8 #202

@mansanlab

Description

@mansanlab

I am encountering an architecture compatibility error when running ThermoRawFileParser v2.0.0-dev-osx using .NET 8 on macOS (Apple Silicon).

It appears the bundled libhostpolicy.dylib is built for x86_64, while my system requires arm64/arm64e.

Environment

  • ThermoRawFileParser version: v2.0.0-dev-osx
  • .NET version: 8.0.418
  • OS: macOS Sequoia (15.6.1)
  • Architecture: arm64

Command Executed

dotnet --version
8.0.418

dotnet ThermoRawFileParser-v.2.0.0-dev-osx/ThermoRawFileParser.dll \
  -i=Hela_trapelute_200ug_2umColumn_test001.raw

Error Output

Failed to load /Users/loaner/Downloads/ThermoRawFileParser-v.2.0.0-dev-osx/libhostpolicy.dylib, error: 
dlopen(/Users/loaner/Downloads/ThermoRawFileParser-v.2.0.0-dev-osx/libhostpolicy.dylib, 0x0001): tried: 
'/Users/loaner/Downloads/ThermoRawFileParser-v.2.0.0-dev-osx/libhostpolicy.dylib' 
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), 
'/System/Volumes/Preboot/Cryptexes/OS/Users/loaner/Downloads/ThermoRawFileParser-v.2.0.0-dev-osx/libhostpolicy.dylib' (no such file), 
'/Users/loaner/Downloads/ThermoRawFileParser-v.2.0.0-dev-osx/libhostpolicy.dylib' 
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

An error occurred while loading required library libhostpolicy.dylib from 
[/Users/loaner/Downloads/ThermoRawFileParser-v.2.0.0-dev-osx/]

Questions

  1. Is there an arm64 build available for macOS?
  2. Should this be run under Rosetta (arch -x86_64 dotnet ...) instead?
  3. Is there a recommended way to rebuild ThermoRawFileParser for arm64 on macOS?

This appears to be an architecture mismatch rather than a .NET runtime issue, since .NET 8 itself is functioning correctly on the system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions