Re: #10170: Find versioned versions of LLVM tools

"GHC" <[email protected]>
Newsgroups gmane.comp.lang.haskell.glasgow.bugs
Message-ID <[email protected]>
#10170: Find versioned versions of LLVM tools
-------------------------------------+-------------------------------------
        Reporter:  erikd             |                Owner:  erikd
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler (LLVM)   |              Version:  7.11
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D745
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by jberryman):

 Hi, this seems to have regressed. Should I open a new ticket? I'd like for
 ghc to look for versioned llvm executables in the PATH and prefer those
 over the unversioned names (if they exist).

 If #10074 is stalled this change seems sufficient to me. As it stands
 using multiple ghc versions with fllvm side by side is pretty inconvenient
 (or else I haven't figured out the trick).

 {{{
 $ echo $PATH
 /home/me/Code/NOT_MY_CODE/spack/bin:/usr/lib/llvm-6.0/bin:/home/me/.cargo/bin:/usr/local/go/bin:/home/me/.rbenv/shims:/home/me/.rbenv/bin:/home/me/.play-2.2.2:/home/me/.node/bin:/usr/local/node/bin:/home/me/.local/bin:/home/me/.cabal/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/me/.gem/ruby/2.2.0/bin:/home/me/.go/bin
 $ which opt
 /usr/lib/llvm-6.0/bin/opt
 $ ghc --make -fforce-recomp -fllvm hello.hs -o hello_llvm
 [1 of 1] Compiling Main             ( hello.hs, hello.o )
 Linking hello_llvm ...
 $ export
 PATH=/home/me/.cargo/bin:/usr/local/go/bin:/home/me/.rbenv/shims:/home/me/.rbenv/bin:/home/me/.play-2.2.2:/home/me/.node/bin:/usr/local/node/bin:/home/me/.local/bin:/home/me/.cabal/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/me/.gem/ruby/2.2.0/bin:/home/me/.go/bin
 $ which opt
 opt not found
 $ which opt-6.0
 1 ↵
 /usr/bin/opt-6.0
 $ ghc --make -fforce-recomp -fllvm hello.hs -o hello_llvm
 [1 of 1] Compiling Main             ( hello.hs, hello.o )

 <no location info>: error:
     Warning: Couldn't figure out LLVM version!
              Make sure you have installed LLVM 6.0
 ghc: could not execute: opt
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10170#comment:19>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.