Flair on macos M4, issue with interface and geoviewer

Dear Flair users/experts,

I have installed flair on my macos sequoia 15.2 M4.
No problem, it was running well.
After an update of the mac (macport and OS), the geoviewer stopped working (flair just crashes with the following error /flair: line 18: 10326 Segmentation fault: 11 ${PYTHON} -O -W ignore ${DIR}/flair.py "$@").
I tried to recompile the geoviewer and I got the following errors:

g++ -c geoviewer.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 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fno-strict-aliasing -I. -I.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I/opt/local/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
In file included from viewerobject.h:34,
                 from geoviewer.cc:14:
xdraw/xdraw.h: In member function 'int XDraw::changeGC(long unsigned int)':
xdraw/xdraw.h:77:34: error: 'XChangeGC' was not declared in this scope; did you mean 'changeGC'?
   77 |                         { return XChangeGC(display, gc, valuemask, &gcValues); }
      |                                  ^~~~~~~~~
      |                                  changeGC
xdraw/xdraw.h: In member function 'int XDraw::changeGC(long unsigned int, XGCValues*)':
xdraw/xdraw.h:80:34: error: 'XChangeGC' was not declared in this scope; did you mean 'changeGC'?
   80 |                         { return XChangeGC(display, gc, valuemask, values); }
      |                                  ^~~~~~~~~
      |                                  changeGC
xdraw/xdraw.h: In member function 'int XDraw::setFunction(unsigned int)':
xdraw/xdraw.h:84:40: error: 'XChangeGC' was not declared in this scope; did you mean 'changeGC'?
   84 |                                 return XChangeGC(display, gc, GCFunction, &gcValues);
      |                                        ^~~~~~~~~
      |                                        changeGC
xdraw/xdraw.h: In member function 'int XDraw::setDashes(int, const char*, int)':
xdraw/xdraw.h:100:34: error: 'XSetDashes' was not declared in this scope; did you mean 'setDashes'?
  100 |                         { return XSetDashes(display, gc, dash_offset, dash_list, n); }
      |                                  ^~~~~~~~~~
      |                                  setDashes
xdraw/xdraw.h: In member function 'void XDraw::setFillSolid()':
xdraw/xdraw.h:104:27: error: 'XSetFillStyle' was not declared in this scope; did you mean 'XStringStyle'?
  104 |                         { XSetFillStyle(display, gc, FillSolid); }
      |                           ^~~~~~~~~~~~~
      |                           XStringStyle
xdraw/xdraw.h: In member function 'int XDraw::foreground(long unsigned int)':
xdraw/xdraw.h:122:40: error: 'XSetForeground' was not declared in this scope; did you mean 'XNForeground'?
  122 |                                 return XSetForeground(display, gc, color);
      |                                        ^~~~~~~~~~~~~~
      |                                        XNForeground
xdraw/xdraw.h: In member function 'int XDraw::background(long unsigned int)':
xdraw/xdraw.h:125:40: error: 'XSetBackground' was not declared in this scope; did you mean 'XNBackground'?
  125 |                                 return XSetBackground(display, gc, color);
      |                                        ^~~~~~~~~~~~~~
      |                                        XNBackground
xdraw/xdraw.h: In member function 'int XDraw::point(Drawable, int, int)':
xdraw/xdraw.h:130:34: error: 'XDrawPoint' was not declared in this scope; did you mean 'XPoint'?
  130 |                         { return XDrawPoint(display, drawable, gc, x, y); }
      |                                  ^~~~~~~~~~
      |                                  XPoint
xdraw/xdraw.h: In member function 'int XDraw::points(Drawable, XPoint*, int, int)':
xdraw/xdraw.h:133:34: error: 'XDrawPoints' was not declared in this scope
  133 |                         { return XDrawPoints(display, drawable, gc, pts, npts, mode); }
      |                                  ^~~~~~~~~~~
xdraw/xdraw.h: In member function 'int XDraw::line(Drawable, int, int, int, int)':
xdraw/xdraw.h:137:34: error: 'XDrawLine' was not declared in this scope
  137 |                         { return XDrawLine(display, drawable, gc, x1, y1, x2, y2); }
      |                                  ^~~~~~~~~
xdraw/xdraw.h: In member function 'int XDraw::lines(Drawable, XPoint*, int, int)':
xdraw/xdraw.h:140:34: error: 'XDrawLines' was not declared in this scope
  140 |                         { return XDrawLines(display, drawable, gc, pts, npts, mode); }
      |                                  ^~~~~~~~~~
xdraw/xdraw.h: In member function 'int XDraw::segments(Drawable, XSegment*, int)':
xdraw/xdraw.h:143:34: error: 'XDrawSegments' was not declared in this scope; did you mean 'XSegment'?
  143 |                         { return XDrawSegments(display, drawable, gc, segs, nsegs); }
      |                                  ^~~~~~~~~~~~~
      |                                  XSegment
xdraw/xdraw.h: In member function 'int XDraw::rectangle(Drawable, int, int, unsigned int, unsigned int)':
xdraw/xdraw.h:148:34: error: 'XDrawRectangle' was not declared in this scope; did you mean 'XRectangle'?
  148 |                         { return XDrawRectangle(display, drawable, gc, x, y, width, height); }
      |                                  ^~~~~~~~~~~~~~
      |                                  XRectangle
xdraw/xdraw.h: In member function 'int XDraw::rectangles(Drawable, XRectangle*, int)':
xdraw/xdraw.h:151:34: error: 'XDrawRectangles' was not declared in this scope; did you mean 'rectangles'?
  151 |                         { return XDrawRectangles(display, drawable, gc, rects, nrects); }
      |                                  ^~~~~~~~~~~~~~~
      |                                  rectangles
xdraw/xdraw.h: In member function 'int XDraw::arc(Drawable, int, int, unsigned int, unsigned int, int, int)':
xdraw/xdraw.h:157:34: error: 'XDrawArc' was not declared in this scope; did you mean 'XDraw'?
  157 |                         { return XDrawArc(display, drawable, gc, x, y,
      |                                  ^~~~~~~~
      |                                  XDraw
xdraw/xdraw.h: In member function 'int XDraw::arcs(Drawable, XArc*, int)':
xdraw/xdraw.h:161:34: error: 'XDrawArcs' was not declared in this scope
  161 |                         { return XDrawArcs(display, drawable, gc, as, narcs); }
      |                                  ^~~~~~~~~
xdraw/xdraw.h: In member function 'int XDraw::fillRectangle(Drawable, int, int, unsigned int, unsigned int)':
xdraw/xdraw.h:166:34: error: 'XFillRectangle' was not declared in this scope; did you mean 'fillRectangle'?
  166 |                         { return XFillRectangle(display, drawable, gc, x, y, width, height); }
      |                                  ^~~~~~~~~~~~~~
      |                                  fillRectangle
xdraw/xdraw.h: In member function 'int XDraw::fillRectangles(Drawable, XRectangle*, int)':
xdraw/xdraw.h:169:34: error: 'XFillRectangles' was not declared in this scope; did you mean 'fillRectangles'?
  169 |                         { return XFillRectangles(display, drawable,  gc, rects, nrects); }
      |                                  ^~~~~~~~~~~~~~~
      |                                  fillRectangles
xdraw/xdraw.h: In member function 'int XDraw::fillPolygon(Drawable, XPoint*, int, int, int)':
xdraw/xdraw.h:172:34: error: 'XFillPolygon' was not declared in this scope; did you mean 'fillPolygon'?
  172 |                         { return XFillPolygon(display, drawable,  gc, pts, npts, shape, mode); }
      |                                  ^~~~~~~~~~~~
      |                                  fillPolygon
xdraw/xdraw.h: In member function 'int XDraw::fillArc(Drawable, int, int, unsigned int, unsigned int, int, int)':
xdraw/xdraw.h:177:34: error: 'XFillArc' was not declared in this scope; did you mean 'fillArc'?
  177 |                         { return XFillArc(display, drawable,  gc, x, y,
      |                                  ^~~~~~~~
      |                                  fillArc
xdraw/xdraw.h: In member function 'int XDraw::fillArcs(Drawable, XArc*, int)':
xdraw/xdraw.h:181:34: error: 'XFillArcs' was not declared in this scope; did you mean 'fillArcs'?
  181 |                         { return XFillArcs(display, drawable,  gc, as, narcs); }
      |                                  ^~~~~~~~~
      |                                  fillArcs
xdraw/xdraw.h: In member function 'void XDraw::string(Drawable, int, int, const XChar*, int)':
xdraw/xdraw.h:192:27: error: 'XDrawString' was not declared in this scope; did you mean 'XDefaultString'?
  192 |                         { XDrawString(display, drawable, gc, x,y, str, length); }
      |                           ^~~~~~~~~~~
      |                           XDefaultString
xdraw/xdraw.h: In member function 'void XDraw::string16(Drawable, int, int, const XChar16*, int)':
xdraw/xdraw.h:194:27: error: 'XDrawString16' was not declared in this scope
  194 |                         { XDrawString16(display, drawable, gc, x,y, str, length); }
      |                           ^~~~~~~~~~~~~
make: *** [geoviewer.o] Error 1

In addition, the flair interface looks a bit strange since the update of my mac, see below:

The errors look like being an issue with X11 so I tried to reinstall XQuartz but it did not change anything.
I also tried to remove/reinstall xcode command tool but same, no success.

Any idea about what is happening ?

Thanks a lot for your help.

Hello @thomas.f

Since the update to tk version 8.6.15, MacPort has changed the default variant to +quartz. This is causing the compilation problem and the strange Flair appearance.

To fix this, please run the following command to switch to the +x11 variant.
sudo port install tk +x11

After that, please recompile geoviewer and test Flair again.

Please let us know if this resolves the issue.

Cheers, Luigi

1 Like