Forum

Important Notice for New User Registrations

To combat an increasing number of spam and bot registrations, we now manually approve all new user registrations. While this may cause a delay until your account is approved, this step is essential to ensure the quality and security of this forum.

To help us verify your registration as legitimate, please use a clear name as user name or an official email address (such as a work, university, or similar address). If you’re concerned that we may not recognize your registration as non-spam, feel free to email us at with a request to approve your username.

Please or Register to create posts and topics.

Building QBlade CE v2.0.4 from Source on macOS ARM64 (Apple Silicon) — Community Report

Hi everyone on the forum,

My name is Sebastian Reyes, a master degree student from the National Autonomus University of Mexico (UNAM), with the speciality in wind energy.

Since I am a macOS user, I try to run all open source applications as possible as well in a native way to do it.

That’s the main reason I particularly wanted to start my journey on building and compiling the QBlade source code to be able to run it natively on my computer, and of course, I was aided by Claude AI in order to partially accomplish this monumental task since the needed skills to build this to my own specific operative system exceeds by far my own programming skills since I am more data science oriented.

Anyways; in order to don’t let this message be too extensive, I want to share a full summary of what it’s already done, looking forward for more macOS users and David itself to continue this titanic work. Also, the summary was made by Claude AI.

Here it is:

Here’s a forum post summary:


Building QBlade CE v2.0.4 from Source on macOS ARM64 (Apple Silicon) — Community Report


System Specs:

  • MacBook Pro M1 Pro
  • macOS Tahoe 26.5 (Build 25F71)
  • 16GB RAM
  • Apple Silicon ARM64 (native, not Rosetta)

What We Achieved

QBlade CE v2.0.4 was successfully compiled from source and is running natively on Apple Silicon macOS 26.5 (Tahoe). This appears to be the first documented successful build on this platform. The app launches, airfoil polar curves (Cl/Cd) display correctly, XFoil analyses run, and OpPoints are populated in the dropdown.


Dependencies Installed

All via Homebrew:

  • Qt 5.15.19 (qt@5)
  • OpenBLAS, LAPACK, GFortran (via gcc)
  • libomp (OpenMP)
  • CLBlast
  • OpenMPI (pulled in automatically)

Libraries Built from Source

libQGLViewer — cloned from https://github.com/GillesDebunne/libQGLViewer.git and built with Qt5. A bug in the destructor (helpWidget()->close() on an already-destroyed widget) caused a crash on exit — fixed by guarding with a null check in qglviewer.cpp.

Project Chrono 7.0.0 — cloned from https://github.com/projectchrono/chrono.git (tag 7.0.0). Key issues:

  • omp.h not found: fixed with -DCMAKE_C_FLAGS="-I/opt/homebrew/opt/libomp/include"
  • Eigen unsupported/ folder missing from QBlade’s bundled Eigen 3.3.7: solved by downloading Eigen 3.3.7 source and copying the unsupported/ folder
  • Modules disabled: POSTPROCESS, VEHICLE, IRRLICHT, PYTHON, COSIMULATION, PARDISO_MKL, MULTICORE, GPU, SENSOR

Source Code Patches Required

qblade.pro:

  • Added macx: sections for all library paths, OpenMP flags, frameworks
  • Replaced -lGLU with -framework OpenGL on macOS
  • Replaced -lOpenCL with -framework OpenCL on macOS
  • Added QMAKE_POST_LINK to automatically fix dylib paths after every build via install_name_tool
  • Made -fopenmp conditional with !macx: to avoid conflicts

Source files:

  • GL/gl.hOpenGL/gl.h in 5 files: WindField.cpp, QSimulation.cpp, LinearWave.cpp, BladeSurface.cpp, StrObjects.cpp
  • GLWidget.cpp lines 152-155: cast double expressions to float to fix C++11 narrowing errors
  • Math_Types.h: replaced #include <tr1/cmath> with #include <cmath>
  • OpenCL: copied cl.cpp (OpenCL 1.x) as cl.hpp into the macOS SDK OpenCL framework headers
  • MainFrame.cpp: commented out m_glWidget->setFormat(glFormat) which triggered the legacy QGLWidget crash on macOS 26
  • MainFrame.cpp: added show() + QApplication::processEvents() before CreateDockWindows() to ensure window handle exists before OpenGL initialization
  • MainFrame.cpp / QBladeApplication.cpp: moved LoadSettings() to after window creation via a new LoadAndApplySettings()method
  • QBladeApplication.cpp: added Qt::AA_ShareOpenGLContexts and Qt::AA_UseHighDpiPixmaps attributes
  • main.cpp: added Qt::AA_ShareOpenGLContexts
  • Polar.cpp: fixed airfoil filename sanitization to remove (, ), % characters that caused XFoil LOAD to fail silently
  • Polar.cpp: fixed XFoil batch file format — added blank lines after PLOP/G F and after VPAR’s CTR section to correctly exit submenus
  • Polar.cpp: set g_tempPath to absolute path QDir::homePath() + "/.qblade_temp"
  • Polar.cpp: increased waitForFinished timeout from 2000ms to 60000ms

XFoil: Recompiled from source with gfortran for native ARM64 to fix SIGILL (illegal instruction) crash when writing DUMP/CPWR boundary layer output files:

make FC=gfortran FFLAGS="-O2 -arch arm64 -frecursive -fallow-argument-mismatch" FTNLIB="" xfoil

Remaining Issues

OpPoint visualization (pressure distribution + boundary layer) not working. XFoil correctly generates BL and CP files when run manually with the batch files QBlade produces. However, when QBlade runs XFoil as a QProcesssubprocess, readAllStandardOutput() appears to return empty output, causing results[i][0] to stay 0 and the BL/CP files never being read into the g_operationalPointStore. This is likely a Qt5/macOS subprocess stdout buffering issue. Suspected fix: add binaryProcess.setProcessChannelMode(QProcess::MergedChannels) before starting the process, or switch to reading output via signals rather than blocking.

360° Polar Extrapolation module. not yet investigated.

App crashes on exit — largely resolved by fixing QGLViewer destructor, though a NewCurve::~NewCurve() crash can occur when reloading OpPoint graph curves.

Window position warning — harmless Qt warning about saved window position being outside screen bounds on macOS 26.


Launch Instructions

# Add to ~/.zshrc:
qblade() {
    /Applications/QBladeCE/QBladeCE.app/Contents/MacOS/QBladeCE &
}

# Or directly:
/Applications/QBladeCE/QBladeCE.app/Contents/MacOS/QBladeCE

We hope this helps other macOS ARM64 users.

Finally, as I am not active in this forum, below is posted my email if anyone wants to reach me to discuss further on this matter:

email:

I hope anyone finds well today and to have all of you a nice day.

Yours sincerely,
Sebastian Reyes

Uploaded files:
  • You need to login to have access to uploads.

Scroll to Top