-
Notifications
You must be signed in to change notification settings - Fork 18.1k
build: dyld: Symbol not found: _fdopendir$INODE64 on OS X 10.9 Mavericks #35269
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
Comments
According to https://github.com/golang/go/wiki/MinimumRequirements Go 1.13 only supports macOS 10.10 and higher. |
Yes. Why? |
Not everyone can run the latest versions of macOS for various reasons. I would like to know what is technically preventing the latest Go versions to work on older Mac OS X and OS X versions. |
You are correct: the decision to drop support for older macOS releases was not made for technical reasons. We have limited resources. We do not want to support releases for which we do not run builders. We do not want to run builders for releases that are not receiving security updates. So we chose to drop support. The only thing I know of that technically prevents the latest Go versions from running on old macOS versions is this issue that you have just filed. If you want to analyze this issue and find a fix and send in the fix, we would probably consider it if it is not too invasive. But we do not consider ourselves responsible for fixing the issue. We prefer to focus our limited resources on newer versions. We aren't even running the old systems that we would need to run to analyze and test any fix. Older versions of Go should continue to work fine on older versions of macOS. I'm sorry that this is likely not the answer you want to hear, but I think it is better to be realistic about what we can accomplish. |
Why? Wouldn't it be more reasonable to focus the limited resources on the oldest possible Mac OS X release and delegate the duty to keep things binary compatible to Apple (read: if they break compatibility, blame them)? |
Clearly Go must support current versions of the operating system. Evidence shows that each new macOS release requires adjustments by Go. For example, right now there are several bug reports for the Catalina release (#34935, #35177, #35247). We are going to have to investigate and fix those problems. It would be nice if we could say "oh, that's Apple's fault, ask them to fix it," but in reality that clearly won't work. Apple's interest in supporting programs that are not created by Apple approved toolchains is very small. We have to accommodate them. They are unlikely to accommodate us. Since we must spend time on macOS support, I think it is clearly better to spend that time on current macOS versions rather than old ones. |
Argh. In any case, https://github.com/macports/macports-legacy-support seems to add the missing |
I'm likely missing something but I don't see how the macports-legacy-support repo would help. That is for C programs, not Go programs. Have you tried downloading the source code for Go and building it yourself as described at https://golang.org/doc/install/source, instead of using the binary download? |
From looking at its description I was under the impression that macports-legacy-support contains implementations of some symbols that older Mac OS X, Mac OS, and macOS versions are lacking, in order to enable software built for later versions to run on earlier versions of the system. Hence I thought it might be a way to allow Go to run on earlier versions without having to be built on earlier versions (something the Go project wants to avoid due to the additional work). I have not tried to build Go myself on the Mac, since my use case is a bit different: I would like to build Go applications on Linux, and run them on OS X 10.9. |
Hi. Yes -- in MacPorts, one of our members, @Ionic , has been working with this with some success. https://github.com/macports/macports-ports/blob/52f3f71c33a430c6046efdddf9cce347ae2de3db/lang/go/Portfile#L68 . It currently does require a manual step to enable linking in the @Ionic has also been working on an enhanced version of this of late, https://trac.macports.org/ticket/58935 that we are / I am just trying to fully wrap my head around. But it is do-able, it appears. |
Yes, MP legacy support can be used to get go working again. Yes, MP legacy support is currently "broken" because it doesn't generate the needed symbols (for newer go versions). Yes, I have modified the build environment to generate them, based on architecture. No, I haven't made a PR for MP legacy support yet because I a.) am lazy, b.) was waiting for some review for obvious errors, though I guess there aren't any really and c.) was occupied with other things in the meantime. I guess that go is right in using the suffixed symbol versions, there doesn't seem to be a bug in go as such. It's just unfortunate that older OS X/macOS versions don't provide it. MP legacy support can naturally also be used outside of MacPorts (I do find the name a bit unfortunate, but I understand that it originated there), but even with a working go build, users of go will need to build their programs with special flags on older operating system versions to get a working binary (or one in the first place). |
This said, I consider this a hack to make go work on older platforms - not something that could be reasonably incorporated into go itself. The other point is that, if go actually needs the I do, however, see it as a working solution for downstream package systems, even though not fully automatic/transparent to end users. |
As a tiny bit of help, how would one add a link support/runtime library to a go build automatically? I assume go must have a list of libraries it links in to the build somewhere (and clearly I'm demonstrating my lack of go fu here). If we could have that -lLegacySupport library linked in without adding in an external step, that would be helpful. |
It's complicated. On macOS the imported library is the use of For that matter, if you want to patch your own system, you could just change |
The issue isn't the suffix. (Or to be more precise: the missing suffix is only an implementation issue in MacportsLegacySupport. That's a solved issue, I just need to follow up on that.) The issue is that the function is not provided on older Darwin versions at all. What Ken was asking for was a way to specify other external libraries to be linked to for all operations by go itself. My current workaround forces an external linker and passing custom external linker flags (essentially It was, however, the only way to do something like this I could find. Maybe there's a better way, though. One which works automatically, even after go was built/installed and particularly one that doesn't require an external linker. |
You could perhaps set the required flags in the Perhaps |
It could maybe be changed to fall back to the raw syscall version, like we do for old Go releases in |
I'm not advocating replacing the Using the raw syscall value would likewise not help us. If only it might only make things more complicated. I'm not sure if a syscall that is unknown to the kernel and C library could be resolved by a different library. Additionally, Yes, I know that I could pass ldflags via |
There is no way to add a required library, and there is no simple way of adding that functionality. As I suggested earlier in #35269 (comment), there is no list of libraries to link against. There is a list of specific symbols and the libraries from which they come. I'm inclined to close this issue since I don't think the Go team is going to take any action here. |
Makes a big difference for me personally: The difference is whether my 2007 Mac is a feasible system or a pile of junk. Because Apple stopped supporting it 4 or so macOS releases ago. Please be mindful of our environment and don't add to this kind of forced electronic waste. And wait, didn't Apple Marketing brag that macOS was fully UNIX 03-compliant? Apparently, Apple obtained UNIX 03 certification with OS X 10.5. So, if Go uses that, wouldn't it have to work? Apple can't just deprecate stuff at will. Is this certification worth anything or is it just a worthless piece of paper? |
That's not upstream's job, though. I can speak with both upstream and downstream hats on. Supporting legacy, unsupported (by their vendor), insecure operating systems with missing functionality is a pain for upstream developers. That's why downstream package management systems exist. They take upstream's base and modify it to work on their (and their user's) systems. This is also true for MacPorts, which patches software (like go) for such older systems on a voluntary(!) basis to also support legacy systems, if reasonably possible.
Yes, they went through the process. But neither the
The only thing Apple did deprecate was internal implementation details - and that's totally fine. Systems and specifications evolve over time.
That's unfortunate, but...
I guess I could try to patch this instead and pull in the support library. Would need to test this, but I figure that could be a lot more complicated then it initially sounds and downright impossible.
Honestly, sounds fine to me. |
go 1.15 and programs built with it run fine on OSX 10.9 Mavericks using the latest macports-legacy-support library and DYLD_INSERT_LIBRARIES: evanw/esbuild#81 (comment). It might work with older OS versions, but I haven't tried. |
Thanks for the heads-up @ksc, this is excellent to know. Are there any technical reasons that are preventing Go from working this way by default? I doubt many developers will go through the extra hassle to do extra steps, so a solution that would solve this "out of the box" for everyone would be ideal. |
@probonopd Working which way by default? I'm not sure I understand what the Go project could do here. (And, of course, bear in mind the earlier discussion on this issue; the Go project does not support macOS 10.9.) |
the simplest thing to do is probably to automatically wrap go binaries in a launch script that sets the proper environment variables. We already have a number of workarounds that work this way on MacPorts. If this is reliable enough to do generally, we'll open a PR for it, using one of our other similar workarounds as a template. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Uh oh!
There was an error while loading. Please reload this page.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?OS X 10.9.5 Build 13F34
What did you do?
Running OS X 10.9.5 Build 13F34, downloaded go1.13.3.darwin-amd64.tar.gz. Trying to run it
What did you expect to see?
Working go command
What did you see instead?
Before this is closed with "too old OS version": One of the main advantages of Go imho is that it is statically compiled and hence should run independent from the libraries shipped with the OS. Hence it would be highly appreciated if this could be made work, or at least explained why it is not possible.
It used to work in
What has changed to make this no longer work?
Could https://github.com/macports/macports-legacy-support be used to fix this, especially macports/macports-ports@abe46d0?
The text was updated successfully, but these errors were encountered: