ivmai / bdwgc

The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)
https://www.hboehm.info/gc/
Other
2.98k stars 407 forks source link

syntax error in configure #200

Closed rdp closed 6 years ago

rdp commented 6 years ago

FWIW If I do this:

git clone https://github.com/ivmai/bdwgc.git cd bdwgc git clone https://github.com/ivmai/libatomic_ops.git autoreconf -vif automake --add-missing ./configure

It says this:

... checking pkg-config is at least version 0.9.0... yes ./configure: line 18544: syntax error near unexpected token else' ./configure: line 18544:else' make: *** [config.status] Error 2

No amount of running pkg-config seems to overcome it.

Current work around:

make -f Makefile.direct and rename gc.a to libgc.a (except lacks pthread support)

(or download a versioned tar that already contains a built configure, use that instead [works with pthread support]).

This is CentOS 6.7 so might not be worth worrying about but thought I'd log it here for followers.

ivmai commented 6 years ago

Duplicates #69.

As documented in configure.ac: # Note: "syntax error near unexpected token ATOMIC_OPS" reported by configure # means Autotools pkg.m4 file was not found during aclocal.m4 generation; # in this case, most probably, you should run pkg-config once before running # autogen.sh (autoreconf); alternatively, comment out the following 3 lines. AS_IF([test x$missing_libatomic_ops = xtrue], [ PKG_CHECK_MODULES([ATOMIC_OPS], [atomic_ops], [ missing_libatomic_ops=false ], [ [] ]) ])

rdp commented 6 years ago

It's a bit tricky, given an error message on line 18542, one would dig in and find a code comment on 18364 and know it's what to do...also the 3 lines seem to have changed since then? Regardless, for followers, one thing you can do is edit configure and add a no-op line in there like echo 'heres the empty line'.

ivmai commented 6 years ago

Probably it's worth dropping these lines in configure.ac permanently (for master branch which does not need libatomic_ops on modern hosts). I'm checking it.