Created AUR packge.

42 views
Skip to first unread message

Savi MonsoonAero

unread,
Sep 4, 2026, 4:45:09 PMSep 4
to The Ring Programming Language

Dear Mahmoud,

First: thank you for Ring. I've just finished packaging Ring 1.27 for the
AUR (Arch Linux and CachyOS, package "ring-lang") — a full build from the
v1.27 source tarball, everything included: VM, all extensions, all tools,
RingNotepad and FormDesigner working. Along the way I had to port RingQt
to Qt6 and fix a handful of Linux-specific assumptions. I'd like to
summarize both, because I believe most of it is worth adopting upstream,
and I'm happy to provide the complete patch bundle.

I am aware that ring-lang-bin exists, but here is full source build. Took me the full day to do it. 

## Why Qt6

I'm on CachyOS, which tracks Arch's current packages — and Arch is
retiring the Qt5 module packages (qt5-charts, qt5-datavis3d and others
are already gone or going). On such systems a RingQt linked against
Qt5 simply cannot be built anymore. Qt 6.11 + qt6-5compat turned out
to be a viable target: after the patch set below, all three libraries
(core/light/full) build and run, and RingNotepad launches and edits
files on a current Qt6 stack.

## What the Qt6 port required (patch bundle available)

- Module moves: QAction, QKeyEvent, QMouseEvent, QShortcut (include-path
  shadowing by the Qt3D include dirs), QOpenGLWidget -> QtOpenGLWidgets,
  QGraphicsSvgItem/QSvgWidget -> QtSvgWidgets, QRegExp/QStringRef/
  QTextCodec -> Qt5Compat (now only forward-declared in QtCore).
- The QtCharts namespace is gone in Qt6 — the generated qualifiers
  (QtCharts::) must be dropped.
- ~20 Qt5 classes removed from Qt6 needed inert stub headers:
  QBluetoothTransfer*, the bearer API (QNetworkConfiguration*), the
  QMediaObject/QMediaRecorder session-plumbing family, QAudioRecorder,
  QAudioDeviceInfo, QCameraViewfinder, QCameraImageCapture (renamed
  QImageCapture), the encoder-settings classes, QAudioProbe/QVideoProbe.
- ~90 method-level changes in the generated bindings (removed methods
  stubbed at runtime, QStringRef -> QStringView in the XML stream
  getters, QLocale QChar -> QString, float* color getters, scoped-enum
  int casts, QWheelEvent position() migration, ...).
- The full-build gencode stage must run on the build platform (it
  already filters Windows-only classes such as the ActiveX section) —
  the checked-in ring_qt.cpp is the Windows flavor and cannot compile
  on Linux as-is.

## Linux state-path issues (the part I'd most like to propose upstream)

On Linux, /usr is read-only (FHS). Two tools currently write state into
the install tree and fail there:

1. ringpm — its registry/packages state under the install folder.
   I redirected it to ~/.ringpm in the package (a ~4-line change using
   sysget("HOME")); after that, ringpm works beautifully — refresh,
   search, install, run.
2. RingNotepad — the settings file path is stored in a cSettingsFile
   attribute (set during RNoteSettings initialization in
   tools/ringnotepad/src/rnotesettings.ring; used by
   SaveSettingsToFile(), line 24: write(cSettingsFile, cSettings)).
   On Linux the resolved path lands in the read-only install tree
   (/usr/lib/ring/...), producing an R35 error on every close. The
   same settings file also seeds the Save/Open dialog's startup
   folder, so redirecting fixes both the close-time error and the
   dialog defaulting into a read-only directory. Prefixing the path
   with sysget("HOME")+"/.ringnotepad/" (or an equivalent) would fix
   it in one place.

Proposal: have tools resolve writable state from sysget("HOME") (e.g.
~/.ringnotepad/, ~/.ringpm/), or honor an env var like RING_USERDATA.
This would remove the need for distro patches entirely and matches how
users expect Linux applications to behave.

Two smaller items while I have your ear:

- rnotefilemenu.ring's WriteFile() uses the fopen() result without
  checking for NULL, so an unwritable path surfaces as a confusing
  "NULL pointer in fwrite" instead of a clean message.
- The ring_qt515*.pro files link /usr/lib/libring.so by absolute path,
  which only works if a previous Ring install already exists; a
  relative -l:libring.so (plus an rpath) builds cleanly on a fresh
  machine.

The full PKGBUILD with all patch scripts (the Qt6
battery runs to a few hundred lines, all fail-loud-guarded) is attached.

Best regards,
Savi G.
Ring 1.27 AUR package maintainer (ring-lang) — Arch Linux / CachyOS
PKGBUILD

Mahmoud Fayed

unread,
Sep 4, 2026, 4:56:06 PMSep 4
to The Ring Programming Language
Hello Savi

This really looks wonderful progress and a lot of work, Thank you very much for sharing :D

I will study your notes and recommendations, Keep up the GREAT WORK :D

Greetings,
Mahmoud

Savi MonsoonAero

unread,
Sep 4, 2026, 6:39:16 PMSep 4
to The Ring Programming Language
Thank you.

A quick follow-up to my earlier mail — the package is now published and
working end to end (builds, installs, check() passes, games from the
distribution run: MoneyCaseGame and others). Four new findings since I
wrote, three with fixes attached and one open:

## 1. An interesting build finding: openglwidget.cpp is platform-gated

Both ring_qt515_light.pro and ring_qt515.pro list
cpp/src/openglwidget.cpp only inside a platform-conditional that is
false on Linux, while the shipped (Windows-flavor) generated
ring_qt_light.cpp references the OpenGLWidget class methods. A Linux
build that compiles the shipped TU — rather than regenerating it —
gets undefined OpenGLWidget symbols, which shared-library links allow
by default, so it surfaces only at dlopen as a generic load error.
An unconditional top-level SOURCES entry, or regenerating the light
TU on Linux (as the full build already does), resolves it.

This took a while to diagnose precisely because the failure was silent
at link time. Which leads to:

## 2. Suggestion: build the .pro files with -Wl,-z,defs

Adding -Wl,-z,defs to the ringqt library links turns every
undefined-symbol issue into a named, at-build-time error instead of a
dlopen surprise at runtime. It caught the above in one run after the
same class of bug had shipped silently through several builds. May be
worth adopting upstream generally — it also catches missing
implementation objects that platform-conditional gating can produce.

## 3. RingNotepad settings write — precise failure signature

The settings-path issue from my first mail now has a full trace, and
it fires in more places than close-only:

  write() <- SaveSettingsToFile() (rnotesettings.ring, line 24)
          <- SaveSettings()
          <- checksavebeforechange() (rnotetreeviewevents.ring, line 8)
          <- changefile() (line 11)

So on a read-only install tree, the R35 error also hits every file
switch in the project tree, not just app exit. There is a second,
possibly-related open symptom: after closing a running application
and loading another from the tree, the editor crashes — the stack
passes through the same checksavebeforechange()/changefile() chain,
which is why I suspect one root cause. Both traces available on
request.

## 4. One open runtime item

The AnalogClock application from the distribution does not run on the
package; other games and applications do. Trace available.

❯ ring examples/applications/analogclock/AnalogClock.ring
kf.iconthemes: Icon theme "gnome" not found.

Line 76 Error (R1) : Can't divide by zero  
in file examples/applications/analogclock/AnalogClock.ring




Best regards,

Mahmoud Fayed

unread,
Sep 4, 2026, 6:46:11 PMSep 4
to The Ring Programming Language
Hello Savi

>> "The AnalogClock application from the distribution does not run on the package"
>> "Line 76 Error (R1) : Can't divide by zero"

This error means a frailer in loading the image which led to having image width/height to be zero 
image = new QPixMap("HermleClock.jpg") 

Thanks for the report

Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages