sgan81 / apfs-fuse

FUSE driver for APFS (Apple File System)
GNU General Public License v2.0
1.74k stars 164 forks source link

"Illegal instruction (core dumped)" when running from Live OS via USB #119

Closed PicoMitchell closed 4 years ago

PicoMitchell commented 4 years ago

I am working on a Live OS based on Linux Mint 19.3 Cinnamon to be used as a rescue OS for data recovery and backup purposes. This will be PXE booted as well as run via USB drives.

I am able to successfully build and run apfs-fuse on my installed OS (also Linux Mint 19.3 Cinnamon), but when I try to run it from within the Live OS booted via USB, I only get an "Illegal instruction (core dumped)" message and then the command terminates. This applies to all 4 of the apfs-fuse binaries. When I run the same binaries on my installed OS, they seem to work just fine and display the help info when run without any arguments.

The same issue occurred when I successfully built apfs-fuse from within the Live OS as well.

Is there anything that can be done to support Live OS's? Or am I doing something wrong on my end?

sgan81 commented 4 years ago

When looking at issue #120, I don't think it's your problem. But you could try and remove the -march=native build option from CMakeLists.txt. Let me know if it worked.

arcticforensics commented 4 years ago

Yes, removing -march=native fixes the problem.Thanks. -------- Original message --------From: Simon Gander notifications@github.com Date: 24/4/20 21:19 (GMT+10:00) To: sgan81/apfs-fuse apfs-fuse@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [sgan81/apfs-fuse] "Illegal instruction (core dumped)" when running from Live OS via USB (#119) When looking at issue #120, I don't think it's your problem. But you could try and remove the -march=native build option from CMakeLists.txt. Let me know if it worked.

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/sgan81/apfs-fuse/issues/119#issuecomment-618952334", "url": "https://github.com/sgan81/apfs-fuse/issues/119#issuecomment-618952334", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

sgan81 commented 4 years ago

That's interesting, because that could mean that there is a bug in the compiler ... What CPU do you have, and what compiler are you using? Or were you compiling apfs-fuse on one computer and running it on another?

PicoMitchell commented 4 years ago

Confirmed that removing all instances of " -march=native" from CMakeLists.txt allowed apfs-fuse to work properly when live booted from USB as well as PXE booting.

@sgan81 Not sure if your latest comment was directed at me for my live booting issue or at @brucemarkey for their AMD issue.

But, the CPU I built and ran on was Intel Core i5-5300U. For our use-case we do need apfs-fuse to be able to be run on any CPU via PXE or USB. The CPU for my PXE boot testing was Intel Pentium G4400T. I can try testing a PXE or USB boot on an AMD processor later in the week, hoping the build I have done with that setting remove will run on any CPU.

sgan81 commented 4 years ago

Mhm, compiling for another processor using -march=native might cause problems ... Anyway, I have now pushed a makefile change that doesn't use -march=native anymore.

PicoMitchell commented 4 years ago

Awesome! Thank you! Closing this issue.