Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

make fail while copying libatomic_ops.a on x64 linux #14

develop7 opened this Issue Feb 17, 2014 · 2 comments


None yet
2 participants


  1. try to compile latest Mercury source release by running configure and then make inside directory with unpacked source

Expected: compilation succeeds.

What happens instead: after compiling libatomic_ops.a bundled with boehm_gc, make fails to copy it because libatomic_ops is installed in lib64 subdir, not lib. Here's how: https://gist.github.com/develop7/097e0cdf1e9b33fedab3

Replacing lib to lib64 at https://github.com/Mercury-Language/mercury/blob/master/boehm_gc/Makefile.direct#L307 fixes this issue.


  • make:
mercury-srcdist-14.01 ─╼  make --version
GNU Make 3.82
Built for x86_64-unknown-linux-gnu
  • cc:
mercury-srcdist-14.01 ─╼  cc --version
cc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]
Copyright (C) 2013 Free Software Foundation, Inc.
  • OS:
mercury-srcdist-14.01 ─╼  cat /etc/os-release
VERSION="13.1 (Bottle)"
PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)"

juliensf commented Feb 17, 2014

The issue here is that openSUSE seems to configure things so that the default value of libdir
ends with /lib64 if a 64-bit compiler is being used. (I think, but haven't yet checked, that this actually an issue with upstream Boehm.) The right fix for Mercury in the meantime is to change build_atomic_ops.sh to explicitly to invoke the configure script for libatomic-ops with --libdir=$P/lib.

@juliensf juliensf added a commit that referenced this issue Feb 19, 2014

@juliensf juliensf 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.

juliensf commented Feb 19, 2014

This has been fixed in 14.01-beta-2014-02-19.

@juliensf juliensf closed this Feb 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment