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

mktemp: illegal option -- p #6689

Closed
Kleidukos opened this issue Apr 10, 2020 · 8 comments
Closed

mktemp: illegal option -- p #6689

Kleidukos opened this issue Apr 10, 2020 · 8 comments

Comments

@Kleidukos
Copy link
Member

Kleidukos commented Apr 10, 2020

Describe the bug
I would appear that the bootstrap script contains some linuxisms.
One of which being that the -p option is passed to mktemp on the FreeBSD platform, whilst
its usage message states:

 usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
        mktemp [-d] [-q] [-u] -t prefix 

To Reproduce

ghcup -c compile cabal -v 3.2.0.0 -b $HOME/.ghcup/bin/ghc-8.6.3

Expected behavior
I expect it to work.

System information

  • uname -a: FreeBSD leto 12.1-RELEASE-p2 FreeBSD 12.1-RELEASE-p2 GENERIC amd6

cabal-bootstrap.log

@hasufell
Copy link
Member

It appears it is this https://github.com/haskell/cabal/blob/master/cabal-install/bootstrap.sh#L61

But it probably is not fatal. So we should maybe silence stderr for the first invocation? It wasn't clear whether this was a silent unhandled error or expected from the log.

@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

I made related issue #6700

I think it's ok that ghcup offer a way to compile cabal-install too, but OTOH bootstrap.sh is not meant (at least not maintained as) an official alternative method of installation.

@hasufell
Copy link
Member

hasufell commented Apr 12, 2020

@phadej yes, the new ghcup will allow compiling both ghc and cabal-install from source. It just invokes bootstrap.sh: https://github.com/hasufell/ghcup-hs/blob/master/lib/GHCup.hs#L653

How would you bootstrap it otherwise?

@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

I really don't know. By using existing cabal which you get from ~somewhere. Unfortunately we only occasionally get bindists for e.g. FreeBSD so this is an issue. (To compile GHC you need older ghc, so it's the same).

EDIT: If someone implements (and would assist maintaining) #6616 then we could get more bindists. That would be great.

Yet, to compile GHC using hadrian you need cabal-install or stack, so it is chicken and egg problem. I don't know what's the plan for hadrian with that...


By the way, when ghcup become a Haskell script?

@hasufell
Copy link
Member

Unfortunately we only occasionally get bindists for e.g. FreeBSD so this is an issue.

Yeah, this is tracked in https://gitlab.haskell.org/haskell/ghcup/issues/131#note_265002 too

By the way, when ghcup become a Haskell script?

I'm in the process of making the first release and have difficulties creating mac binaries (using travis for that currently, which is buggy) and testing them. So probably soon. The idea is for no one to notice :P

@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

Will you also provide binaries for say, FreeBSD? If you use gitlab.haskell.org infrastructure, could you comment on #6616 about how it looks for ghcup, so one doesn't need to cold start there.

@hasufell
Copy link
Member

Will you also provide binaries for say, FreeBSD?

Yes, I already have. I built dynamic FreeBSD binaries in a VM, fully static linux binaries via docker alpine and mac via travis infrastructure. It's a bit messy, but those were the quickest ways I could come up with. Travis is giving me the sh**s though.

I might look into gitlab CI soon too, I think.

@jneira
Copy link
Member

jneira commented May 5, 2022

bootstrap.sh does not exist anymore, so i am gonna close it optimistically, betting the new bootstrap.py does not suffer the issue 😄
feel free to reopen the issue ifthat is not the case

@jneira jneira closed this as completed May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants