-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x86_64-apple-darwin13.4.0-clang fails with "unsupported file format" error #9096
Comments
You probably need to use an older macOS SDK. |
You can force our toolchain to use a specific SDK via the env. var |
When you run When you run AFAICT, Apple have not released the source-code for version 351.8 so there's nothing I can do about this at present. |
Thanks @mingwandroid. I installed I assume that this will be something that will eventually be fixed (but not until (if?) Apple releases the source code for this version)? |
While it'd be nice to support any SDK the user wants, it's not something we're in control of, nor is it a pressing need for building packages for I know there are meant to be ways of using newer SDKs with a different MACOSX_DEPLOYMENT_TARGET but I've never found that to be very reliable (or at all reliable). We do do this though to an extent for a single package. Qt 5.9.4 needs to be built with macOS SDK 10.11 and we target 10.10, still this isn't something I'm comfortable with in general. |
I had the same linking error when using the SDK provided with Xcode 9.4 (10.13); I found I could successfully link using any of the SDKs from phracker/MacOSX-SDKs repo (I tested 10.9, 10.10, 10.11, 10.12 and 10.13). So it's not necessary to go all the way back to 10.9, if you have other reasons for wanting to use a more recent version of the SDK |
I think I'm having this same issue but too unfamiliar with the coding process to fix as has been suggested. If I'm not mistaken this sounds like the same problem everyone else is having. I'm getting the error just from running:
Just a snippet of the output messages looks like: Then below that:
Anaconda's version of RStudio. I have RStudio installed by itself too and I was using that for a long time before installing Anaconda. Sorry for to inundate but what exactly is the solution by path of least resistance? I don't intend on using Rstudio by itself so I can uninstall that if it's conflicting with anything. |
@aisync Have you resolved this? Mine's even strange... when executing in R studio, I got errors:
But run when under the terminal, I got success:
I don't know what's going on. It seems one goes to use XCode libSystem.tbd, one goes to use system's CoreFoundation.tbd. |
@yarcowang this's been a long standing issue on my end. I was able to find After running I've gotten packages installed that require the dependency. But I still don't know what's going on either. If anybody has a solution that'd be great. |
@aisync @yarcowang and anyone else who hits this:
|
@ihnorton Much thanks. I gave this a go on a fresh computer I fortunately had the advantage of testing it on. After following above instructions it didn't seem to fix the exit status following the series of compilation errors. I'll include the output, one run on R-Studio and the other on R via Terminal -- after adjusting the above configs. It's possible I didn't successfully use the downgraded SDK if the procedure is more involved then what your instructions included? Anybody else find this to fix the compile error? @mingwandroid you've helped me with this in the past. The end result was to install as many dependencies from Conda rather than through CRAN via R. The latter will more often than not exit with zero status and tons of compiling errors. I've since followed the instructions below with MacOSX10.10.sdk hoping I'd be able to mitigate lengthy builds via https://pastebin.com/z4P8TLfi The general error will be something along the lines of (above link is more complete)
|
I had to create /opt directory because the command was outputting an error: I wasn't sure if this was a universal directory or not, but thought it was worth mentioning. |
@ihnorton I'm not familiar with much of the coding and use R/Conda mainly for statistical packages. @tjd2002 you were able to use the same 10.13 SDK downloaded from phracker and it resolved the issue? Appreciate all the help |
Setting |
It's stronger than that. The pointed to SDK will be used when using our compilers and/or linkers, any calls to -isysroot or -sysroot will be ignored. |
The SDK version is nothing to do with what version of macOS you are running. These SDKs are just folders containing headers and libraries used for compiling and linking against when building software. We use old SDKs so that our software works on a large range of macOS systems (i.e. old ones work too). |
Much appreciated @mingwandroid . Just to confirm: Undoing the process by deleting config file in |
In what sense do you mean 'using'? The env var is only ever queried by the anaconda MacOS compiler and linker. Outside of this the variable and the folder it points to are irrelevant. |
When you say the variable and folder it points to, you're specifically referring to the added lines in the config files? It's superfluous. But if I was to delete the added lines:
as well as the |
Problem: ContinuumIO/anaconda-issues#9096 For unclear reason, only the C compiler fails CMake's compiler tests. But since doctest is a header-only C++ library, we can just allow it to be built with miniconda3's toolchain on MacOSX under SDK>=10.14. This change can also reduce compiler testing time.
Problem: ContinuumIO/anaconda-issues#9096 For unclear reason, only the C compiler fails CMake's compiler tests. But since doctest is a header-only C++ library, we can just allow it to be built with miniconda3's toolchain on MacOSX under SDK>=10.14. This change can also reduce compiler testing time.
It would appear from that page that source code for 351.8 and a later version have now been released (since November 2018). |
I'm using Anaconda Navigator and I had these kind of problem while trying to install packages like "arules" inside Rstudio. I followed @ihnorton answer but I figured out that inside Rstudio CONDA_BUILD_SYSROOT env var was set to the original sdk, to override this you need to update .Rprofile like this:
After that you are good to go! |
When I try to compile a program with x86_64-apple-darwin13.4.0-clang (4.0.1 build 10), I get the following error,
I suspect this has something to do with Xcode 9.3 as I only started seeing this problem after upgrading to 9.3. In addition, things are working just fine on another machine with Xcode 9.0. I notice that the above unsupported file format seems to refer to
tapi-tbd-v3
.To reproduce the problem I simply try to compile the following,
with
and I get the above error. If I compile with clang (again 4.0.1) it compiles without error.
The text was updated successfully, but these errors were encountered: