Open rayxia opened 2 years ago
i had the same issue, also on M1
i had the same issue, also on M1
@whf881211 have you solved this issue?
nope. I'm going to try to build it on intel mac. That might be less problem.
nope. I'm going to try to build it on intel mac. That might be less problem.
@whf881211 I have tried to build it on intel, still failed.
I didn't face this exact issue while building the toolchain, I even managed to build it today on M1 with the utils/build-toolchain
script on commit 983e2f37d35
.
However, for a successful build, you still need a lot of hacks in scripts, starting from this hack here because of the line here (recent PR doesn't seem to help). There are other dirty tricks that I won't even show for the sake of sanity.
From other folks, I heard that running this script under rosetta helps as well, but still requires some tweaks. It's very sad to see that it's been years without a proper arm64 host support for building the toolchain, the situation with the compiler is better but still isn't perfect.
@edymtt I wonder if is it possible to add an arm64 host that builds the toolchain to ci.swift.org, it would make the life of a lot of devs on M1 macs much easier.
With regard to the original issue, this may be happening because one or more programs used/involved in the compilation are running under Rosetta -- I would suggest to check the python used to run build-script, the shell you are running on and the homebrew you are running (if any)
With regard to hitting issue with Intel as well, I would suggest to file a new issue and providing a log (or at least a snippet of the error message) to understand what may be going on there Comparing the local log with a successful run from https://ci.swift.org/job/oss-swift-package-macos/ may help as well.
@azarovalex I will check what we can do here (no promises, since I'm not responsible for the CI infrastructure)
Describe the bug I use
utils/build-toolchain com.custom
command to build the toolchain, and get the error says as following:As the error says, the reason is that when linking the swift-demangle.cpp.o, there is no symbols for arm64, and I notice there is another warning:
But the strenge thing is, I use
lipo -info libLLVMSupport.a
to check, its arch is x86_64.Environment