#8792 closed bug (fixed)

doc incorrect: Mac OS X does not supply lllvm i.e. opt and llc

Reported by: George Owned by:
Priority: normal Milestone: 7.8.1
Component: Documentation Version: 7.8.1-rc1
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Documentation bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description


Change History (15)

comment:1 Changed 15 months ago by George

From ghc-7.8.20140130/docs/users_guide/users_guide/code-generators.html#llvm-code-gen:

Clang and LLVM are both included with OS X by default from 10.6 onwards.

To install LLVM and Clang:

...
Mac OS X: LLVM and Clang are included by default from 10.6 and later.

Apple does not include LLVM (opt and llc are what is needed) by default. They needed to be installed by homebrew or an alternative system. We may want to document that llvm 3.4 is the preferred version.

Last edited 14 months ago by George (previous) (diff)

comment:2 Changed 15 months ago by George

  • difficulty changed from Unknown to Easy (less than 1 hour)

comment:3 Changed 14 months ago by schyler

I thought I'd throw in a note that something naive like "brew install llvm" doesn't actually install the command line tools llc/opt. I haven't actually figured out how to do so using brew.

comment:4 Changed 14 months ago by George

That's strange, brew install llvm does give me llc and opt. The point of my ticket is that Mac OS X does not supply them so the doc is wrong in that regards.

Last edited 14 months ago by George (previous) (diff)

comment:5 Changed 14 months ago by carter

@schyler: yes it dees install them. You just need to make sure you brew linked em and that the ghc settings file points to that version / name variant of the opt and LLC commands. I suspect you just didn't check that.

Ghc is not going to be bundled with llvm in the next year. If the ghc user can't install llvm on their machine, they shouldn't use it.

That said, Suggestion of the ticket is valid in premise but not in details. For example, ghc iOS needs llvm 3.0

George: where in the docs is the current information you're referring to?

comment:6 Changed 14 months ago by George

As I said in my first sentence doc location is ../ghc-7.8.20140130/docs/users_guide/users_guide/code-generators.html#llvm-code-gen, That is section 4.11.2. LLVM Code Generator.

I don't understand why the details are not valid, I don't talk about iOS just Mac OS X. The doc refers to OS X and is wrong wrt LLVM, correct? When I said llvm 3.4 is the preferred version I meant for MAC OS X and I believe for Windows and Linux which is what this section of the document refers to. I should have written I believe llvm 3.4 is the preferred version for Mac OS X ...

My subject "Apple does not supply ..." is not precise enough I will fix that. You are definitely right about that.

Additionally for Mac OS X it should mention that Clang is available from Apple not supplied by default, correct?

However you have a good point about llvm 3.0 being the preferred version for iOS. Thanks for bringing that up, definitely needs to be documented. Is the problem with 3.4 on the llvm side or the Haskell side?

Are there other OS that require an earlier version of llvm?

Last edited 14 months ago by George (previous) (diff)

comment:7 Changed 14 months ago by George

  • Summary changed from apple does not supply lllvm i.e. opt and llc to Mac OS X does not supply lllvm i.e. opt and llc

comment:8 follow-up: Changed 14 months ago by carter

You must install and have LLVM available on your PATH for the LLVM code generator to work. Specifically GHC needs to be able to call the optand llc tools. Secondly, if you are running Mac OS X with LLVM 3.0 or greater then you also need the Clang c compiler compiler available on your PATH. Clang and LLVM are both included with OS X by default from 10.6 onwards.

To install LLVM and Clang:

Linux: Use your package management tool.
Mac OS X: LLVM and Clang are included by default from 10.6 and later. For 10.5 you should install the Homebrew package manager for OS X. Alternatively you can download binaries for LLVM and Clang from here.
Windows: You should download binaries for LLVM and clang from here.

from http://www.haskell.org/ghc/docs/7.8.1-rc1/html/users_guide/code-generators.html#llvm-code-gen

ok, so the issue is that the direction for OS X are wrong.

It was hard to parse you ticket :)

comment:9 follow-up: Changed 14 months ago by carter

so we should more clearly say "clang is provided on recent OS X, but to use the LLVM backend, you will need to install LLVM, such as by having the homebrew package manager and invoking brew install llvm "

comment:10 in reply to: ↑ 8 Changed 14 months ago by George

Replying to carter:

You must install and have LLVM available on your PATH for the LLVM code generator to work. Specifically GHC needs to be able to call the optand llc tools. Secondly, if you are running Mac OS X with LLVM 3.0 or greater then you also need the Clang c compiler compiler available on your PATH. Clang and LLVM are both included with OS X by default from 10.6 onwards.

To install LLVM and Clang:

Linux: Use your package management tool.
Mac OS X: LLVM and Clang are included by default from 10.6 and later. For 10.5 you should install the Homebrew package manager for OS X. Alternatively you can download binaries for LLVM and Clang from here.
Windows: You should download binaries for LLVM and clang from here.

from http://www.haskell.org/ghc/docs/7.8.1-rc1/html/users_guide/code-generators.html#llvm-code-gen

ok, so the issue is that the direction for OS X are wrong.

It was hard to parse you ticket :)

Yes, sorry about that.

comment:11 in reply to: ↑ 9 Changed 14 months ago by George

Replying to carter:

so we should more clearly say "clang is provided on recent OS X, but to use the LLVM backend, you will need to install LLVM, such as by having the homebrew package manager and invoking brew install llvm "

Sounds good, thanks

comment:12 Changed 14 months ago by George

  • Summary changed from Mac OS X does not supply lllvm i.e. opt and llc to doc incorrect: Mac OS X does not supply lllvm i.e. opt and llc

comment:13 Changed 14 months ago by Austin Seipp <austin@…>

In 2b34947b60069e51abfcada9c45a6d7b590f5a2b/ghc:

Clear up docs regarding LLVM backend (#8792)

Signed-off-by: Austin Seipp <[email protected]>

comment:14 Changed 14 months ago by thoughtpolice

  • Status changed from new to merge

comment:15 Changed 14 months ago by thoughtpolice

  • Resolution set to fixed
  • Status changed from merge to closed
Note: See TracTickets for help on using tickets.