Flair 3.4 on Mac Sonoma 14.7.4

Dear Flair team,
My attempt to install flair 3.4 on Mac Sonoma was met with errors, the beginning of which is like this.

/opt/local/lib/gcc13/gcc/aarch64-apple-darwin23/13.3.0/include-fixed/stdio.h:83:8: error: 'FILE' does not name a type
   83 | extern FILE *__stdinp;
      |        ^~~~
/opt/local/lib/gcc13/gcc/aarch64-apple-darwin23/13.3.0/include-fixed/stdio.h:81:1: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
   80 | #include <sys/_types/_seek_set.h>
  +++ |+#include <cstdio>
   81 |

The full list is attached, along with the port echo installed.
I probabaly messed up something because the flair beta version (3.x.3.4) that I succesfully installed previously doesn’t compile now.
Many thanks for all the help.
Sunil

make_err_log.txt (71.1 KB)
port_echo_installed.txt (17.3 KB)

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables                    
xcodebuild -version
package-id: com.apple.pkg.CLTools_Executables
version: 16.2.0.0.1.1733547573
volume: /
location: /
install-time: 1733968623
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
sunil@sunilmac ~ %


sunil@sunilmac ~ % which g++ gcc gfortran ar
/opt/local/bin/g++
/opt/local/bin/gcc
/opt/local/bin/gfortran
/opt/local/bin/ar

sunil@sunilmac ~ % which python
/opt/local/bin/python

sunil@sunilmac ~ % which python3
/opt/local/bin/python3

sunil@sunilmac ~ % port select --list python3                                              
Available versions for python3:
	none
	python311
	python312
	python313
	python39 (active)

sunil@sunilmac ~ % port select --list gcc    
Available versions for gcc:
	mp-gcc12 (active)
	mp-gcc13
	none

sunil@sunilmac ~ % g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/aarch64-apple-darwin23/12.4.0/lto-wrapper
Target: aarch64-apple-darwin23
Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc12/gcc12/work/gcc-12.4.0/configure --prefix=/opt/local --build=aarch64-apple-darwin23 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc12 --includedir=/opt/local/include/gcc12 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-12 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-12 --with-gxx-include-dir=/opt/local/include/gcc12/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld-classic --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --disable-tls --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc12/libc++/include/c++/v1 --with-pkgversion='MacPorts gcc12 12.4.0_1+stdlib_flag' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.4.0 (MacPorts gcc12 12.4.0_1+stdlib_flag)


sunil@sunilmac ~ % port echo requested
gawk                           @5.3.0_0 
gawk                           @5.3.1_0 
gcc12                          @12.3.0_4+stdlib_flag 
gcc12                          @12.4.0_1+stdlib_flag 
gcc13                          @13.3.0_2+stdlib_flag 
gdb                            @13.2_0 
gdb                            @15.1_0 
ghostscript                    @10.03.0_0+x11 
ghostscript                    @10.04.0_0+x11 
gnuplot                        @5.4.8_0+aquaterm+luaterm+pangocairo+wxwidgets+x11 
gnuplot                        @6.0.2_0+aquaterm+luaterm+pangocairo+qt5+wxwidgets 
pkgconfig                      @0.29.2_0 
py39-matplotlib                @3.8.4_0+cairo+webagg 
py39-numpy                     @1.26.4_0+gfortran 
py39-Pillow                    @9.5.0_1 
py39-python-install            @0.0.3_6 
py39-tkinter                   @3.9.19_0 
py311-matplotlib               @3.10.1_0+cairo 
py311-numpy                    @1.26.4_3+accelerate+gfortran 
py311-Pillow                   @9.5.0_1 
py311-tkinter                  @3.11.11_0 
tk                             @8.6.16_0+x11 
watch                          @4.0.0_1 
xterm                          @388_0 
zsh-syntax-highlighting        @0.8.0_0 
sunil@sunilmac ~ %

sunil@sunilmac ~ % port select --summary
Name       Selected   Options
====       ========   =======
clang      none       mp-clang-17 mp-clang-19 none
cython     none       cython39 none
fonttools  none       fonttools-311 fonttools-39 none
gcc        mp-gcc12   mp-gcc12 mp-gcc13 none
llvm       none       mp-llvm-17 mp-llvm-19 none
pygments   none       py311-pygments py312-pygments none
python     python312  python311 python312 python313 python39 none
python3    python39   python311 python312 python313 python39 none
wxWidgets  none       wxWidgets-3.0 none
sunil@sunilmac ~ %

sunil@sunilmac ~ % c++ -v
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Dear @sunil ,

Have you had a chance to look at the this post ?

Best regards, Luigi

Dear Luigi
I think I did, but I tried again and got this.

sunil@sunilmac geoviewer % make
g++ -MM -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include viewerobject.cc > viewerobject.d
g++ -MM -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include pyutils.cc > pyutils.d
g++ -MM -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include gobject.cc > gobject.d
g++ -MM -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include gmesh.cc > gmesh.d
g++ -MM -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include geoviewer.cc > geoviewer.d
g++ -MM -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I/opt/local/include geometryobject.cc > geometryobject.d
/Library/Developer/CommandLineTools/usr/bin/make -C viewer
g++ -MM -std=c++11 -I. -I.. voxellayer.cc > voxellayer.d
g++ -MM -std=c++11 -I. -I.. viewer.cc > viewer.d
g++ -MM -std=c++11 -I. -I.. usrbinlayer.cc > usrbinlayer.d
g++ -MM -std=c++11 -I. -I.. userdumplayer.cc > userdumplayer.d
g++ -MM -std=c++11 -I. -I.. palettelayer.cc > palettelayer.d
g++ -MM -std=c++11 -I. -I.. nox.cc > nox.d
g++ -MM -std=c++11 -I. -I.. layer.cc > layer.d
g++ -MM -std=c++11 -I. -I.. latticelayer.cc > latticelayer.d
g++ -MM -std=c++11 -I. -I.. imagelayer.cc > imagelayer.d
g++ -MM -std=c++11 -I. -I.. exportlayer.cc > exportlayer.d
g++ -MM -std=c++11 -I. -I.. decorationlayer.cc > decorationlayer.d
g++ -MM -std=c++11 -I. -I.. d3layer.cc > d3layer.d
g++ -MM -std=c++11 -I. -I.. d2layer.cc > d2layer.d
g++ -c d2layer.cc -m64 -g -DDarwin -std=c++11 -O3 -funroll-loops -fno-math-errno -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD  -pedantic -W -Wall -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wshadow -Wno-write-strings -Wcast-align -Wredundant-decls -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -Wno-class-memaccess -fwrapv -fstack-protector -Wno-vla -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fstrict-aliasing -I. -I..
clang: error: no input files
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_wchar.h:90,
                 from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:67,
                 from /opt/local/include/gcc12/c++/cwchar:44,
                 from /opt/local/include/gcc12/c++/bits/postypes.h:40,
                 from /opt/local/include/gcc12/c++/iosfwd:40,
                 from /opt/local/include/gcc12/c++/system_error:40,
                 from /opt/local/include/gcc12/c++/mutex:41,
                 from layer.h:11,
                 from d2layer.h:13,
                 from d2layer.cc:9:
/opt/local/lib/gcc12/gcc/aarch64-apple-darwin23/12.4.0/include-fixed/stdio.h:83:8: error: 'FILE' does not name a type
   83 | extern FILE *__stdinp;

thanks
Sunil

Dear @sunil ,

I’m afraid that something is broken in your environment.

This may happen when the system, CLT or MacPorts are updated and it is painful to find the reason.

As first solution, I would suggest wiping all your ports with the following commands

sudo port -fp uninstall installed

and then reinstalled the required MacPorts ports following the instruction in Flair website.

Remember to issue the command make clean in geoviewer directory before recompiling.

I am sorry that it is a long procedure but I don’t have a more straightforward solution. This depends because we need different layers of software to compile Flair on Mac.

Cheers, Luigi

Hi Luigi,
I removed all ports, did a fresh install of all ports, removed the flair directory and untared afresh and compiled, but that failed. Then I tried your suggesrtions to Mary for python313, and that too failed with the following errors.

/opt/local/lib/gcc13/gcc/aarch64-apple-darwin23/13.3.0/include-fixed/stdio.h:83:8: error: 'FILE' does not name a type
   83 | extern FILE *__stdinp;
      |        ^~~~
/opt/local/lib/gcc13/gcc/aarch64-apple-darwin23/13.3.0/include-fixed/stdio.h:81:1: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
   80 | #include <sys/_types/_seek_set.h>
  +++ |+#include <cstdio>
   81 |

I then tried python311, but that too failed similalry.
What do you sugest?
thanks for helping me with this.
Ciao.

Hello @sunil,

Some colleagues had a similar problem. Unfortunately, we don’t know the reason for this problem, and I was not able to reproduce it.

For them, the solution was to update to Sequoia and follow the instructions in this post.

Giving a second look at your initial post, I notice that there is an error in the output of the command
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables.

Not sure if this is linked to the problem, but you can try to remove the CLT with
sudo rm -rf /Library/Developer/CommandLineTools
and reinstall back with
xcode-select --install.

I’m sorry I don’t have a more clean solution at this time.

Best, Luigi

Many thanks Luigi,
Updates to this Mac is controlled by the IT group and they are often delayed by several months, but luckily for me, I was able to update to Sequoia 15.3.2, and combined with your proposed method, I managed to install flair 3.4.
Thanks a lot for your support on this.