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

Proposal: only provide a pkg-config file on macOS #16

Open
pkgw opened this issue Jul 29, 2018 · 3 comments
Open

Proposal: only provide a pkg-config file on macOS #16

pkgw opened this issue Jul 29, 2018 · 3 comments

Comments

@pkgw
Copy link

pkgw commented Jul 29, 2018

Recent versions of macOS provide this library as part of libc. We have had several cases where the version of this library that we provide conflicts with the system definitions, breaking builds of other packages (example). So, maybe we should stop providing our own version of this library on macOS.

One reason that this package is helpful even on macOS, though, is that various Linux-centric depending packages expect there to be a pkg-config file libuuid.pc. MacOS doesn't provide this. Usually the absence of this file can be worked around by setting environment variables, but it's a bit of a hassle.

So, proposal: on macOS, don't provide the library at all; just provide a hand-coded pkg-config file with empty CFLAGS and LDFLAGS/LIBS settings, which I believe is enough to get things to build. (NB: there is no -luuid on macOS; the functions are just provided by its libc.)

Expected upsides: no more conflicting with a system library; we still get the advantages of the pkg-config file.

Foreseen downsides: every macOS package depending on this library needs to be rebuilt, since they link to a -luuid that will disappear if we stop providing the library. Possible problems if there are genuinely important differences between the C prototypes of our libuuid and the macOS system one.

Possible variation: on macOS, still provide a libuuid, but make it empty. Still provide a pkg-config file with empty CFLAGS and LIBS so that as depending packages are rebuilt, their links to -luuid gradually go away.

@ocefpaf
Copy link
Member

ocefpaf commented Jul 29, 2018

Foreseen downsides: every macOS package depending on this library needs to be rebuilt, since they link to a -luuid that will disappear if we stop providing the library. Possible problems if there are genuinely important differences between the C prototypes of our libuuid and the macOS system one.

We can find those packages and issue rebuild PRs with the bot.

cc.: @CJ-Wright and @justcalamari

@jakirkham
Copy link
Member

Have raised issue ( regro/cf-scripts#417 ) to add a migrator to address this.

@traversaro
Copy link

I am experiencing a related error in porting a codebase that is compiling fine on macOS with homebrew. If anyone is wondering why there is apparently no uuid.h conflict when using Homebrew, in that case the libuuid package install its header in ossp/uuid.h instead in uuid/uuid.h, see Homebrew/homebrew-core@fdb81d8 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants