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

Add conf-libmd package. #25811

Merged
merged 2 commits into from
May 13, 2024
Merged

Add conf-libmd package. #25811

merged 2 commits into from
May 13, 2024

Conversation

dbuenzli
Copy link
Collaborator

@dbuenzli dbuenzli commented May 7, 2024

No description provided.

@dbuenzli
Copy link
Collaborator Author

dbuenzli commented May 7, 2024

Trying to fix opensuse and freebsd any idea where I can find a package list for oraclelinux ?

@hannesm
Copy link
Member

hannesm commented May 7, 2024

On FreeBSD, libmd is shipped as part of the base system -- you don't need to have external dependencies specified, just link with -lmd. The downside is there's no pkg-config file installed for libmd.

@dbuenzli
Copy link
Collaborator Author

dbuenzli commented May 7, 2024

Ok so it's rather going to be an unsupported platform :-) No need to complicate the life of devs. But I guess it works for the other bsds https://pkgsrc.se/devel/libmd

@hannesm
Copy link
Member

hannesm commented May 7, 2024

I'm not sure what your mileage is. From https://www.hadrons.org/software/libmd/: "This library provides message digest functions found on BSD systems either on their libc (NetBSD, OpenBSD) or libmd (FreeBSD, DragonflyBSD, macOS, Solaris) libraries and lacking on others like GNU systems."

As I read it, libmd is part of the libc in NetBSD and OpenBSD (so I wouldn't expect a port/package will need to be installed) -- I'm not sure whether pkg-config files are delivered in NetBSD and OpenBSD.

On FreeBSD (and DragonflyBSD) I attempted to explain it earlier. On macOS I suspect you've much more experience and know what is needed there.

Indeed, writing portable code using C libraries on different Linux/BSD platforms is a nightmare. Even with pkg-config - which exists in multiple implementations and versions that have all kinds of special behaviour - be warned.

If supporting 85% of users is sufficient for you, just stick to debian and macOS.

@dbuenzli
Copy link
Collaborator Author

dbuenzli commented May 7, 2024

So here is the status of this:

  1. I removed freebsd from the depext @hannesm can you perhaps convince your package manager to install pkg-config files for "standard" system libraries. It makes life easier for cross platform development.
  2. opensuse still seems to be failing but it seems to be the right depext name
  3. I have no idea where to get information about oraclelinux.

I'd say this is good enough for merging.

@dbuenzli
Copy link
Collaborator Author

dbuenzli commented May 7, 2024

If supporting 85% of users is sufficient for you, just stick to debian and macOS.

Everyone's time's limited if you are a minority platform then better provide a good environment for software to be delivered on it. For better or worse pkg-config is what we have for now to allow reasonable cross-platform dev in C and I'm not interested in writing conditional build logic for every operating system out there. Writing all these different package names in depexts is already ridiculous enough. Is it $LIB, $LIB-dev or $LIB-devel 😂 ?

@hannesm
Copy link
Member

hannesm commented May 7, 2024

Sorry to hear that you interpreted my comments that you should do some work. This is not the case - I mainly wanted to help out and avoid you spending time on "why does the FreeBSD CI not work with the proposed package and depext lines".

This library provides message digest functions found on BSD systems either on their libc (NetBSD, OpenBSD) or libmd (FreeBSD, DragonflyBSD, macOS, Solaris) libraries and lacking on others like GNU systems.

No, as you mention in another comment, "Everyone's time is limited". Why should I bother with this?

I'm not interested in writing conditional build logic for every operating system out there.

That's fine. Really.

Enjoy your evening, and please don't bother with the "minority platforms". It's not worth it.

@dbuenzli
Copy link
Collaborator Author

dbuenzli commented May 7, 2024

Enjoy your evening, and please don't bother with the "minority platforms". It's not worth it.

Please don't make it as if I didn't bother.

Why would I spend my time going over all these niche linux and bsd distributions to actually find if they named their package $LIB, $LIB-dev or $LIB-devel if I didn't ?

But when I see responses like yours I'm actually asking myself why I actually bother.

@jmid
Copy link
Contributor

jmid commented May 8, 2024

  1. I have no idea where to get information about oraclelinux.

I found a couple of Oracle package lists for the two repos available (BaseOS + AppStream) to the CI machines:

(not an Oracle user myself)

@hannesm
Copy link
Member

hannesm commented May 8, 2024

Daniel. sorry for my wording. My intention was not to claim that you do not bother. My intention was firstly to help, and secondly to explain some frustration I encountered with "platform-agnostic C libraries".

@dbuenzli
Copy link
Collaborator Author

dbuenzli commented May 8, 2024

@jmid thanks. I also found these lists. The package is not there but I was wondering if that was it.

@hannesm no problem. But I'm not sure understand your frustration. The APIs seems to be there on BSDs, IIUC a lot of linux distributions seem to have them adopted for their checksuming tools so they are there for grabs1. I'm not sure what it costs to these BSD systems to expose them via the the-facto C library manager (namely pkg-config) so that software can be easily brought to their platform; if that's something they are interested in (At which point I will certainly hear from these people just use autoconf to which it's going to be my turn to say: no :-). One thing we could do is to have .pc files in this package and install them in the opam switch for these platforms but then my feeling is that we would be solving the problem at the wrong place (and I suspect the opam maintainers wouldn't be that happy).

Footnotes

  1. It's not uncommon to simply vendor these hashing routines, something I also have done in the past. But I think it's better to treat these routines as maintained code rather than frozen code (most notably because I usually don't expect to tweak these routines myself).

@dbuenzli
Copy link
Collaborator Author

Ping. Is there anything more I need to get this merged ?

@mseri mseri merged commit 5c6ff97 into ocaml:master May 13, 2024
1 check was pending
@dbuenzli
Copy link
Collaborator Author

Thanks !

@dbuenzli dbuenzli deleted the add-conf-libmd branch May 13, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants