[m-users.] (no subject)
Porco, Travis
Travis.Porco at ucsf.edu
Tue Feb 5 15:40:53 AEDT 2013
Dear Mercury experts:
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 mercury_agc_debug.o mercury_atomic_ops.o mercury_backjump.o mercury_bitmap.o mercury_bootstrap.o mercury_builtin_types.o mercury_construct.o mercury_context.o mercury_debug.o mercury_deconstruct.o mercury_deep_copy.o mercury_deep_profiling.o mercury_dlist.o mercury_dummy.o mercury_engine.o mercury_file.o mercury_float.o mercury_getopt.o mercury_getopt1.o mercury_grade.o mercury_hash_table.o mercury_heap_profile.o mercury_hgc.o mercury_ho_call.o mercury_label.o mercury_layout_util.o mercury_memory.o mercury_memory_handlers.o mercury_memory_zones.o mercury_minimal_model.o mercury_misc.o mercury_mm_own_stacks.o mercury_par_builtin.o mercury_prof.o mercury_profiling_builtin.o mercury_prof_mem.o mercury_prof_time.o mercury_region.o mercury_regs.o mercury_reg_workarounds.o mercury_runtime_util.o mercury_signal.o mercury_stacks.o mercury_stack_layout.o mercury_stack_trace.o mercury_stm.o mercury_string.o mercury_tabling.o mercury_term_size.o mercury_thread.o mercury_threadscope.o mercury_timing.o mercury_trace_base.o mercury_trace_term.o mercury_trail.o mercury_type_desc.o mercury_type_info.o mercury_type_tables.o mercury_wrapper.o mercury_wsdeque.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
...more...
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.
Finally, sudo make install terminted with an error:
cp `vpath_find mer_rt.init` /usr/local/mercury-11.07.2/lib/mercury/modules/hlc.gc
cp `vpath_find libmer_rt.a \
libmer_rt.dylib` \
/usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc
ranlib -c /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_accurate_gc.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_agc_debug.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_atomic_ops.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_bootstrap.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_deep_profiling.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_hgc.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_region.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_term_size.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_threadscope.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_trail.o) has no symbols
ranlib: file: /usr/local/mercury-11.07.2/lib/mercury/lib/hlc.gc/libmer_rt.a(mercury_wsdeque.o) has no symbols
../Mmake.common:470: warning: undefined variable `mer_std.mhs'
../Mmake.common:473: warning: undefined variable `mer_std.mhs'
../Mmake.common:479: warning: undefined variable `mer_std.os'
/tmp/mmake.Zhdxqm:987: warning: undefined variable `mer_std.trans_opts'
/tmp/mmake.Zhdxqm:991: warning: undefined variable `mer_std.ms'
/tmp/mmake.Zhdxqm:1000: warning: undefined variable `mer_std.ms'
/tmp/mmake.Zhdxqm:1020: warning: undefined variable `mer_std.os'
/tmp/mmake.Zhdxqm:1021: warning: undefined variable `mer_std.cs'
/tmp/mmake.Zhdxqm:1022: warning: undefined variable `mer_std.ss'
/tmp/mmake.Zhdxqm:1023: warning: undefined variable `mer_std.pic_ss'
/tmp/mmake.Zhdxqm:1024: warning: undefined variable `mer_std.ils'
/tmp/mmake.Zhdxqm:1025: warning: undefined variable `mer_std.javas'
/tmp/mmake.Zhdxqm:1205: warning: undefined variable `mer_std.os'
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
I've tried other variants, such as
./configure --with-cc=clang --disable-most-grades
./configure --with-cc="clang -m64"
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.
I switched to clang, since the README.MacOS states clearly:
=========================================================
IMPORTANT NOTE FOR FOR USERS OF MAC OS X 10.7 AND XCODE 4
=========================================================
The default C compiler provided in XCode 4 is llvm-gcc.
Mercury does NOT work with llvm-gcc. In order to build Mercury you will either
need to use one of the other C compilers available on the system, either GCC
4.2 or clang. With XCode 4 "gcc" is actually a symbolic link for llvm-gcc; the
GCC 4.2 executable is named "gcc-4.2".
Alternatively, the MacPorts project, <http://www.macports.org/>, provides more
recent versions of GCC for Mac OS X.
As llvm-gcc is no longer supported as of version 3.0 of LLVM, we have no
intention of ever supporting Mercury with it.
----
If anyone has any thoughts, I'd appreciate it! Sorry again to disturb you all, and I apologize in advance if I'm just too inexperienced or if I've missed something obvious.
--tcp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20130205/dc63d1f8/attachment.html>
More information about the users
mailing list