tinyrb icon indicating copy to clipboard operation
tinyrb copied to clipboard

Move GC to bdwgc

Open chenyukang opened this issue 10 years ago • 7 comments

Hi , I got segment fault in Mac OS X 10.8.4, and moving bdwgc fixed this. also tested this on Linux .

chenyukang avatar Aug 25 '13 07:08 chenyukang

Hey @chenyukang! Looks interesting.

What's the difference between bdwgc and libgc? It seems to be coming from the same project. Is it just a more recent version?

macournoyer avatar Aug 26 '13 16:08 macournoyer

Hi @macournoyer , Yes, I have a diff between the changeLog, the change log before 2008-05-03 in bdwgc is same with libgc, it should be a newer version with better portability.

chenyukang avatar Aug 27 '13 05:08 chenyukang

and bdwgc is depend on git://github.com/ivmai/libatomic_ops.git, FYI, http://www.hpl.hp.com/personal/Hans_Boehm/gc/

chenyukang avatar Aug 27 '13 05:08 chenyukang

I'm having trouble compiling on Mac OS X.

configure.ac:117: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:401: error: possibly undefined macro: AS_IF
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
./configure: line 15782: syntax error near unexpected token `ATOMIC_OPS,'
./configure: line 15782: `   PKG_CHECK_MODULES(ATOMIC_OPS, atomic_ops, ,'
make: *** [vendor/bdwgc/.libs/libgc.a] Error 2

Despite updating autoconf and such.

Did you use clang or gcc?

macournoyer avatar Aug 30 '13 16:08 macournoyer

maybe you haven't install pkg-config? according to http://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error

clang and gcc are both OK for me.

chenyukang avatar Aug 30 '13 17:08 chenyukang

Yes I got pkg-config and autoconf 2.69 like mentioned here: https://github.com/ivmai/bdwgc/issues/16

macournoyer avatar Aug 30 '13 18:08 macournoyer

the GC should just be removed from the source tree and the system-package-manager provided version used instead. boehm GC is a highly non-portable PoS (it invokes UB, installs signal handlers for segfaults, uses non-standard signals, tries to determine the start address of stack etc...) that needs a ton of fiddling around in its config.h to make it work on any slightly non-standard platform (i know this because i had to port it to my distro sabotage-linux, based on musl libc).

rofl0r avatar Jan 31 '18 04:01 rofl0r