-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
macOS builds linking against gettext in /usr/local/opt #91
Comments
Thanks for the report. You're completely correct that we shouldn't be depending on anything in It's interesting that liblzma is the list you've found in the official list; XZ is compiled as part of the support build process, and it should be that copy that is being linked - which suggests that there's some leakage in the configuration of the static modules. I made some changes to the build system for the most recent packages (3.7-b3), so it's possible I have messed up there. This also suggests that we should add that otool check as a validation to the build process. |
A bit of info I've found while digging: Here is the complete build log from March 30th: And here is from April 25th: gettext seems to be used by a bunch of homebrew stuff so I'm sure it was there before March 30th. |
The commit logs for the 3.7 branch don't show any changes between January 19 and last weekend (May 31) - and that's consistent with my own memory and timesheets. We've only recently added CI to our own builds, so I unfortunately can't confirm any historical build logs. I did some work on the 3.8 branch in early May, but that work wasn't committed until it became a part of last weekend's effort. Your hypothesis about gettext recently becoming non-keg-only definitely sounds plausible, though. It sounds like it might be advisable for us to remove /usr/local from $PATH as part of the build script, to avoid any possibility of homebrew tooling being picked up. |
This has now been resolved (albeit with a hack that working CI, but won't work locally - uninstalling gettext from the CI machine). A fix that removes /usr/local from the macOS build path would be preferable, but /usr/local appears to be hard-coded as part of the macOS build tooling. |
Thanks for the followup. I'm doing basically the same hacky thing in my own build scripts (temporarily uninstalling homebrew's gettext when building). In positive news, according to this it sounds like the plan for homebrew in the future is to only support installs at /opt/homebrew instead of /usr/local, so hopefully that'll make it easier to keep builds paths clean when desired. |
I was rebuilding everything today in the 3.7 branch to pick up latest changes and although all Python builds completed successfully I noticed that my App builds then started failing with a lot of 'Undefined symbol: _libintl_xxxx' errors.
I then rebuilt using the commit that I last used (3.7 commit bf1ed73 from January) and got the same errors, so it doesn't seem related to the recent commits here.
This is only happening on the Mac builds; iOS and tvOS seem to be fine. This is with macOS 10.15.5 and the Xcode 11.5 update from the other day.
Looking through build logs, it seems that Python config is finding libintl.h which is part of GNU gettext I believe and for me only exists in my homebrew setup in /usr/local. I'm also seeing lots of -I/usr/local/include in compile commands. I don't have any CFLAGS/etc stuff set as far as I'm aware.
If I run
nm build/macOS/libpython3.7m.a | grep -I libintl
I see quite a few undefined symbols mentioned, but doing the same thing on the one I built in January comes up empty.This seems to not just be my builds; If I grab the prebuilt macOS binary from https://briefcase-support.org/python?platform=macOS&version=3.7 and run
otool -L bin/python3
, I see:And if I temporarily rename /usr/local/Cellar, that binary fails to launch.
Any idea what would have changed here as compared to a few months ago? These Python builds shouldn't be looking at or depending on anything under /usr/local, right?..
The text was updated successfully, but these errors were encountered: