Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#10234 closed bug (fixed)

armhf : Validate fails during bindisttest configure

Reported by: erikd Owned by:
Priority: normal Milestone: 8.0.1
Component: Build System Version: 7.11
Keywords: llvm Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D828
Wiki Page:


The failure is:

/usr/bin/install -c -m 644  libraries/prologue.txt "/home/erikd/ghc-git/bindisttest/install   dir/share/doc/ghc/html/libraries/"
/usr/bin/install -c -m 755  libraries/gen_contents_index "/home/erikd/ghc-git/bindisttest/install   dir/share/doc/ghc/html/libraries/"
bindisttest/"install   dir"/bin/runghc bindisttest/HelloWorld > bindisttest/output
diff -U 1 bindisttest/output bindisttest/expected_output
bindisttest/"install   dir"/bin/ghc --make bindisttest/HelloWorld
[1 of 1] Compiling Main             ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o )

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

Since this is armhf, this was built with llvm, and the configure process found the correct versions of the llvm tools; ie /usr/bin/llc-3.6 and /usr/bin/opt-3.6. Furthermore, file inplace/lib/settings file specifies the correct versions.

However, file bindisttest/install dir/lib/ghc-7.11.20150402/settings file just uses llc and opt which don't actually exist.

Attachments (1)

0001-configure-LLVM-and-LD-detection-improvements-10234.patch (7.7 KB) - added by erikd 3 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 3 years ago by erikd

The configure script in bindistprep/ghc-7.11.20150402 contains:

    if test -z "$LlcCmd"
    if test -z "$OptCmd"

and niether LlcCmd not OptCmd variables are set anywhere. Obviously, that is no longer sufficient.

comment:2 Changed 3 years ago by erikd

It seems the distribution tarball has its own configure script (generated from distrib/ which needs to be updated to include some of the configure magic in the top level

comment:3 Changed 3 years ago by erikd

Owner: set to erikd

Currently testing a patch for this.

comment:4 Changed 3 years ago by erikd

Summary: Validate fails on armhfarmhf : Validate fails during bindisttest configure

comment:5 Changed 3 years ago by erikd

Differential Rev(s): ​Phab:D828

The patch in ​Phab:828 validates fine (ie successfully builds the binary-dist) on both amd64-linux and armhf-linux.

comment:6 Changed 3 years ago by Erik de Castro Lopo <erikd@…>

In 485dba86d2519cc4855e01db279e127d0221f88a/ghc:

configure : LLVM and LD detections improvements (#10234).

* distrib/ : Detect correct version of LLVM tools as
  was done for the top level in 42448e3757.
* aclocal.m4 : Add a FIND_LD macro that can be used in both
  configure scripts.
* Use new FIND_LD macro in both configure scripts.

Signed-off-by: Erik de Castro Lopo <>

Test Plan: validate on amd64-linux and armhf-linux.

Reviewers: rwbarton, austin

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #10234

comment:7 Changed 3 years ago by erikd

This exact patch should not be pulled into the 7.10 branch, but it might make sense to pull in a 7.10 specific version of this patch. Specifically, a version of this patch that requires the llvm-3.4 versions of llc and opt.

@rwbarton, is this a good idea?

comment:8 Changed 3 years ago by rwbarton

Status: newmerge

I think you mean 3.5, not 3.4. But yes, then the bindist will automatically do the right thing on systems like mine (llc-3.4 and llc-3.5 both installed, with llc being a symlink to llc-3.4).

comment:9 Changed 3 years ago by erikd

Owner: erikd deleted
Status: mergenew

@rwbarton Are you sure about 3.5 working? I seem to remember an issue about def$... symbols. On the other hand, I know 3.4 works with 7.10.

Also this patch alone is insufficient (it also needs 42448e3757f257) and a change to chose a version of llvm other than 3.6. Working on modified versions of these two patches.

comment:10 Changed 3 years ago by erikd

On amd64-linux building from the ghc-7.10 git branch, there are two llvm backend related validation errors with llvm 3.4 and none with llvm-3.5.

The build on armhf-linux is still in progress.

comment:11 Changed 3 years ago by erikd

Status: newpatch

The attached patch:

commit 8a11eec3a6c8d82f4f12a00e6a64f0916cf3575f
Author: Erik de Castro Lopo <>
Date:   Mon Apr 13 09:16:54 2015 +1000

    configure : LLVM and LD detection improvements (#10234).
    This is the ghc-7.10 branch specific version of commits 42448e3757 and
    485dba86d2 in git HEAD. The main difference is that for 7.10 we need
    llvm version 3.5 whereas git HEAD currently needs version 3.6.
    Signed-off-by: Erik de Castro Lopo <>

applies to the ghc-7.10 branch. It has been validated on amd64-linux. Validation failed on armhf-linux but I think that is un-related to this patch (see #10292).

comment:12 Changed 3 years ago by erikd

Status: patchmerge

Since commit 42448e3757f257 has already been cherry-picked into the ghc-7.10 branch, commit 485dba86d2519cc from git HEAD should also go in.

comment:13 Changed 3 years ago by erikd

Unfortunately, the patch referenced in comment 11 no longer applies. Currently working on a updated version of that patch.

comment:14 Changed 3 years ago by erikd

Resolution: fixed
Status: mergeclosed

This was fixed for the ghc-7.10 branch in commit:

commit 99e4e26a2672f7697cf1f76306c3dfb63125e035
Author: Erik de Castro Lopo <>
Date:   Sat Apr 25 08:14:48 2015 +0200

    configure: LLVM and LD detection improvements (#10329)
    The ghc-7.10 branch *only* works with llvm-3.5.
    This commit is basically the ghc-7.10 branch version of
    485dba86d2 in the master branch.
    Signed-off-by: Erik de Castro Lopo <>
    Differential Revision:

comment:15 Changed 3 years ago by thoughtpolice


Milestone renamed

Note: See TracTickets for help on using tickets.