Hi all,
I’m having some trouble compiling ACE from source on Mac OS. For context, there was a discussion at the DELPH-IN summit this summer about the maintenance/documentation of DELPH-IN tools and one of the priorities identified was being able to compile ACE from source. I’ve started working on this, and I was able to successfully compile ACE from source in an Ubuntu 20.04 Docker container, so it’s possible that the answer here is “Linux is good enough”.
As for my actual issue, I’m getting an error while trying to compile REPP:
isaac@Isaacs-MacBook-Pro repp-0.2.2 % make all
Making all in include
make[1]: Nothing to be done for `all'.
Making all in librepp
/bin/sh ../libtool --tag=CC --mode=compile /opt/homebrew/bin/gcc-16 -DPACKAGE_NAME=\"repp\" -DPACKAGE_TARNAME=\"repp\" -DPACKAGE_VERSION=\"0.2.2\" -DPACKAGE_STRING=\"repp\ 0.2.2\" -DPACKAGE_BUGREPORT=\"sweaglesw@sweaglesw.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"repp\" -DVERSION=\"0.2.2\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBBOOST_REGEX=1 -DHAVE_LOCALE_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC=1 -DHAVE_REALLOC=1 -DHAVE_BZERO=1 -DHAVE_REGCOMP=1 -DHAVE_SETLOCALE=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_STRRCHR=1 -I. -I /opt/homebrew/include -Wall -DVERSION=\"0.2.2\" -DPROG="\"repp\"" -I../include -g -O2 -MT load_repp.lo -MD -MP -MF .deps/load_repp.Tpo -c -o load_repp.lo load_repp.c
libtool: compile: /opt/homebrew/bin/gcc-16 -DPACKAGE_NAME=\"repp\" -DPACKAGE_TARNAME=\"repp\" -DPACKAGE_VERSION=\"0.2.2\" "-DPACKAGE_STRING=\"repp 0.2.2\"" -DPACKAGE_BUGREPORT=\"sweaglesw@sweaglesw.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"repp\" -DVERSION=\"0.2.2\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBBOOST_REGEX=1 -DHAVE_LOCALE_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC=1 -DHAVE_REALLOC=1 -DHAVE_BZERO=1 -DHAVE_REGCOMP=1 -DHAVE_SETLOCALE=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_STRRCHR=1 -I. -I /opt/homebrew/include -Wall -DVERSION=\"0.2.2\" -DPROG=\"repp\" -I../include -g -O2 -MT load_repp.lo -MD -MP -MF .deps/load_repp.Tpo -c load_repp.c -fno-common -DPIC -o .libs/load_repp.o
In file included from /opt/homebrew/include/boost/regex/config.hpp:66,
from /opt/homebrew/include/boost/cregex.hpp:23,
from /opt/homebrew/include/boost/regex.h:22,
from load_repp.c:8:
/opt/homebrew/include/boost/assert.hpp:32:1: error: unknown type name 'namespace'
32 | namespace boost
| ^~~~~~~~~
/opt/homebrew/include/boost/assert.hpp:33:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
33 | {
| ^
make[1]: *** [load_repp.lo] Error 1
make: *** [all-recursive] Error 1
My internet searching found that the error is coming from the fact that ‘namespace’ is a C++ (but not C) keyword, but I have not found a solution.
Other potentially relevant details:
- As the title says, I’m doing this on an M-series/Apple silicon Macbook
- When running ./configure, I’m using the flags
CC=/opt/homebrew/bin/gcc-16 LDFLAGS="-L /opt/homebrew/lib" CPPFLAGS="-I /opt/homebrew/include"to point to homebrew’s versions of gcc (since the default gcc is actually clang, as mentioned in other posts) and the Boost Regex library
@sweaglesw do you have any thoughts?
Thanks!