[Gauche-devel-jp] Mac OS Xでbuild失敗

Zurück zum Archiv-Index

Tatsuya BIZENN bizen****@arthu*****
2004年 9月 15日 (水) 11:10:16 JST


備前と申します。

Boehm-gcの6.3がインポートされたようですが、libgauche.dylibを作るところで、
以下のように失敗します。Mac OS X 10.3.5 です。

TARGETLIB=`pwd` ./link-dylib gcc -g -O2 -no-cpp-precomp -fPIC 
-fno-common  -L/usr/pkg/lib   -dynamiclib -o libgauche.dylib core.o 
vm.o compile.o macro.o error.o class.o boolean.o char.o string.o list.o 
port.o hash.o write.o read.o vector.o weak.o symbol.o keyword.o 
compare.o regexp.o signal.o parameter.o module.o proc.o number.o 
bignum.o load.o promise.o repl.o autoloads.o system.o stdlib.o extlib.o 
exclib.o syslib.o moplib.o ../gc/*.o -lm  -lpthread
ld: common symbols not allowed with MH_DYLIB output format with the 
-multi_module option
../gc/misc.o definition of common _GC_arrays (size 49268)
../gc/aix_irix_threads.o definition of common _GC_no_Irix_threads (size 
4)
../gc/os_dep.o definition of common _GC_page_size (size 4)
../gc/alloc.o definition of common _GC_start_time (size 4)
../gc/blacklst.o definition of common _GC_incomplete_normal_bl (size 4)
../gc/blacklst.o definition of common _GC_incomplete_stack_bl (size 4)
../gc/blacklst.o definition of common _GC_old_normal_bl (size 4)
../gc/blacklst.o definition of common _GC_old_stack_bl (size 4)
../gc/blacklst.o definition of common _GC_total_stack_black_listed 
(size 4)
../gc/dbg_mlc.o definition of common _GC_smashed (size 80)
../gc/mark.o definition of common _GC_mark_stack (size 4)
../gc/mark.o definition of common _GC_mark_stack_limit (size 4)
../gc/mark.o definition of common _GC_mark_stack_top (size 4)
../gc/gcj_mlc.o definition of common _GC_gcj_debug_kind (size 4)
../gc/gcj_mlc.o definition of common _GC_gcj_kind (size 4)
../gc/gcj_mlc.o definition of common _GC_gcjdebugobjfreelist (size 4)
../gc/gcj_mlc.o definition of common _GC_gcjobjfreelist (size 4)
../gc/headers.o definition of common _GC_invalid_header (size 4)
../gc/mark.o definition of common _GC_n_rescuing_pages (size 4)
../gc/misc.o definition of common _GC_high_water (size 4)
../gc/misc.o definition of common _GC_min_sp (size 4)
../gc/misc.o definition of common _GC_words_allocd_at_reset (size 4)
../gc/os_dep.o definition of common _GC_mprotect_state (size 4)
../gc/pthread_support.o definition of common _GC_threads (size 512)
../gc/reclaim.o definition of common _GC_leaked (size 160)
../gc/s/usr/bin/libtool: internal link edit command failed
olaris_pthreads.o definition of common _GC_no_sunOS_pthreads (size 4)
../gc/solaris_threads.o definition of common _GC_no_sunOS_threads (size 
4)
../gc/typd_mlc.o definition of common _GC_arobjfreelist (size 4)
../gc/typd_mlc.o definition of common _GC_array_kind (size 4)
../gc/typd_mlc.o definition of common _GC_array_mark_proc_index (size 4)
../gc/typd_mlc.o definition of common _GC_bm_table (size 64)
../gc/typd_mlc.o definition of common _GC_eobjfreelist (size 4)
../gc/typd_mlc.o definition of common _GC_explicit_kind (size 4)
../gc/typd_mlc.o definition of common _GC_ext_descriptors (size 4)
../gc/typd_mlc.o definition of common _GC_typed_mark_proc_index (size 4)
make[1]: *** [libgauche.dylib] Error 1

以下のようなパッチを当てればbuildでき、make checkもパスします。

Index: src/Makefile.in
===================================================================
RCS file: /cvsroot/gauche/Gauche/src/Makefile.in,v
retrieving revision 1.130
diff -u -r1.130 Makefile.in
--- src/Makefile.in	14 Sep 2004 08:44:32 -0000	1.130
+++ src/Makefile.in	15 Sep 2004 02:06:42 -0000
@@ -81,6 +81,8 @@
  SITE_ARCH_DIR         = $(GAUCHE_ARCH_DIR)/site/@GAUCHE_VERSION@/@host@
  ARCH = @host@

+LOBJEXT		= lo	
+
  INSTALL_HEADERS = gauche.h \
  	../gc/include/gc.h \
  	../gc/include/gc_config_macros.h \
@@ -136,7 +138,7 @@
  	$(LINK) $(gosh_LDFLAGS) -o gosh$(EXEEXT) $(gosh_OBJECTS) 
$(gosh_LDADD) $(LIBS)

  relink :
-	$(RELINK) $(libgauche_LDFLAGS) libgauche.$(SOEXT) 
$(libgauche_OBJECTS) ../gc/*.$(OBJEXT) $(LIBS)
+	$(RELINK) $(libgauche_LDFLAGS) libgauche.$(SOEXT) 
$(libgauche_OBJECTS) ../gc/*.$(LOBJEXT) $(LIBS)
  	$(RELINK) $(gosh_LDFLAGS) -o gosh$(EXEEXT)  $(gosh_OBJECTS) 
$(gosh_LDADD) $(LIBS)

  $(OBJECTS) : $(HEADERS)
@@ -160,7 +162,7 @@
  load.$(OBJEXT) : dl_dlopen.c dl_dummy.c dl_win.c dl_darwin.c

  libgauche.$(SOEXT) : $(libgauche_OBJECTS) $(GCLIB)
-	$(LINK) $(libgauche_LDFLAGS) libgauche.$(SOEXT) $(libgauche_OBJECTS) 
../gc/*.$(OBJEXT) $(LIBS)
+	$(LINK) $(libgauche_LDFLAGS) libgauche.$(SOEXT) $(libgauche_OBJECTS) 
../gc/*.$(LOBJEXT) $(LIBS)
  	$(POSTBUILD)

  gauche/arch.h :

ただ、他のプラットフォームに問題が出そうな気がします(検証してません)。

--
備前 達矢




Gauche-devel-jp メーリングリストの案内
Zurück zum Archiv-Index