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

Improve INSTALL.md #1028

Merged
merged 5 commits into from
Apr 29, 2024
Merged

Improve INSTALL.md #1028

merged 5 commits into from
Apr 29, 2024

Conversation

gdt
Copy link
Collaborator

@gdt gdt commented Apr 27, 2024

This fixes up some previous changes, and makes some new improvements. I'd like to merge it if it makes things better and does no harm. I'm open to discussing other things to change, but if it's reasonable to merge this and discuss those separately, I always lean to keeping separable things separate.

gdt added 4 commits April 27, 2024 12:32
The basic issue is that on BSDs at least, "make" is not GNU make.
On Debian GNU/Linux, GNU make is available as gmake, and this seems
normal.  Thus, use "gmake" as the example invocation of gmake,
consistently.  Leave the mac text as "make", as this is the only known
platform where "gmake" won't work.
When editing earlier, I missed the C99 text (in the ocaml bullet).
Hoist that to its own bullet.  Drop the redundant non-ancient C.

Move sed to doc prerequisites.  Add install and rm as basic POSIX
tools - but maybe we should remove the entire bullet point.
Be clearer about PREFIX and DESTDIR.
Copy link
Contributor

@tleedjarv tleedjarv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just one nit about the macOS section.

INSTALL.md Outdated
Comment on lines 116 to 118
- Xcode Command Line Tools
- ocaml (see mostly-POSIX section)
- optional prereqs from gui and doc sections above
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message states that CLT is needed anyway, but is it fully correct? I don't use macOS myself, so don't know how it works, but even if most installations have CLT installed, couldn't you have gcc installed without any CLT? Maybe it's possible but just exceptionally rare... Either way, I'll leave the decision of CLT being optional or not to you but I'd also consolidate the bullets more (see suggestion below).

Suggested change
- Xcode Command Line Tools
- ocaml (see mostly-POSIX section)
- optional prereqs from gui and doc sections above
- Xcode Command Line Tools (optional, for the native GUI)
- See mostly-POSIX section (common prereqs and text UI, GTK GUI, docs)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The basic issue is that on macs, things traditionally present in Unix have been removed and put in CLT. It's basically an apple package of compiler and various other things. So you are right that it isn't strictly needed. However, the standard approach on a mac is to install either CLT or XCode to get the things you'd expect to be present for buidling programs. More recently, Apple has removed system headers (/usr/include) and building for the current system is sort of cross, but in a way you don't notice because it's the default. The headers for the native GUI are almost certainly in this category. But so are the regular posix headers; a mac running the latest macos does not have /usr/include at all, so even if you had a "C compiler", you still need "POSIX system headers". I see this as mac oddness, and don't really want to cross into pointing out that you need POSIX system headers on other systems, since it's bizarre to have a C99 compiler and lack them.

So I think I'll rewrite to say that a mac has basically the same prereqs as POSIX, but that as macs lack a C compiler and POSIX header files out of the box, the standard approach is to install CLT or Xcode. And that the mac GUI requires that one have the appropriate headers/libs, which CLT/Xcode provide.

I'm not really aware of a practice of using macs to build things by installing other compilers and not installing CLT. Basically installing CLT is what you have to do to make it a regular computer instead of an internet browsing appliance. For example, homebrew (a mac-specific package manager) says you need CLT or XCode.

Thus, in terms of being helpful for users, telling them they need CLT isn't wrong, but I could reword to say that CLT or XCode is the typical path to satisfying the prereqs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworded and pushed. Having written that, I feel that I don't want to go down the path of "but you could also install gcc and get headers from someplace else". People who are going to succeed at that don't need or expect help from Unison's INSTALL.md :-) Let me know what you think now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very informative. I'm fine with the change!

Explain that macOS is a subset of mostly-POSIX, but that it's odd in
that normal tools and /usr/include are missing, and that the standard
approach is to install CLT or Xcode.

More or less, I think that if someone has a mac on which they can
build other POSIXY programs, unison will build fine.  If other mac GUI
programs build, unison mac GUI should build also.  And if the mac is
not set up to build programs, it's not really about unison, so a
CLT/Xcode hint suffices.
@gdt gdt merged commit c7b411d into bcpierce00:master Apr 29, 2024
29 checks passed
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

Successfully merging this pull request may close these issues.

2 participants