[m-users.] (no subject)

Julien Fischer jfischer at opturion.com
Thu Feb 7 01:11:45 AEDT 2013


Hi,

On Tue, Feb 5, 2013 at 3:40 PM, Porco, Travis <Travis.Porco at ucsf.edu> wrote:
>
> I must have overlooked something in trying to install Mercury compiler
> 11.07.2 on MacOSX 10.7.4 using XCode 4.5.2. I proceeded this way:
> ./configure --with-cc=clang
> make
> sudo make install
>
> The first two steps did not give an error, though during the long make the
> following happened along the way
> ar cr   \
>                 libmer_rt.a mercury.o mercury_accurate_gc.o

...

> /usr/bin/ranlib: file: libmer_rt.a(mercury.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_accurate_gc.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_agc_debug.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_atomic_ops.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_backjump.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_bootstrap.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_deep_profiling.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_hgc.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_region.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_term_size.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_threadscope.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_trail.o) has no symbols
> /usr/bin/ranlib: file: libmer_rt.a(mercury_wsdeque.o) has no symbols
> ranlib -c libmer_rt.a

That's harmless; in the compilation grade in question (none.gc) those object
files are supposed to be empty.  (Unforutnately ranlib on Mac OS X doesn't
appear to have an option to shut that warning up.)

...

> Then later:
> [redaction] ...11.07.2/install_grade_dir.hlc.gc/boehm_gc/../scripts/mgnuc
> --grade hlc.gc --no-ansi --no-check --no-mercury-stdlib-dir -I./include
> -I./libatomic_ops-install/include -DNO_EXECUTE_PERMISSION -DLARGE_CONFIG
> -fPIC -DMR_PIC   -DNO_DEBUGGING   -c -o dyn_load.o dyn_load.c
> dyn_load.c:1253:39: warning: incompatible pointer types passing 'void (const
> struct mach_header_64 *, intptr_t)' to parameter of type
>       'void (*)(const struct mach_header *, intptr_t)'
> [-Wincompatible-pointer-types]
>     _dyld_register_func_for_add_image(GC_dyld_image_add);
>                                       ^~~~~~~~~~~~~~~~~
> /usr/include/mach-o/dyld.h:61:54: note: passing argument to parameter 'func'
> here
> extern void _dyld_register_func_for_add_image(void (*func)(const struct
> mach_header* mh, intptr_t vmaddr_slide))
> __OSX_AVAILABLE_STARTING(__MAC_10_1, ...
>                                                      ^
> dyn_load.c:1254:42: warning: incompatible pointer types passing 'void (const
> struct mach_header_64 *, intptr_t)' to parameter of type
>       'void (*)(const struct mach_header *, intptr_t)'
> [-Wincompatible-pointer-types]
>     _dyld_register_func_for_remove_image(GC_dyld_image_remove);
>                                          ^~~~~~~~~~~~~~~~~~~~
> /usr/include/mach-o/dyld.h:62:57: note: passing argument to parameter 'func'
> here
> extern void _dyld_register_func_for_remove_image(void (*func)(const struct
> mach_header* mh, intptr_t vmaddr_slide))
> __OSX_AVAILABLE_STARTING(__MAC_10_1, ...
>                                                         ^
> 2 warnings generated.

That's normal when compiling the Boehm GC with clang.

...

>> mmc --generate-dependencies --grade hlc.gc      --mercury-linkage shared
> --flags LIB_FLAGS   --flags INTER_FLAGS
> -R/usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc
> -R/usr/local/mercury-11.07.2/lib/mercury/lib  --no-warn-nothing-exported
> --no-warn-unused-imports   mer_std
> make[2]: *** [mer_std.depend] Segmentation fault: 11
> To clean up from failed install, remove [redacted]
> /mercury-compiler-11.07.2/install_grade_dir.hlc.gc
> make[1]: *** [install_grades] Error 1
> make: *** [install] Error 2

The compiler built during the "make" step is broken.  Unfortunately, I
don't have access
to a machine running Mac OS X 10.7, so I am unable to reproduce this myself.
I have tried building and installing Mercury 11.07.2 from the source
distribution
on Mac OS X 10.8.2 (XCode 4.6, Apple clang version 4.1
(tags/Apple/clang-421.11.66)),
and it installs successfully.

> I've tried other variants, such as
> ./configure --with-cc=clang --disable-most-grades
> ./configure --with-cc="clang -m64"

Neither of those will make much difference -- indeed the second is equivalent to
./configure --with-cc=clang (-m64 is the default from Mac OS X 10.6 onwards).

> I'm afraid I'm a loss how to proceed. Has someone installed Mercury on
> Macintosh under similar configuration conditions? Perhaps I just overlooked
> something in the installation.

You don't appear to have missed anything, although I would need to see
a complete
log of the build to be sure.  The next thing I would try is using one of the
12.08-beta releases.  (That may make a difference, since 12.08 uses a newer
version of the Boehm collector.)  If possible, you might also want to try
using a newer version of clang.

Cheers,
Julien.



More information about the users mailing list