An error occurred when I input the command while compling the Flair:
“sudo port install xorg-server xorg“
the prompt shows:
Continue? [Y/n]: Y ---> Applying patches to xorg-libxcb Error: Failed to patch xorg-libxcb: command execution failed Error: See /opt/local/var/macports/logs/_Users_Danny_Documents_port_x11_xorg-libxcb/xorg-libxcb/main.log for details. Error: Follow if you believe there is a bug. Error: Processing of port xorg-server failed
I have a similar environment to yours and I couldn’t reproduce this error. If the issue has been fixed at MacPorts level, I suggest you try again.
However, you don’t need to install X server from MacPorts. You already have it installed as an independent package, Xquartz, as recommended in the Mac OSX installation instructions on the Flair website.
Have you managed to compile geoviewer and test Flair? This should work in principle.
Thanks for your reply. The geoviewer compilation is failed. After inputting
make install DESTDIR=PATH_FLAIR
the terminal show as follows:
make install DESTDIR=/Users/Danny/Documents/flair/flair-3.4
Traceback (most recent call last):
File "<string>", line 1, in <module>
import tkinter;print(tkinter.TkVersion)
^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/tkinter/__init__.py", line 38, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'
Package x11 was not found in the pkg-config search path.
Perhaps you should add the directory containing `x11.pc'
to the PKG_CONFIG_PATH environment variable
No package 'x11' found
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C viewer
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C farm
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C geometry
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C data
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C graph
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C math
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tool
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C xdraw
Package x11 was not found in the pkg-config search path.
Perhaps you should add the directory containing `x11.pc'
to the PKG_CONFIG_PATH environment variable
No package 'x11' found
g++ -c ocube.cc -m64 -g -DDarwin -std=c++17 -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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -fstrict-aliasing -I. -I..
ocube.cc:16:10: fatal error: X11/Xlib.h: No such file or directory
16 | #include <X11/Xlib.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [ocube.o] Error 1
make: *** [xdraw/libxdraw.a] Error 2
So it comes back to the first question, and also for the installation of tkinter.
I tried different versions of macports and pythons. The problem remains.
The issue is due to the fact that the X server library are not found at compilation.
Did you followed these instructions from the Flair installation instructions for MacOSX
Since the separation of tk into tk-x11 and tk-quartz ports (on 5 January 2025), the quartz variant is the default. Therefore, tk needs to be installed with the x11 variant in order to work with Flair, as described here.
To do so, please run:
$ sudo port install tk +x11
Then rebuild py3[version]-tkinter from source
port -ns upgrade --force py3[version]-tkinter
If you still have problem, please provide the output of these commands:
Dear @luillo ,
After running sudo port install tk +x11
the terminal shows:
---> Computing dependencies for tk
The following dependencies will be installed:
Xft2
tk-x11
xorg-libX11
xorg-libXScrnSaver
xorg-libXext
xorg-libxcb +python38
xrender
Continue? [Y/n]: Y
---> Applying patches to xorg-libxcb
Error: Failed to patch xorg-libxcb: command execution failed
Error: See /opt/local/var/macports/logs/_Users_Danny_Documents_port_x11_xorg-libxcb/xorg-libxcb/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port tk failed
Your PATH variable contains the path to Anaconda at the beginning, which causes conflicts between different Python environments.
You should correct this in your shell configuration file. For example, in my ~/.bash_profile I have this function that I initialised before I use Flair.
Once you have a clean environment for MacPorts, I suggest that you issue the command sudo port install tk +x11 again and, if there are no errors, you can try to compile geoviewer again.
In case of error (which is likely since you have not followed carefully the Installation Instructions), I think the MacPort installation is corrupted and so you need to remove all ports with the command sudo port -fp uninstall installed and then follow again the Mac OSX installation instructions in the Flair website.
In particular, note that you need to install Python with these variants (as documented in the installation instructions) sudo port install py3[version]-matplotlib +tkinter +x11
Since you have XQuartz as a standalone package, there is no need to install it via MacPorts.
Dear @luillo
The xorg-libxcb is still not installed.
So I re-install the OS, and installed the fluke and flair.
However, the interface of the flair seems not normal, show as follow: