[m-rev.] diff: fix github issue #14

Julien Fischer jfischer at opturion.com
Wed Feb 19 12:55:06 AEDT 2014

The original bug report is at: https://github.com/Mercury-Language/mercury/issues/14

Branches: 14.01, master


Fix github issue #14.

Compilation of the Boehm GC was failing on 64-bit openSUSE 13.1 because that
system defines site specific settings for configure scripts and one of those
site specific settings is that when using a 64-bit C compiler, the value of
--libdir should default to ${exec_prefix}/lib64.  For the Boehm GC, this means
that libatomic_ops was being installed libatomic_ops-install/lib64 rather than
libatomic_ops-install/lib.  The top-level Boehm GC Makefile expects to find it
in the latter.

 	Explicitly set --libdir for libatomic_ops so that we override any
 	site specific settings for configure and libatomic_ops is "installed"
  	in the correct directory.


diff --git a/boehm_gc/build_atomic_ops.sh b/boehm_gc/build_atomic_ops.sh
index a986205..221ae4b 100755
--- a/boehm_gc/build_atomic_ops.sh
+++ b/boehm_gc/build_atomic_ops.sh
@@ -2,5 +2,7 @@
  cd libatomic_ops
  # Mercury-specific: allow additional arguments.
-./configure --prefix=$P "$@"
+# Mercury-specific: explicitly set --libdir to avoid some 64-bit Linux
+# systems installing in $P/lib64.
+./configure --prefix=$P --libdir=$P/lib "$@"
  $MAKE CC="$CC" AR="$AR" RANLIB="$RANLIB" install

More information about the reviews mailing list