Hey!
I am new to Rust and wanted to contribute to a project. When I tried building the cloned project, I received the following error which goes beyond my understanding of Rust:
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-arch" "x86_64" "-m64"
...
...
= note: ld: malformed universal file: slice content is not mach-o or a static library file '/usr/local/lib/libosxfuse.dylib'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The way I understand is that the project is using some resources from C/C++ and hence needs to link through the given file (please correct me if I am wrong!)
I was able to locate the file on my computer but I am not entirely sure what is supposed to be in there or exactly what I should be looking at.
It says that it was trying to link that library but the file at that place isn't really a library. Can you run the file command on that file to obtain its precise type?
Well, it is a library, then. A google search for the error message shows that it might be a problem with your C toolchain being too new. Can you try with an older version? (You're looking for "Xcode Command-Line Tools", which have nothing to do with Xcode, this is just a stupid name the Apple calls the standard Unix-y C/C++ toolchain.)
Ohh I see, okey so I am new to this and just wanted to clarify:
Quick check in my terminal xcode-select -p gave me an output /Library/Developer/CommandLineTools which I assume means I have some version of Xcode Command-Line Tools.
Since it could be too new, I need to remove it and install a specific older version?
Quick check, is your mac a M1/M2 one? It seems the dylib doesn't support it. ppc mentioned in the list means the PowerPC architecture. Last ppc mac were sold by Apple at late 2005.
That was already evident from the fact that there was a clang compiler and an ld linker on your system.
Yes, that's what I was trying to suggest based on the Stack Overflow answer linked above. However, I don't know if this is the actual problem, it's merely a shot in the dark on my part.