Created attachment 318746 [details] emerge fail log =dev-scheme/guile-1.8.8-r1 fails to build with clang-3.1-r4
With clang-3.3 and guile-1.8.8-r1: ./guile_filter_doc_snarfage --filter-snarfage) > regex-posix.doc || { rm regex-posix.doc; false; } cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc continuations.doc debug.doc deprecation.doc deprecated.doc discouraged.doc dynl.doc dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc extensions.doc feature.doc fluids.doc fports.doc futures.doc gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc properties.doc random.doc rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc srfi-13.doc srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc socket.doc regex-posix.doc | GUILE="/var/tmp/portage/dev-scheme/guile-1.8.8-r1/work/guile-1.8.8/pre-inst-guile" ../scripts/snarf-check-and-output-texi > guile-procedures.texi || { rm guile-procedures.texi; false; } ERROR: In procedure apply: ERROR: Wrong type argument in position 1: #<freed cell 0x7f3087aecd70; GC missed a reference> Makefile:2549: recipe for target 'guile-procedures.texi' failed make[3]: *** [guile-procedures.texi] Error 1
there are some freebsd patches here http://svnweb.freebsd.org/ports/head/lang/guile/files/ but I cannot figure out which one is a fix (if any)
From the FreeBSD patches (#2): This is a three-part for building guile with clang (or with any other modern compiler): 1) Use -fwrap in CFLAGS, since guile depends on integer overflows. 2) Fix grep + sed logic in guile-snarf.in to be compatible with the output of clang's preprocessor. This is achieved by adding additional newlines before the ^^ delimiters, which guile-snarf depends on. 3) Similarly, in c-tokenize.c, clang's preprocessor outputs EOLs and hash marks in different places, confusing the lexer. Simply don't output them to fix the problem. While here strip binaries and libraries. Submitted by: dim@ - Looks like the changes needed are from this revision [http://svnweb.freebsd.org/ports?view=revision&sortby=rev&revision=352517] - includes two patch files, and a change to the Makefile to include -fwrapv into the CFLAGS.
FWIW, 2.0.0 was fixed for clang by https://github.com/gentoo/gentoo/commit/d3bce60414f651b5044d8276ad9c3e3f5afe9e15 1.8.8 is still broken though. Really, it should be deprecated, that's bug 587252.
(In reply to Austin English from comment #4) > FWIW, 2.0.0 was fixed for clang by > https://github.com/gentoo/gentoo/commit/ > d3bce60414f651b5044d8276ad9c3e3f5afe9e15 > > 1.8.8 is still broken though. Really, it should be deprecated, that's bug > 587252. However problem is that guile-2.0.0 is still broken.
dev-scheme/guile-2.2.7-r1 compiles correctly with: env file: CFLAGS="${CFLAGS} -flto=thin" CXXFLAGS="${CXXFLAGS} -flto=thin" # -O2 in LDFLAGS refers to binary size optimization during linking, it is NOT related to the -O levels of the compiler LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed" CC="clang" CXX="clang++" AR="llvm-ar" NM="llvm-nm" RANLIB="llvm-ranlib" clang version 18.1.2 Besides, this is old. I am sure that whatever reason why this did not work 12 years ago is irrelevant at this point. I suggest closing this one and if users have the same symptom, open a new bug.