pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/ruby32-base on Darwin, rbconfig.rb



* On 2023-07-17 at 21:23 BST, Louis Guillaume wrote:

The other flag was the "-Wl,--no-as-needed" seems to be present and ok with NetBSD, but the MacOS linker doesn't like it.

Removing these from rbconfig.rb allows the gems to build their extensions without issue.

I can't find any reference to these flags in the pkgsrc source nor in the mk files, so I don't know where they're being pulled in from to be able to patch them. Is this coming from upstream?

This is my fault. Many years ago I added a load of BUILDLINK_TRANSFORM removals to mk/platform/Darwin.mk and mk/platform/SunOS.mk to remove arguments that were not supported on those platforms, but that upstream software often hardcoded. In this case:

  mk/platform/Darwin.mk:BUILDLINK_TRANSFORM+=     rm:-Wl,--no-as-needed

This had the initial benefit of making a _lot_ of software suddenly build and work fine, however there are a small number of cases like this one where the upstream software tries to determine whether a flag is supported, and because we are removing it behind its back, it thinks it's fine and will add it to flags like ruby is doing here.

In a pkgsrc environment this isn't a problem, as the wrappers will still be used by dependencies and the flags will just get removed again, however it does mean that trying to build software outside of pkgsrc will end up with those flags being used and cause build failures.

I removed them from SunOS.mk a while back and instead went around fixing packages manually, and I should do the same with Darwin, though it would be great if folks could help out with fixing up software once that's done.

--
Jonathan Perkin   -   mnx.io   -   pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index