Skip to content
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

gptfdisk: fix compile on Big Sur #66304

Closed

Conversation

mitchblank
Copy link
Contributor

  • Starting on 11.0, OS/X doesn't have physical files appearing as /usr/lib/*.dylib for the standard libraries, but the toolchain can still link against them (using the .tbd files inside the SDK to guide it) Just use-lncurses which seems to work.

Normally I would open an upstream PR first, but I'm having some issues with my long-unused Sourceforge account. (support ticket opened) I will ping the upstream dev though and will try to make sure this gets addressed in the next release. In the meantime I just put the tiny patch inline to the formula.

  • brew test wouldn't work for me. The first problem was that hdiutil doesn't seem capable of creating a 128k disk image any more, but the command works when I run it manually with a 512k size. However, it still doesn't work due to a permission issue when running inside brew test -- I think something changed in how the test sandboxing works so that hdiutil can no longer run. (hdiutil can need expanded permissions since it temporarily mounts the new image I think) I couldn't find a clean way to work around it so I just changed the test to use this package itself to make the test partition. A better test in some ways, a worse test in others.

  • Tweak the license info to make brew audit happy

* Starting on 11.0, OS/X doesn't have physical files appearing
  as /usr/lib/*.dylib for the standard libraries, but the toolchain
  can still link against them (using the .tbd files inside the SDK
  to guide it)  Just use "-lncurses" which seems to work.

* "brew test" wouldn't work for me.  The first problem was that
  hdiutil doesn't seem capable of creating a 128k disk image any more,
  but the command works when I run it manually with a 512k size.
  However, it still doesn't work due to a permission issue when
  running inside "brew test" -- I think something changed in how
  the test sandboxing works so that hdiutil can no longer run.
  (hdiutil can need expanded permissions since it temporarily
  mounts the new image I think)  I couldn't find a clean way
  to work around it so I just changed the test to use this package
  itself to make the test partition.  A better test in some ways,
  a worse test in others.

* Tweak the license info to make "brew audit" happy
Formula/gptfdisk.rb Outdated Show resolved Hide resolved
@carlocab
Copy link
Member

carlocab commented Dec 5, 2020

I was wondering where those *.dylibs went.

Formula/gptfdisk.rb Outdated Show resolved Hide resolved
@mitchblank
Copy link
Contributor Author

I was wondering where those *.dylibs went.

Yeah, it's weird. See some of the discussion here https://news.ycombinator.com/item?id=23612772

I guess the dyld cache just comes prepopulated with all of the base libraries and the *.tbd files in places like /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib just tell the linker how to find it. However if you dlopen() the non-existent path it's faked on the fly so that at runtime it still behaves the same as before.

@carlocab
Copy link
Member

carlocab commented Dec 5, 2020

I suspect a similar patch might fix a whole lot of Big Sur build failures actually. Nice find.

@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 6, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants