I spot checked the latest pre-built binaries at https://packages.macports.org/openssl3/. The first four bytes should be "cf fa ed fe" for both ARM and X86 macs. Manually check your /opt/local/libexec/openssl3/lib/libssl.3.dylib with "od -tx1 -N16" to ensure that your configure process was not confused, but it is probably not.
So yes, it looks like that libssl.3.dylib file is broken. I don't know how that might have happened, but I wonder why. Try reinstalling the openssl3 port. On Sat, Dec 13, 2025 at 10:40 AM Jason Liu <[email protected]> wrote: > Hi all, > > I'm trying to build a port locally on my machine, and this port depends on > curl/openssl3. During the build, I am getting some error messages that > baffle me. At the configure stage, the build is giving the following: > > dyld: Library not loaded: /opt/local/libexec/openssl3/lib/libssl.3.dylib > Referenced from: /opt/local/lib/libcurl.4.dylib > Reason: no suitable image found. Did find: > /opt/local/libexec/openssl3/lib/libssl.3.dylib: unknown file type, > first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > /opt/local/libexec/openssl3/lib/libssl.3.dylib: stat() failed with > errno=1 > /opt/local/libexec/openssl3/lib/libssl.3.dylib: unknown file type, > first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > > Searching around online, people on Stack Overflow seem to think that > 'unknown file type: first eight bytes' indicates that it's because the > '.dylib' file is actually an ELF shared object format (i.e. a Linux-style > '.so' file), instead of a Mach-O binary format. A.I. sources seem to think > that either it's the ELF/Mach-O reason, or that the file is corrupted or an > empty file, based on the fact that dyld is seeing all zeros for the first > eight bytes. > > Has anyone else ever seen a similar error? Is it possible there could be > something wrong with the current openssl3 port? > > Jason Liu >
