Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move GC to bdwgc #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

chenyukang
Copy link

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

@macournoyer
Copy link
Owner

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?

@chenyukang
Copy link
Author

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
Copy link
Author

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

@macournoyer
Copy link
Owner

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?

@chenyukang
Copy link
Author

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.

@macournoyer
Copy link
Owner

Yes I got pkg-config and autoconf 2.69 like mentioned here: ivmai/bdwgc#16

@rofl0r
Copy link

rofl0r commented Jan 31, 2018

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 referenced this pull request in rofl0r/tinyrb Jan 31, 2018
boehm GC is a highly problematic package, since what it tries to achieve
is not possible in standard C, so it must use all kinds of nasty
platform-specific tricks to get start offset of stack and so on.

for this reason, some or most distributions apply custom settings
or even patches to make it work.

these tweaks are not available when embedding the source of boehm into
the tree and hoping that it will turn out to work well...

windows users are advised to install the version provided by mingw
package manager, while mac os users can use homebrew's version.

closes #6
closes #9
closes #4
rofl0r referenced this pull request in rofl0r/tinyrb Jan 31, 2018
boehm GC is a highly problematic package, since what it tries to achieve
is not possible in standard C, so it must use all kinds of nasty
platform-specific tricks to get start offset of stack and so on.

for this reason, some or most distributions apply custom settings
or even patches to make it work.

these tweaks are not available when embedding the source of boehm into
the tree and hoping that it will turn out to work well...

windows users are advised to install the version provided by mingw
package manager, while mac os users can use homebrew's version.

closes #6
closes #9
closes #4
rofl0r referenced this pull request in rofl0r/tinyrb Jan 31, 2018
boehm GC is a highly problematic package, since what it tries to achieve
is not possible in standard C, so it must use all kinds of nasty
platform-specific tricks to get start offset of stack and so on.

for this reason, some or most distributions apply custom settings
or even patches to make it work.

these tweaks are not available when embedding the source of boehm into
the tree and hoping that it will turn out to work well...

windows users are advised to install the version provided by mingw
package manager, while mac os users can use homebrew's version.

closes #6
closes #9
closes #4
rofl0r referenced this pull request in rofl0r/tinyrb Jan 31, 2018
boehm GC is a highly problematic package, since what it tries to achieve
is not possible in standard C, so it must use all kinds of nasty
platform-specific tricks to get start offset of stack and so on.

for this reason, some or most distributions apply custom settings
or even patches to make it work.

these tweaks are not available when embedding the source of boehm into
the tree and hoping that it will turn out to work well...

windows users are advised to install the version provided by mingw
package manager, while mac os users can use homebrew's version.

closes #6
closes #9
closes #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants