-
Notifications
You must be signed in to change notification settings - Fork 38
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
term-readkey-pm build failure with Xcode11 #461
Comments
Apple's new "hardened runtime entitlements" security apparently prevents a whole host of formerly allowed and commonly done and useful things that use "other than actual full paths to loadable objects". Apparently it also breaks @executable_path that for a while was promoted as allowing prefix-agnostic applications, DYLD env-var games (hello libtool/cmake!), and module-loading. |
Just to add, extutils-constant-pm also fails with a hardened error on 10.15/xcode11, but just during tests, not pkg building. |
|
For the record, I forced perl5184 on 10.15, symlinked perl5.18->perl5.18.4, and built term-readkey-pm5184 without any problems. Time to forgo system-perl on 10.15? It's probably going to be gone on 10.16 anyway. |
@nieder I started fink/fink#201 regarding replacing system-perl |
I'm stuck at this bug so I'm going to try a few things, one is maybe during build it can set and alias for perl5.18.4 ? Anyhow I'll report back since this is holding up my work and I have no choice since I can only run 10.15 now. |
alias failed, but maybe I'll spend more time understanding the actual issue, I assume it's in the perl binary it's self @neider you forced perl5184 but why the symlink? Also any chance or adding perl5184-core to fink so we 10.15 ppl can build it too? |
so really the issue is just using relative paths.
changing the |
Looks like 2 solutions that I can that are immediate.
I think 2 is best but I'm not that familiar with ExtUtils, so that would take me a little time, hoping someone with more exp with ExtUtils can chime in here. |
fixed upstream I'm going to locally update and test
The 10.15 installed version is 6.66, like really?? I updated the fink version to 7.38 but I can't figure out how to force it to be used over the system version :\ |
@TheSin-: I made the symlink because I wasn't 100% sure how Fink would deal with two version of perl-5.18.4 around. I know a lot of the internal Fink code looks for the executable To get perl5184-core on 10.15, I just edited dists/stable/main/finkinfo/languages/perl5184.info to have 10.15 in the |
Got it working, not pretty but works in PkgVersion.pm change
to
Obviously this type of fix could break other packages, it might be safer to do this inside the term-readkey-pm info file, but I'm going to test it in the PkgVersion.pm for a bit see how it goes. This does NOT fix tests, this likely needs to be done in the test module as far as I can see. |
Thank I got it working with my patch form above, I'm just fixing my debhelper now since my patches never accounted for multilevel base path ;) |
This is working for me now. |
Patching ExtUtils::Makemaker to use a full blib path would push a versioned BuildDepends on every perl package that uses ExtUtils::Makemaker. Then again, editing PkgVersion.pm would push a versioned Bdep on fink, so not much difference. Doing perl-pie inside term-readkey-pm.info would mean breaking up %{default_script} into its individual commands to squeeze the perl-pie in between Makefile generation and running make. I think it's better to edit PkgVersion.pm.
No idea how difficult it'll be to change $Curdir to become a full path vs just |
Fink is essential which means you wouldn’t need a version build dep on it since it doesn’t change the dev content and it would auto install. But makemaker would need one |
I think patching MakeMaker is the cleaner solution...put the workaround in the place where the apparent bug (or at least "the call that is now broken by apple's changes") is. Does this affect other packages besides term-readkey-pmXXX (like "all other -pmXXX that have compiled C code)? If so, we could have fink insert an implicit BDep:eu-mm-pmXXX on all packages that are [Package:*-pmXXX && Type:makemaker], so packages themselves wouldn't have to do anything special. |
it does affect others, but it's not all. I forget some of the others, I found it by patching term-readkey by hand and continue rather then patching fink. |
Aha!
|
Ugh. Almost. EU::MM tests then compare abs path from patched MM_Any.pm to reference relative path. |
Can someone else on 10.15 check the above version of EU-MM ? I had to zip it up because Github doesn't support uploading .info or .patch to an ticket. |
I only have 10.13, and occasionally 10.14. Github supports .txt, so maybe rename to .info.txt and so on? That's 100% differently annoying than zipping it all:) |
Also, current 10.15/pm5182 that use EU::MM often fail looking for EXTERN.h. I found this to be caused by applying the eu-mm-pm-sdk.patch file indiscriminately to all EU:MM variants on 10.14+. It should only be applied to the systemperl variant (pm5184 on 10.14.5 and 10.15). If we expand the conditionalizing to test for $darwin_vers AND %type_num[perl], then the four pm5182 perlmods I tested that previously failed on 10.15/pm5182 now build and test OK. |
extutils-makemaker-pm5184 works for me on 10.15.4. No errors with -Kk |
Fix how EU::MM calculates INST_ARCHLIB to deal with hardened system-perl on 10.15 Patch using rel2abs to force an absolute path for the variable. Fixes fink#461
The TermReadKey perl package fails to build due to a restriction apple added on dealing with .bundle files by their relative path name. This was diagnosed in 2019 by fink and I am adapting a workaround that @TheSin- proposed then: fink/fink-distributions#461 (comment) Also: - bump the sub-resources to their most recent versions while here - build failed until I added Devel::CheckLib too
The TermReadKey perl package fails to build due to a restriction apple added on dealing with .bundle files by their relative path name. This was diagnosed in 2019 by fink and I am adapting a workaround that @TheSin- proposed then: fink/fink-distributions#461 (comment) Also: - bump the sub-resources to their most recent versions while here - build failed until I added Devel::CheckLib too Closes #66699. Signed-off-by: chenrui <[email protected]> Signed-off-by: BrewTestBot <[email protected]>
On 10.15b7 with Xcode GM, term-readkey-pm fails with this error:
Looks like more 'security' from Apple.
@cschaffner
@dmacks
The text was updated successfully, but these errors were encountered: