I am on MacOS Mojave and I am trying to compile Flair.
I followed the instructions, but I am getting the following error when doing make -j4
inside the expanded flair directory:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:90,
from /opt/local/include/gcc9/c++/cwchar:44,
from /opt/local/include/gcc9/c++/bits/postypes.h:40,
from /opt/local/include/gcc9/c++/iosfwd:40,
from /opt/local/include/gcc9/c++/ios:38,
from /opt/local/include/gcc9/c++/ostream:38,
from ../math/bbox.h:12,
from ../geometry/gbody.h:12,
from ../geometry/gzone.h:15,
from ../geometry/vzone.h:12,
from ../geometry/ray.h:12,
from d3layer.h:12,
from d3layer.cc:11:
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.3.0/include-fixed/stdio.h:222:7: error: conflicting declaration of 'char* ctermid(char*)' with 'C' linkage
222 | char *ctermid(char *);
| ^~~~~~~
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/unistd.h:524,
from ../os.h:115,
from ../geometry/geo.h:12,
from ../geometry/ray.h:11,
from d3layer.h:12,
from d3layer.cc:11:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_ctermid.h:26:10: note: previous declaration with 'C++' linkage
26 | char *ctermid(char *);
| ^~~~~~~
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:90,
from /opt/local/include/gcc9/c++/cwchar:44,
from /opt/local/include/gcc9/c++/bits/postypes.h:40,
from /opt/local/include/gcc9/c++/iosfwd:40,
from /opt/local/include/gcc9/c++/ios:38,
from /opt/local/include/gcc9/c++/ostream:38,
from ../math/vector.h:14,
from bvh.h:16,
from bvh.cc:21:
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.3.0/include-fixed/stdio.h:222:7: error: conflicting declaration of 'char* ctermid(char*)' with 'C' linkage
222 | char *ctermid(char *);
| ^~~~~~~
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/unistd.h:524,
from ../os.h:115,
from geo.h:12,
from bvh.h:15,
from bvh.cc:21:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_ctermid.h:26:10: note: previous declaration with 'C++' linkage
26 | char *ctermid(char *);
| ^~~~~~~
c++ -MM -std=c++11 -I. -I.. plane.cc > plane.d
c++ -MM -std=c++11 -I. -I.. obbox.cc > obbox.d
c++ -MM -std=c++11 -I. -I.. matrix4.cc > matrix4.d
c++ -MM -std=c++11 -I. -I.. matrix3.cc > matrix3.d
c++ -MM -std=c++11 -I. -I.. matrix2.cc > matrix2.d
c++ -MM -std=c++11 -I. -I.. matrix.cc > matrix.d
c++ -MM -std=c++11 -I. -I.. histogram2d.cc > histogram2d.d
make[1]: *** [../rules.mk:252: bvh.o] Error 1
make[1]: Leaving directory '/Users/Stuart/Physics/fluka/flair-geoviewer-3.0/geometry'
make: *** [makefile:277: geometry/libgeometry.a] Error 2
make: *** Waiting for unfinished jobs....
c++ -c decorationlayer.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
c++ -MM -std=c++11 -I. -I.. histogram.cc > histogram.d
c++ -MM -std=c++11 -I. -I.. format.cc > format.d
c++ -MM -std=c++11 -I. -I.. conic.cc > conic.d
c++ -MM -std=c++11 -I. -I.. bmath.cc > bmath.d
c++ -MM -std=c++11 -I. -I.. bbox.cc > bbox.d
c++ -c bbox.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
make[1]: *** [../rules.mk:252: d3layer.o] Error 1
make[1]: *** Waiting for unfinished jobs....
c++ -c bmath.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
c++ -c palette.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
make[1]: Leaving directory '/Users/Stuart/Physics/fluka/flair-geoviewer-3.0/viewer'
make: *** [makefile:277: viewer/libviewer.a] Error 2
c++ -c svgexport.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
c++ -c viewport.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:90,
from /opt/local/include/gcc9/c++/cwchar:44,
from /opt/local/include/gcc9/c++/bits/postypes.h:40,
from /opt/local/include/gcc9/c++/iosfwd:40,
from /opt/local/include/gcc9/c++/ios:38,
from /opt/local/include/gcc9/c++/ostream:38,
from color.h:12,
from palette.cc:10:
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.3.0/include-fixed/stdio.h:222:7: error: conflicting declaration of 'char* ctermid(char*)' with 'C' linkage
222 | char *ctermid(char *);
| ^~~~~~~
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/unistd.h:524,
from ../os.h:115,
from palette.h:11,
from palette.cc:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_ctermid.h:26:10: note: previous declaration with 'C++' linkage
26 | char *ctermid(char *);
| ^~~~~~~
c++ -c conic.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
make[1]: *** [../rules.mk:252: palette.o] Error 1
make[1]: *** Waiting for unfinished jobs....
c++ -c format.cc -m64 -g -DDarwin -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -ftls-model=initial-exec -Wno-class-memaccess -fwrapv -fstack-protector -fstrict-aliasing -I. -I..
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:90,
from /opt/local/include/gcc9/c++/cwchar:44,
from /opt/local/include/gcc9/c++/bits/postypes.h:40,
from /opt/local/include/gcc9/c++/iosfwd:40,
from /opt/local/include/gcc9/c++/ios:38,
from /opt/local/include/gcc9/c++/ostream:38,
from /opt/local/include/gcc9/c++/iostream:39,
from format.h:12,
from format.cc:10:
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.3.0/include-fixed/stdio.h:222:7: error: conflicting declaration of 'char* ctermid(char*)' with 'C' linkage
222 | char *ctermid(char *);
| ^~~~~~~
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/unistd.h:524,
from ../os.h:115,
from format.cc:9:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_ctermid.h:26:10: note: previous declaration with 'C++' linkage
26 | char *ctermid(char *);
| ^~~~~~~
make[1]: *** [../rules.mk:252: format.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/Users/Stuart/Physics/fluka/flair-geoviewer-3.0/graph'
make: *** [makefile:277: graph/libgraph.a] Error 2
make[1]: Leaving directory '/Users/Stuart/Physics/fluka/flair-geoviewer-3.0/math'
make: *** [makefile:277: math/libmath.a] Error 2
It seems that the definition in GCC is somehow conflicting with the system version, but I don’t know how to fix this. Does anyone have experience with this? I don’t think it is related to the xorg-libxcb
and xorg-xcb-proto
versioning issue. I imagine someone else has seen this error. Anyone know? Thanks!