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

wrote manpage in c3c.1 and added manpage install to CMakeLists.txt #1581

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

goneal26
Copy link
Contributor

Addressing #1377

@lerno lerno merged commit 7f70145 into c3lang:master Oct 28, 2024
43 checks passed
@lerno
Copy link
Collaborator

lerno commented Oct 28, 2024

Thank you!

@bpo217
Copy link

bpo217 commented Nov 2, 2024

I think this actually broke the MacOS brew install --head. Copying a man page fails with operation not permitted and homebrew doesn't support sudo installs. I switched to the using brew install --head instead of compiling myself because of lld being moved into a separate package on homebrew and I couldn't find any info about setting an LLD cmake flag akin to the LLVM_DIR for compling on at the latest and it seemed easier but now the whole thing fails because of the man page sudo priviledges.

@bpo217
Copy link

bpo217 commented Nov 2, 2024

Maybe I should create a new issue for this and reference?

@lerno
Copy link
Collaborator

lerno commented Nov 2, 2024

We could place the man page in different pages on MacOS perhaps?

@goneal26
Copy link
Contributor Author

goneal26 commented Nov 2, 2024

I think this actually broke the MacOS brew install --head. Copying a man page fails with operation not permitted and homebrew doesn't support sudo installs. I switched to the using brew install --head instead of compiling myself because of lld being moved into a separate package on homebrew and I couldn't find any info about setting an LLD cmake flag akin to the LLVM_DIR for compling on at the latest and it seemed easier but now the whole thing fails because of the man page sudo priviledges.

I had a friend point out a similar issue with MacOS to me on their M2- brew had also installed their man pages directory to a different location, I think it was /opt/man/ instead of something like /usr/local/share/man/ so man c3c wouldn't work when compiling from source. I started working unofficially on a fix to account for this but I haven't been able to test it yet. Should the man pages be removed until the brew stuff is worked out?

@bpo217
Copy link

bpo217 commented Nov 3, 2024

We could place the man page in different pages on MacOS perhaps?

I agree with this as the first obvious solution and ran with it a bit. For completeness here is the failure I am referring to:
Screenshot 2024-11-03 at 08 50 00.

Here's homebrew being protective:
Screenshot 2024-11-03 at 09 22 54

Further investigation revealed this file: /private/etc/manpaths and it's contents are:

/usr/share/man
/usr/local/share/man

Another file is /private/etc/man.conf. This is a portion of it:

...
# Every automatically generated MANPATH includes these fields
#
MANPATH	/usr/share/man
MANPATH	/usr/local/share/man
MANPATH	/usr/X11/man
MANPATH	/Library/Apple/usr/share/man
#
# Uncomment if you want to include one of these by default
#
# MANPATH	/opt/*/man
# MANPATH	/usr/lib/*/man
# MANPATH	/usr/share/*/man
# MANPATH	/usr/kerberos/man
...

I think where it's going is the right place. One just needs sudo priviledges... which fails with homebrew... Which is confusing because surely some other tool in homebrew installs a man page? Apparently not? I mean all these dirs require sudo priviledges. I switched back to compile from source and then it's just a matter of copying the man page file really. So this will need to be some kind of informative message after installing c3c for the man page. The brew script would need to install the man page along side c3c in it's own opt folder and then display a message that in order to use the man page you have to copy or symlink it or something. What do we think about this?

@bpo217
Copy link

bpo217 commented Nov 3, 2024

Actually that X11 man page is probably not standard maybe brew installed that. I'll check it out.

@lerno
Copy link
Collaborator

lerno commented Nov 4, 2024

Does it work now after the patch?

@bpo217
Copy link

bpo217 commented Nov 4, 2024

Does it work now after the patch?

If you mean: does it work after this particular merge I am commenting on... The answer is I made the comment because the merge caused the break. The latest brew install c3c --HEAD fails. Unless you are referring to a newer one.

@bpo217
Copy link

bpo217 commented Nov 4, 2024

Looks like there was a new patch which fixed it today! Coolio.

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.

3 participants