Having some problems on macOS

276 views
Skip to first unread message

stefan schaenzer

unread,
Feb 12, 2024, 4:17:29 AMFeb 12
to The Ring Programming Language
Hello everyone,

I'm just getting started with Ring, and I'm having some problems on macOS.

Build from Source failed

I tried to build Ring from the source files. I got numerous warnings during the build process (often indicating that deprecated functions are being used), but no error messages.

Unfortunately, I got an error message when I subsequently called "$ ring rnote.ring".

Error message:

sudo ring rnote.ring

Library File : libringqt.dylib
Line 8 Error (R38) : Runtime Error in loading the dynamic library
In loadlib() In function loadlibfile() in file /Users/myuser/ring/libraries/guilib/loadlibfile.ring
called from line 11 in file rnote.ring

I then used the " ready to use" package "Binary release for macOS 64 bit" from the home page and it worked.

Missing fonts

When I start Ring Notepad with:

$ ring rnote.ring

I get the following message:

qt.qpa.fonts: Populating font family aliases took 159 ms. Replace uses of missing font family "Consolas" with one that exists to avoid this cost.

The error message indicates that when starting the Ring application (specifically with rnote), the Qt framework is trying to use the font "Consolas", but it is not available or correctly installed on your system. The lack of this font causes Qt to take extra time to find and assign replacement fonts, which delays the launch of the application.

I was able to fix this message with:

Download the Consolas font from http://www.fontpalace.com/font-details/Consolas/
Open Finder and navigate to Downloads directory
Double click the Consolas.ttf file
A dialog box appears displaying the details about the font
Click Install font button

The same applies to font family "Roboto".

If both fonts are installed, the message disappears.

Displaylink Crash Ring Notepad

I have an environment with two external monitors controlled by Displaylink Manager. I was able to identify Displaylink as the cause of sporadic, but frequent, crashes of Ring Notepad and other applications. Unfortunately, even a driver update did not bring any improvement. The only remedy was to connect it directly to my Macbook Pro.

Research has shown that other users with different applications and development tools also have problems with Displaylink. I suspect that the issues are caused by the implementation of the Displaylink display as a large virtual desktop and that the resolution for the rendering/display functions leads to the issues. There may be a solution for QT.

Can't Center Window

Furthermore, in connection with the virtual desktop across two to three monitors, my issue may be that I was unable to center a window on the primary display. Vertical centering worked, but horizontal centering did not. The window was always displayed at the far-right edge of the screen.

I was able to solve it like this (code excerpt):

// center the window
// create a new desktop widget
oDesktop = new qDesktopWidget()

// get the available geometry of the main window
geo=oDesktop.availableGeometry(oMainWindow)

see "width: " + geo.width() + nl
see "height: " + geo.height() + nl

// calculate the new ceter position of the main window
nNewX = ( geo.width() - oMainWindow.width() ) / 2
nNewY = ( geo.height() - oMainWindow.height() ) / 2

// set the new position of the main window
oMainWindow.move(nNewX, nNewY)

// show the main window
oMainWindow.show()

Technical data of my environment

macOS Sonoma 14.2.1 (Intel)
Ring 1.19 For macOS (64bit)

Maybe these are useful suggestions to improve the quality or help other users who have similar issues.

Greetings
Stefan

Ilir Liburn

unread,
Feb 12, 2024, 6:44:31 AMFeb 12
to The Ring Programming Language
Hello Stefan,

>>  I then used the " ready to use" package "Binary release for macOS 64 bit" from the home page and it worked.

You should try to build Ring (executable) from the source files after you install "Binary release for macOS 64 bit". Otherwise, you need to build all extensions which is far more complicated.

I use GCC on Mountain Lion, works without problem. Clang is showing warnings (don't remember if I got any error).

Greetings,
Ilir

stefan schaenzer

unread,
Feb 25, 2024, 7:50:40 AMFeb 25
to The Ring Programming Language
Hello,

unfortunately rnote crashes reproducibly with a "Segmentation Fault".

I can successfully start rnote with: ring ./rnote.ring. I can also execute a code. However, as soon as I move the mouse pointer outside the application, rnote crashes. If I create an executable file of rnote with ring3exe and reproduce the error, I also get an error message:

[1] 16967 segmentation fault ./rnote
               
OS version: macOS 14.3.1 (23D60)
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000000bad4007
Exception Codes: 0x0000000000000001, 0x000000000bad4007 (funny adress btw)
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [16990]

I still get the message in the terminal (console) when I call it:

2024-02-25 12:51:02.589 rnote[16967:168360] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.

Exception Type: EXC_BAD_ACCESS (SIGSEGV) indicates that the process attempted to access a memory area that was not allocated to it, resulting in an access violation error.

I was able to reproduce the error with the latest download version for macOS. I also (successfully) created Ring myself from the source files. I was also able to reproduce the error here. To rule out possible sources of error, I tested it on my Mac book alone (without external monitors).

Is this a known problem or is it specific to macOS 14? If I run Ring in a Windows 11 VM, the error does not occur.

So I can't work with Ring (more precisely Ring Notepad) on macOS.

I would be grateful for any tips and hints!

Greetings
Stefan

Mahmoud Fayed

unread,
Feb 25, 2024, 8:28:00 AMFeb 25
to The Ring Programming Language
Hello Stefan

It's not Ring/RingQt issue.
Maybe it's related to Qt and macOS 14 - Or related to some apps installed/running on your system.

I tested Ring using macOS 11
opened the termianl, started Ring Notepad using
ringpm run ringnotepad 
I was able to use the editor without any problems. 
I can run apps, move the mouse pointer away, select other windows, everything works fine.

test.png

Greetings,
Mahmoud

stefan schaenzer

unread,
Feb 25, 2024, 8:47:33 AMFeb 25
to The Ring Programming Language
Hello Mahmoud,

Wow, thanks for the prompt reply!!

I did some more tests and noticed a very strange behavior (as well as the Form Designer). If I deactivate "Show and hide dock automatically" in the system settings on the Mac, I can exit the window area downwards without crashing. Then I can reduce the window size (by reducing the size at the bottom right of the window). If I now move the smaller window slightly to the left, I can also go to the menu bar and exit the window without crashing. Even if I enlarge the window again, it seems to work without crashing. Currently, it appears that the initial size of the window is causing the problem. Very strange.

I have now made the following change in /ring/tools/ringnotepad/src/rnotecontroller.ring:
win1.show() instead of win1.showmaximized()
This seems to work. If this proves to be true, the cause can hopefully be narrowed down to showmaximized().

It may very well be that the issue has to do with Qt and macOS 14. Otherwise, someone would surely have noticed the behavior long ago. Perhaps it is also related to a driver.  I have already identified the DisplayLink Manager as a cause of crashes or faulty behavior (even with non-ring applications). When analyzing the cause, the manufacturer only points out that Apple no longer supports OpenGL and for him, the issue is solved. QT might receive incorrect information about the actual screen size based on the DisplayLink Manager, so that the wrong memory areas are addressed.

When I have time, I will completely remove the DisplayLink Manager from the system and test it again. Let's see if my work around actually works.

Greetings
Stefan

Mansour Ayouni

unread,
Feb 25, 2024, 9:10:54 AMFeb 25
to stefan schaenzer, The Ring Programming Language
Hello Stefan,

I remember a similar problem in Qt on Mac OS, since version 5. The solution was to resize the window (using resize(800, 600) for example) before calling showMaximised().

I hope the hint would help.

All the best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/3b8d1ec0-a3ee-4586-9988-a50ce63a4d9fn%40googlegroups.com.

Mahmoud Fayed

unread,
Feb 25, 2024, 11:06:11 AMFeb 25
to The Ring Programming Language
Hello Stefan

>> "Wow, thanks for the prompt reply!!"

You are welcome :D

>> " This seems to work. If this proves to be true, the cause can hopefully be narrowed down to showmaximized()."

Nice analysis, Thanks for sharing.

Greetings,
Mahmoud

stefan schaenzer

unread,
Feb 25, 2024, 12:01:06 PMFeb 25
to The Ring Programming Language
I have completely removed the DisplayLink Manager and restarted the computer. Unfortunately, ringnotepad still crashes when I resize the window. Interestingly, it does not crash when I resize the bottom-right corner. When I use full screen, there is no crash.

I strongly suspect that this problem is related to macOS Sonoma and Qt 5.15.12. Unfortunately, I am not familiar with Qt. Which rendering backend does Ring use? Qt automatically selects the appropriate rendering backend based on the hardware and OS capabilities. For macOS Quartz or Metal. However, it is also possible to force a specific backend (no idea how), such as SDL2 or OpenGL. SDL2 and OpenGL are no longer well-supported on current macOS versions.

I have now entered the following in /ring/tools/ringnotepad/src/rnotecontroller.ring:
win1.setWindowFlags(Qt_Window | Qt_CustomizeWindowHint)
win1.showFullScreen()

Hopefully, this should be enough to avoid the crashes. Probably an upgrade of QT is required. Currently, Qt 6.6 but in Qt 5.15 bugs are still to be fixed.

@Mansour: I will try out your tip and give you some feedback here. In general, there seem to have been issues with resizing windows in Qt. Also under windows and has nothing directly to do with Ring, although of course it doesn't make a big difference for the programmer.

Greetings
Stefan

stefan schaenzer

unread,
Feb 25, 2024, 12:04:46 PMFeb 25
to The Ring Programming Language
@Mansour:  Nope, unfortunately still crashes with your tip.

Mansour Ayouni

unread,
Feb 25, 2024, 12:25:04 PMFeb 25
to stefan schaenzer, The Ring Programming Language
Hello Stefan,

Thank you for your reply.

All the best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.

stefan schaenzer

unread,
Feb 27, 2024, 10:48:18 AMFeb 27
to The Ring Programming Language
Found this in Qt 6.5.1 release notes:

Fixes qtbase: QTBUG-109971 Crash during window resize when using QQuickWidget (see: https://bugreports.qt.io/browse/QTBUG-109971?focusedCommentId=713699)

Unfortunately, I cannot say whether it is also the bug that is in the QT version that Ring uses or whether it only affects the corresponding QT 6.x version. In any case, the crash seems to occur on macOS > 11. It is also not a rnote-specific error, as I can also reproduce the problem with a test ringQT app, whereby the crash only occurs when I have presumably reached the minimum Windows size. Here is the ring code for my test:

// Toolbar and Statusbar

load "guilib.ring"

// note: all objects here are global!

oApp = new QApp
oWinMain = new QMainwindow()
oWinMain.setWindowTitle("Main Window")
oWinMain.resize(400, 300)

// set the minimum size of the window
oWinMain.setMinimumSize(200, 200)
oWinMain.show()

// Create a new toolbar object
oToolBar = oWinMain.addtoolbar("")

// create a new button
obtnNew = new QPushButton(oWinMain)
obtnNew.settext("New")
// set a new layout for the button
oBtnNew.setStyleSheet("QPushButton { background-color: transparent; border: none; padding: 10px; }")
// bind the click event to an handler for this button
obtnNew.setclickevent("onNew()")
// add the button to the toolbar
oToolBar.addwidget(oBtnNew)

oBtnOpen = new QPushButton(oWinMain)
oBtnOpen.settext("Open")
oBtnOpen.setStyleSheet("QPushButton { background-color: transparent; border: none; padding: 10px; }")
oBtnOpen.setclickevent("onOpen()")
oToolBar.addwidget(oBtnOpen)

// add a separator to the toolbar
oToolbar.addseparator()

oBtnQuit = new QPushButton(oWinMain)
oBtnQuit.settext("Quit")
oBtnQuit.setStyleSheet("QPushButton { background-color: transparent; border: none; padding: 10px; }")
oBtnQuit.setclickevent("onQuit()")
oToolBar.addwidget(oBtnQuit)

// create a new statusbar object
oStatusBar = oWinMain.Statusbar()
// set a message in the status bar
oStatusBar.ShowMessage("Stauts: Bereit", 0)

oApp.exec()
oApp.quit()

// note: scope in functions is local

func onNew()

    // change the message in the status bar
  oStatusBar.ShowMessage("Status: New clicked", 0)
end

func onOpen()
  oStatusBar.ShowMessage("Status: Open clicked", 0)
end

func onQuit()
  // print a message to the terminal
    print("Quit clicked.")
  // quit the app
    oApp.quit()
end

Unfortunately, I do not receive any error message after the crash.

This is of course very frustrating, as I obviously can't create working GUI apps this way. Maybe there is a workaround?

Mahmoud Fayed

unread,
Feb 27, 2024, 11:05:23 AMFeb 27
to The Ring Programming Language
Hello Stefan

Ring uses Homebrew to install Qt5
We use these formulae:  qt@5 — Homebrew Formulae
This will install Qt 5.15.12
This is not the latest update for Qt 5.15
For example, in Ring for Windows, we distribute dll files for Qt 5.15.16
Maybe the problem is fixed in later updates, and just the formulae is not updated.

Greetings,
Mahmoud

Mahmoud Fayed

unread,
Feb 27, 2024, 11:32:39 AMFeb 27
to The Ring Programming Language
Hello Stefan

>> "This is of course very frustrating, as I obviously can't create working GUI apps this way. Maybe there is a workaround?"

You can disable window resize, continue development and at some point, the problem will be fixed by Qt.
Qt is very popular, used by many people and maintained by hundreds of developers (Nothing to worry about)
Since the problem appears in new macOS versions, then it's a matter of time and they will fix it.

Note: In Ring, We have another GUI option called (RingLibui), You can test it to see if it comes with the same problem or not: RingLibUI Extension — Ring 1.19 documentation (ring-lang.github.io)

Greetings,
Mahmoud
On Tuesday, February 27, 2024 at 6:48:18 PM UTC+3 stefan.s...@mailbox.org wrote:

Mansour Ayouni

unread,
Feb 27, 2024, 4:00:12 PMFeb 27
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

I came across this nice C++ GUI library. It seems to be actively developed, feature ritch, and really multiplatform (even MCU devices are supported):


Looking forward to telling me your opinion about it.

All the best,
Mansour

Mahmoud Fayed

unread,
Feb 27, 2024, 4:30:32 PMFeb 27
to The Ring Programming Language
Hello Mansour

>> "Looking forward to telling me your opinion about it."

I don't need it in Ring world  
1 - RingQt ---> For large projects
2 - RingLibUI --> Small GUI apps or some tests
3 - RingRayLib + RayGUI --> GUI for games & Graphics Apps
4 - Using Any of RingAllegro/RingLibSDL & Ring Game Engine, I can build GUI Classes on the top of that
For example, the next screen shot for one of my libraries for Clipper language - Is just 17,000 lines of code and it provides many classes 
I wrote this 20 years ago, I think something like that could be written in Ring in a few thousand lines of code.
SHOT2.JPG

If I remember correctly, Shadi worked on providing a Ring extension to support it
I think such a library is more suitable than many others.

But in the end, Ring is open for extensions, If you find a library that you like, and would like to support it, just do it :D This will be helpful for others who need the same library.

Greetings,
Mahmoud

Mansour Ayouni

unread,
Feb 27, 2024, 4:54:14 PMFeb 27
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

Thank you very much for your answer.

Best,
Mansour

Mahmoud Fayed

unread,
Feb 28, 2024, 2:45:49 AMFeb 28
to The Ring Programming Language
Hello Mansour

>> "Thank you very much for your answer."

You are welcome :D

Greetings,
Mahmoud

Outnull

unread,
Mar 1, 2024, 11:29:56 AMMar 1
to The Ring Programming Language
Hi Mahmoud, FYI ringpm produces a segfault too running on MacOS Sonoma 14.2:

CleanShot 2024-03-01 at 10.25.50@2x.png
And this applies to all commands run with ringpm (search, refresh, install, etc)

Thank you, 
Outnull

Mahmoud Fayed

unread,
Mar 1, 2024, 12:16:00 PMMar 1
to The Ring Programming Language
Hello Outnull

>> "FYI ringpm produces a segfault too running on MacOS Sonoma 14.2:"

Just complete the steps when building/installing Ring on macOS

i.e. don't forget sudo ring/bin/install.sh


Greetings,
Mahmoud

Outnull

unread,
Mar 1, 2024, 12:53:26 PMMar 1
to The Ring Programming Language
Hi again! I was careful to follow all of the steps, but perhaps I missed one? I already tried that and this is what happened:

CleanShot 2024-03-01 at 11.50.34@2x.png

Ring works though:

CleanShot 2024-03-01 at 11.52.20@2x.png

Thank you,
ON

Mahmoud Fayed

unread,
Mar 1, 2024, 1:10:53 PMMar 1
to The Ring Programming Language
Hello Outnull

The file install.sh try to use the /usr/local/lib folder
But in your screen shot I see the error: Not a directory.

Try updating install.sh and use /usr/lib instead.

Greetings,
Mahmoud

Outnull

unread,
Mar 1, 2024, 8:33:34 PMMar 1
to The Ring Programming Language
Hi Mahmoud, 

I don't think that's it. I tried and also got errors. I wonder if the instructions in your documentation work for you? There are no ring files located in /usr/bin so I am not surprised to see this fail:

CleanShot 2024-03-01 at 19.24.50@2x.png

However, the contents of /usr/local/bin, you can see ring files (symlinks?) here:

CleanShot 2024-03-01 at 19.22.55@2x.png

The errors are all specific to `xattr`: 

xattr: /usr/local/bin/ring: No such xattr: com.apple.quarantine
xattr: No such file: /usr/local/bin/ring2exe
xattr: No such file: /usr/local/bin/folder2qrc
xattr: /usr/local/bin/ringpm: No such xattr: com.apple.quarantine
xattr: /usr/local/bin/ringrepl: No such xattr: com.apple.quarantine
xattr: [Errno 20] Not a directory: '/usr/local/lib/libring.dylib'

I'm wondering if this has to do with install.sh / xattr expecting files in these locations instead of symlinks? /usr/local/lib also appears to be a link, and you'll notice xattr complains it is not a directory, which is correct:

CleanShot 2024-03-01 at 19.31.16@2x.png

Cheers, 
ON

Mahmoud Fayed

unread,
Mar 2, 2024, 4:14:31 AMMar 2
to The Ring Programming Language
Hello ON

The problem is not in usr/local/bin files
It's related to usr/local/lib files where install.sh expect that lib is a folder (Not a file)

So instead of using usr/local/lib folder, Try /usr/lib folder

Greetings,
Mahmoud

Outnull

unread,
Mar 2, 2024, 9:02:41 AMMar 2
to The Ring Programming Language
Good day Mahmoud. I think we are misunderstanding each other, as I've confirmed that I've already tried your suggestion and it didn't work. You are asking me to do a find and replace: [FIND] usr/local/lib [REPLACE] /usr/lib in the install.sh, which I've done, and it produced a new set of errors. Here they are once again. 

CleanShot 2024-03-02 at 07.54.21@2x.png
(PS. I have also tried a find and replace of /usr/local/bin to /usr/bin to address the errors "No such file /usr/local/bin/..." which also did not work)

If I've misunderstood the instruction let me know. A bit of feedback I hope you'll accept as constructive: Ring seems like a great project, but I must admit, if someone with my technical sophistication (engineer, hobby developer) can't get up and running with relative ease, then this fact remains a big barrier to entry for newcomers to the Ring language. For what it's worth, getting setup with a Ring environment should be just as easy as installing PowerShell or Ruby.  Perhaps the experience is smoother on Windows, but I wouldn't know, all I can speak to is how it is on macOS.

Thanks for your help.

Best, 
ON

Mahmoud Fayed

unread,
Mar 2, 2024, 9:27:37 AMMar 2
to The Ring Programming Language
Hello ON

>> "For what it's worth, getting setup with a Ring environment should be just as easy as installing PowerShell or Ruby.  Perhaps the experience is smoother on Windows, but I wouldn't know, all I can speak to is how it is on macOS."

When Ring 1.19 is released, it was tested using macOS 11.
The steps are simple ---> Just extract files, run ring/language/src/installdepmac.sh then run ring/bin/install.sh
This could be improved in the future by using one script file to install Ring. 

So, it's not about simple installation ----> It's about installing Ring on a newer version of macOS.

Greetings,s
Mahmoud

Outnull

unread,
Mar 2, 2024, 9:31:04 AMMar 2
to The Ring Programming Language
Also, this is perhaps unrelated but I would add that I occasionally see references to your own personal directory paths when attempting to use Ring. I wish I had recorded other examples, I think they were probably similar to this one, but for instance I added load "tracelib.ring" to the top of my file and received this error:

CleanShot 2024-03-02 at 08.22.04@2x.png

I mention this because I've never seen this after installing another language before. I quick "grep -ro "/Users/mahmoudfayed" . | wc -l ." shows 212 matches across all files. Could this be apart of the issue? Is this a standard practice?

Thank you, 
ON

Outnull

unread,
Mar 2, 2024, 9:36:49 AMMar 2
to The Ring Programming Language
Hi again Mahmoud, 

I hope you won't mind terribly if I disagree with you here. While I see your point, it doesn't match with "what is on the tin" so to speak. The website doesn't make this clear. As a developer who wants to pick up this language, there are no caveats mentioned on the website, at least not clearly, that indicate that Ring is not able to be installed on current versions of macOS. In fact, the contrary impression is given:

CleanShot 2024-03-02 at 08.31.51@2x.png

CleanShot 2024-03-02 at 08.32.33@2x.png

I think if an asterisk were shown somewhere which said "*NOTE: This version of Ring was tested on a version of macOS that is 3 versions old and may not run on the current version" that would have helped to set the expectation. So, at this stage I'm left to conclude using Ring on my version of macOS (which is the latest) is not possible.

Thank you,
ON

Mahmoud Fayed

unread,
Mar 2, 2024, 9:36:50 AMMar 2
to The Ring Programming Language
Hello ON

>> "Could this be apart of the issue? Is this a standard practice?"

This is strange!

Have you installed Ring on macOS before? older versions of Ring?

Greetings,
Mahmoud

Outnull

unread,
Mar 2, 2024, 9:38:02 AMMar 2
to The Ring Programming Language
Hi Mahmoud, no I haven't! This is my only attempt.

Regards, 
ON

Mahmoud Fayed

unread,
Mar 2, 2024, 9:41:23 AMMar 2
to The Ring Programming Language
Hello ON

>> "So, at this stage I'm left to conclude using Ring on my version of macOS (which is the latest) is not possible"

I am not saying this.

My words in my previous message means (The problem is not that installing Ring on macOS is not simple) 
The problem is  I just need to adjust/test installing Ring on the version of macOS that you have. 

It was a surprise for me that there are such problems with new versions of macOS.

Greetings,
Mahmoud

Outnull

unread,
Mar 2, 2024, 9:44:49 AMMar 2
to The Ring Programming Language
Hi Mahmoud, 

I think it is important to be precise in language so I would like to be clear here. I am not saying this is what you said, I am saying that it is what I am left to conclude based on multiple unsuccessful tries, which I believe is reasonable.

It would be nice for me to get the "full Ring experience" sans errors and difficulties, so once you have sorted out the issues on macOS please let me know as I would happily return to try again.

Best, 
ON

Mahmoud Fayed

unread,
Mar 2, 2024, 9:46:00 AMMar 2
to The Ring Programming Language
Hello ON

>> "Hi Mahmoud, no I haven't! This is my only attempt."

Ok, could you delete anything releated to Ring 1.19

Then try a fresh building from source code (Ring 1.20) : ring/language/README_macOS.md at master · ring-lang/ring (github.com)

Also, be careful to the results that you have when you run: ring/language/build/installdepmac.sh

The problem could be related to installing homebrew packages.

Also, I will test Ring on a new version of macOS to see what happens.

Greetings,
Mahmoud

Outnull

unread,
Mar 2, 2024, 9:48:18 AMMar 2
to The Ring Programming Language
Hello Mahmoud, 

Respectfully, I will wait until after you've completed your testing before I try again. I have spent a non-trivial amount of time trying to get this working, so for me it would be best to return to the process after you've validated it is possible.

Thank you,
ON

Mahmoud Fayed

unread,
Mar 2, 2024, 10:02:20 AMMar 2
to The Ring Programming Language
Hello ON

>> "Respectfully, I will wait until after you've completed your testing before I try again. I have spent a non-trivial amount of time trying to get this working, so for me it would be best to return to the process after you've validated it is possible."

If you read this discussion/thread from the beginning
You will notice that Stefan already using Ring 1.19 (64bit) on macOS Sonoma 14.2.1 (Intel)

So, we can guess that the problem maybe related to your machine.
That's why I am trying to guide you through extra steps 
Because I would like to provide the best help that I can and see why you have these problems.

Also, As said I will do the test on a newer version of macOS myself.
if it works without changes ---> You can return to my previous message  
If I did any change ---> I will tell you about it.

Greetings,
Mahmoud

Outnull

unread,
Mar 2, 2024, 10:11:49 AMMar 2
to The Ring Programming Language
Hi Mahmoud, 

The following is constructive and comes from an "end user's point of view": 

Please understand that I am not new to installing and testing programming languages on my machine. I'm not saying I haven't made a mistake here, but I am saying that this is a hobby of mine to do this with as many languages as I can and for the most part I enjoy it. Additionally, for the creator of the language I think it is important to reflect on the "onboarding experience" (i.e. "how much of my potential user's time should I reasonably expect they devote to get up and running?"). So, while I appreciate your assistance greatly, I feel I have exhausted the energy I have in reserve for a process like this one, at least until I'm certain it is validated and possible, which is something you said you planned to work on. Also, Stefan is running the Intel architecture whereas I am running Apple's M1 chip. Perhaps this matters? I didn't see this on the website as a limitation so I didn't expect that it would, but perhaps that was an incorrect assumption on my part?

At any rate, you'll have me here as a willing tester in the future, but at this point I will wait until it is confirmed that ring works on the latest macOS version running on ARM.

Keep up the great work and look forward to revisiting this in the future.

Warm regards, 
ON

Mahmoud Fayed

unread,
Mar 2, 2024, 10:16:07 AMMar 2
to The Ring Programming Language
Hello ON

>> "Please understand that I am not new to installing and testing programming languages on my machine. I'm not saying I haven't made a mistake here, but I am saying that this is a hobby of mine to do this with as many languages as I can and for the most part I enjoy it"

Very nice, I encourage you to keep doing this and discover this interesting world as much as you can.

>> "Keep up the great work and look forward to revisiting this in the future."

Thanks for your kind words.
Ok, You can test Ring again in the future once we release Ring 1.20 during this year.

Greetings,
Mahmoud

Mahmoud Fayed

unread,
Mar 2, 2024, 10:37:41 AMMar 2
to The Ring Programming Language
Hello ON

>> "Please understand that I am not new to installing and testing programming languages on my machine"

I revised the group history, we have posts/questions from your email address from 2022.
While your message gives me the feeling that you discovered Ring this month!

Looks like you tried Ring before, maybe on Windows.

outnull.png

Greetings,
Mahmoud

stefan schaenzer

unread,
Mar 3, 2024, 8:05:38 AMMar 3
to The Ring Programming Language
Hello everyone,

Many of the issues discussed here seem to be directly related to macOS Sonoma and Xcode 15 and are not specific to Ring.

Below are instructions for installing Ring on macOS, both from a ready-made package and by compiling the source code, both of which have worked for me and I have done on macOS Sonoma and Xcode 15 .

## Installation from a ready-made package

1. **Download**: Go to the official Ring website ([https://ring-lang.github.io](https://ring-lang.github.io)), visit the download section ([https://ring-lang.github.io/download.html](https://ring-lang.github.io/download.html)) and download the macOS package.

2 **Installation**: Open the downloaded package and follow the installation instructions.

3 **Configure path**: To be able to use Ring system-wide, add the installation path in your shell configuration file (e.g. `.zprofile` for Zsh) with:
   ```
   export PATH=$PATH:/path/to/ring/bin
   ```
   Replace `/Path/to/ring/bin` with the installation path of Ring.

## Installation by compiling the source code

**Prerequisites**: Make sure that Git and Homebrew are installed on your system. If not, install Git ([https://git-scm.com](https://git-scm.com)) and Homebrew ([https://brew.sh](https://brew.sh)).

1. **Clone source code**: Clone the ring repository via the terminal with:
   ```
   git clone https://github.com/ring-lang/ring.git
   ```

2 **Install dependencies**: Change to the `~/ring/language/src` directory and run `installdepmac.sh` to install required libraries.

3. compile **Ring Compiler/VM**: In the same directory, compile the ring compiler and VM with `buildclang.sh`.

4 **Compile additional components**: Follow similar steps to compile additional tools and extensions such as Ring2EXE and RingNotepad.

5 **Make Ring globally available**: Make Ring available system-wide by running `install.sh` in the `~/ring/bin` directory.

6 **Start Ring Notepad**: To start Ring Notepad, navigate to the `~/ring/tools/ringnotepad` directory and start it with Ring or via the Ring Package Manager.

These steps will successfully install and configure Ring on your MacOS system, either by downloading the finished package or by compiling the source code.

**Important**: Perform each step individually and check the console output carefully. Mistakes, such as working in the wrong directory, can lead to tools or libraries being created incorrectly. Therefore, check each step carefully. Initially, I simply copied the commands into the terminal and executed them. Later, when troubleshooting, I realized that I was not in the correct directories when executing them, so some necessary steps were not executed correctly.

Under macOS Sonoma and Xcode 15, I was able to build Ring from source code without any problems. However, my experience with different compilers might be unique, as I had already solved many environment issues that might also be relevant for Ring.

The introduction of macOS Sonoma and Xcode 15 brought challenges, especially with the new linker in Xcode 15. Without the ability to revert to Xcode 14.3.1, a recommended workaround is to increase the minimum deployment target or add `-Wl,-ld_classic` to the build settings to revert to the classic linker.

In my `.zprofile` I have made appropriate settings to deal with these challenges, including reverting to the classic linker and customizing the library paths for Dlang. Translated with www.DeepL.com/Translator (free version).

To further clarify the installation and configuration of Ring under macOS Sonoma and Xcode 15, here is an example of the settings in the `.zprofile` that can help solve potential problems:

```shell
# Settings for the clang linker
export LDFLAGS="$LDFLAGS -Wl,-ld_classic -Wl,-no_warn_duplicate_libraries"

# Settings for Dlang (see dmd configuration file)
export DFLAGS="$DFLAGS -L-ld_classic"

# Path information for Dlang to find libraries under macOS
export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH"

# Set the minimum deployment target for macOS
export MACOSX_DEPLOYMENT_TARGET=11
```
The entries for D-Lang are only to be understood as an example and are not relevant for Ring.

These settings make it possible to use the classic linker and suppress the warnings for duplicate libraries, which can be relevant under macOS Sonoma and with Xcode 15. Specific adjustments are also made for the use of Dlang, including the configuration of paths to find libraries correctly.

By customizing the `.zprofile` you can ensure that your development environment is properly configured to work with the latest versions of macOS and Xcode. It is recommended to check these settings carefully and adjust them if necessary to avoid compatibility issues.

The setting OTHER_LDFLAGS = -Wl,-no_warn_duplicate_libraries is specifically intended for the configuration of build settings in Xcode projects.  To use this setting effectively, you should be integrating it into the Xcode project settings or into an Xcode configuration file (.xcconfig). This allows you to make specific build configurations for your projects, including suppressing warnings about duplicate libraries when linking.

However, if you want similar settings to be available system-wide for compiles outside of Xcode, you could set equivalent flags in the LDFLAGS environment variable in your .zprofile.  However, it is important to understand that such changes could affect the compilation of all C or C++ projects that use this environment variable.

Greetings
Stefan

Mansour Ayouni

unread,
Mar 3, 2024, 8:26:09 AMMar 3
to stefan schaenzer, The Ring Programming Language
Hello Stefan,

Thank you a lot for this contribution!
I'm sure Mahmoud will include it in the documentation so others can benefit from...

All the best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.

stefan schaenzer

unread,
Mar 3, 2024, 8:26:51 AMMar 3
to The Ring Programming Language
Hi everyone,

I did some more tests with the resizing of GUIs. To achieve this, I always created a basic window with a message. I have described a problem with ring-QT here. Both my test program and the ring notepad usually crash without an error message when I change the size. According to my current research, it is not due to ring or Qt alone.

I was able to reproduce the same result when I created a GTK2 GUI app with D-Lang. Furthermore, a crash.

With Rust and GTK4, I have not had a crash. At least, this issue does not seem to exist there.

I suspect a relationship with macOS Sonoma and Xcode 15 and the supported renders under macOS. Older systems are probably not affected.

Apple has done us a real disservice with macOS Sonoma and Xcode 15. Unfortunately, you can't ignore the fact that more and more Mac users will switch to the latest version forever. But I have no reliable information about the cause or measures to counteract this. And Apple only seems to look as far as the horizon of its products.

I have also created a fairly extensive GUI app with the PureBasic (PB) programming language. I have no problems there, as it uses the native APIs for the GUI.

Furthermore, I also wanted to do a test with FreePascal (Lazarus), but there it already fails because you can't even compile a simple hello world app for the terminal with Lazarus. Thank you, Xcode 15! There is no workaround for Lazarus yet.

It is shocking that the issues have been present for almost 4 months and apple only points out that the developers have to adapt their code.

Finally, a question about this Ring group: Would it perhaps be helpful to introduce some subcategories for the forum? Something about Ring news, beginner questions, Os-specific issues, bugs ...?

Greetings
Stefan

Mahmoud Fayed

unread,
Mar 3, 2024, 8:46:09 AMMar 3
to The Ring Programming Language
Hello Stefan

Thanks for the useful details and information.

I did a little search, which lead to discovering the next topics. 

>> "Finally, a question about this Ring group: Would it perhaps be helpful to introduce some subcategories for the forum?"

I will check this, for now we have
(1) Ring Group for direct communication
(2) Ring Website - News Section: The Ring Programming Language (ring-lang.github.io) 
(3) Ring Documentation - Updated/Improved based on feedback in the Group: ring/documents at master · ring-lang/ring (github.com) 

Greetings,
Mahmoud

Outnull

unread,
Mar 4, 2024, 10:09:33 AMMar 4
to The Ring Programming Language
Hello Mahmoud,

You're correct that I first encountered Ring in 2022, and at the time was using a Windows machine. Back then, I had only a cursory look at Ring, so for all intents and purposes consider myself a new user. The comments I provided about the onboarding experience as it pertains to macOS still apply. You may still think of me as a "new user" :)

Thanks Stefan for the detailed write-up. I'll use it to try again.

But first, how do I remove everything my prior attempts have installed to my machine? I'm concerned this has muddied the waters, so any future attempts may be contaminated by old files, since I cannot find an "uninstaller" to clean up previous installations.

Regards,
ON

Outnull

unread,
Mar 4, 2024, 3:05:21 PMMar 4
to The Ring Programming Language
Please disregard the comment about cleaning up old installs, I found a uninstall.sh and will try running that first. 

Thank you,
ON

Mansour Ayouni

unread,
Mar 4, 2024, 3:26:45 PMMar 4
to Outnull, The Ring Programming Language
Hello Outnull,

Keep going and tell us the good news...

One day I'll be switching to the Mac world ;)

Best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.

Outnull

unread,
Mar 4, 2024, 6:34:33 PMMar 4
to The Ring Programming Language
Hi Mansour, 

I appreciate your encouragement and wish I had good news to report, but I followed Stefan's steps and ran into all of the same issues identified above. I tried both building from source and using the download from the website. Ring itself works and so does ringrepl, but using ringnotepad and ringpm still do not. I think the issues may stem from install.sh, which produces many errors that were not resolved by the suggestions in this thread so far.  

CleanShot 2024-03-04 at 17.23.13@2x.png
( I can open ring after this step)

I can't use ringpm:
CleanShot 2024-03-04 at 14.48.35@2x.png

I can't use ringnotepad:
CleanShot 2024-03-04 at 14.52.10@2x.png

Am open to suggestions on next steps if anyone has them.

Thanks, 
ON

Outnull

unread,
Mar 4, 2024, 6:41:56 PMMar 4
to The Ring Programming Language
Also, I tried downloading Ring 1.19 (Light Release - Source Code - All Platforms) and I got the following error while trying to install. It was just a test to see if I got a different outcome.

CleanShot 2024-03-04 at 17.39.43@2x.png

Regards, 
ON

Ilir Liburn

unread,
Mar 4, 2024, 6:54:13 PMMar 4
to The Ring Programming Language
Hello ON,

you are constantly getting error message "not a directory". Do you have /usr/local/lib as directory and/or permissions set?

When you run ./install.sh do you use sudo command to get elevated privileges?

Greetings,
Ilir

Outnull

unread,
Mar 4, 2024, 10:04:09 PMMar 4
to The Ring Programming Language
Hello Ilir, 

Yes, I am using sudo.

/usr/local/lib is not directory, it is a symlink:

CleanShot 2024-03-04 at 21.02.11@2x.png

Thank you, 
ON

stefan schaenzer

unread,
Mar 5, 2024, 6:56:37 AMMar 5
to The Ring Programming Language
Hello ON,

please check whether the symbolic link of libring.dylib in the /usr/local/lib directory correctly points to the libring.dylib of your Ring installation, e.g. /Users/<your user>/ring/lib/libring.dylib

If not, then check if the libring.dylib is present in your Ring installation. If not and you have created Ring from the source, then something has gone wrong. However, if you are using the "finished" installation, then libring.dylib should be present and the link may not be set correctly. This can happen if a manual installation has not been carried out correctly.

If there is no good reason, you should not perform a manual installation, especially at the beginning, but use the package at https://github.com/ring-lang/ring/releases/download/v1.19/Fayed_Ring_1.19_macOS.zip.

Greetings
Stefan

Ilir Liburn

unread,
Mar 5, 2024, 7:22:25 AMMar 5
to The Ring Programming Language
Hello ON,

>> /usr/local/lib is not directory, it is a symlink

That's definitively wrong, it should be directory with individual symbolic links. Because you have other software installed on your system, not just Ring.
Anyway, it seems your entire lib directory is a symlink to /Users/<user>/Downloads/ring/lib/libring.dylib

Greetings,
Ilir

stefan schaenzer

unread,
Mar 5, 2024, 7:42:55 AMMar 5
to The Ring Programming Language
Hello ON,

as I can see from your screenshot, you have put a link to your ring installation in /usr/local/lib. This is not correct and is not done by the ring installation.

The /usr/local/lib directory on macOS is a part of the file system that is used to store libraries and supporting files that are not part of the default operating system but have been installed by users or administrators.

If you have accidentally created a symbolic link that replaces /usr/local/lib and the original directory is no longer directly accessible as a result, you can take the following steps to resolve the problem:

Removing the symbolic link: First, you should be able to remove the faulty symbolic link. Open the terminal and execute the command rm to delete the link. Be careful not to accidentally delete any other files or directories. The command could look like this:

sudo rm /usr/local/lib

You may need to use sudo to get the necessary permissions to delete the link.

Restoring the directory: If the original /usr/local/lib directory was actually deleted, you will need to recreate it. Use the mkdir command to restore the directory:

sudo mkdir /usr/local/lib

Restore the contents (if necessary): If you had files in the /usr/local/lib directory before creating the symbolic link, you will have to restore them from a backup or reinstall the appropriate software that used those files. If you are using Homebrew, it may help to reinstall the relevant packages to restore the lost libraries.

Check permissions: Make sure that the newly created directory has the correct permissions so that applications and services can access it as intended. Normally, you should be sure that the directory is owned by the root user and group and is readable by other users. The chmod and chown commands can be used for this:

sudo chown root:wheel /usr/local/lib
sudo chmod 755 /usr/local/lib

Greetings,
Stefan

Outnull

unread,
Mar 5, 2024, 9:30:41 AMMar 5
to The Ring Programming Language
Hello Stefan and Illir, 

Thanks for your assistance, I feel I've made some progress here but am still facing issues with loading dynamic libraries. Stefan, I've followed your steps, and here is what what my /usr/local/lib directory looks like now, which appears to be correct:

ls -l
total 36784
-rwxr-xr-x  1 root  wheel  3526940 Mar  5 08:01 libraylib.2.5.0.dylib
-rwxr-xr-x  1 root  wheel  3526940 Mar  5 08:01 libraylib.2.dylib
-rw-r--r--  1 root  wheel  6995288 Mar  5 08:01 libraylib.a
-rwxr-xr-x  1 root  wheel  3526940 Mar  5 08:01 libraylib.dylib
lrwxr-xr-x  1 root  wheel       52 Mar  5 08:01 libring.dylib -> /Users/user/Downloads/ring_website/lib/libring.dylib
lrwxr-xr-x  1 root  wheel       58 Mar  5 08:01 libring_cjson.dylib -> /Users/user/Downloads/ring_website/lib/libring_cjson.dylib
lrwxr-xr-x  1 root  wheel       66 Mar  5 08:01 libring_consolecolors.dylib -> /Users/user/Downloads/ring_website/lib/libring_consolecolors.dylib
lrwxr-xr-x  1 root  wheel       61 Mar  5 08:01 libring_freeglut.dylib -> /Users/user/Downloads/ring_website/lib/libring_freeglut.dylib
lrwxr-xr-x  1 root  wheel       60 Mar  5 08:01 libring_httplib.dylib -> /Users/user/Downloads/ring_website/lib/libring_httplib.dylib
lrwxr-xr-x  1 root  wheel       61 Mar  5 08:01 libring_internet.dylib -> /Users/user/Downloads/ring_website/lib/libring_internet.dylib
lrwxr-xr-x  1 root  wheel       60 Mar  5 08:01 libring_libcurl.dylib -> /Users/user/Downloads/ring_website/lib/libring_libcurl.dylib
lrwxr-xr-x  1 root  wheel       58 Mar  5 08:01 libring_libui.dylib -> /Users/user/Downloads/ring_website/lib/libring_libui.dylib
lrwxr-xr-x  1 root  wheel       59 Mar  5 08:01 libring_libzip.dylib -> /Users/user/Downloads/ring_website/lib/libring_libzip.dylib
lrwxr-xr-x  1 root  wheel       63 Mar  5 08:01 libring_murmurhash.dylib -> /Users/user/Downloads/ring_website/lib/libring_murmurhash.dylib
lrwxr-xr-x  1 root  wheel       58 Mar  5 08:01 libring_mysql.dylib -> /Users/user/Downloads/ring_website/lib/libring_mysql.dylib
lrwxr-xr-x  1 root  wheel       57 Mar  5 08:01 libring_odbc.dylib -> /Users/user/Downloads/ring_website/lib/libring_odbc.dylib
lrwxr-xr-x  1 root  wheel       61 Mar  5 08:01 libring_opengl21.dylib -> /Users/user/Downloads/ring_website/lib/libring_opengl21.dylib
lrwxr-xr-x  1 root  wheel       61 Mar  5 08:01 libring_opengl32.dylib -> /Users/user/Downloads/ring_website/lib/libring_opengl32.dylib
lrwxr-xr-x  1 root  wheel       60 Mar  5 08:01 libring_openssl.dylib -> /Users/user/Downloads/ring_website/lib/libring_openssl.dylib
lrwxr-xr-x  1 root  wheel       58 Mar  5 08:01 libring_pgsql.dylib -> /Users/user/Downloads/ring_website/lib/libring_pgsql.dylib
lrwxr-xr-x  1 root  wheel       60 Mar  5 08:01 libring_sockets.dylib -> /Users/user/Downloads/ring_website/lib/libring_sockets.dylib
lrwxr-xr-x  1 root  wheel       59 Mar  5 08:01 libring_sqlite.dylib -> /Users/user/Downloads/ring_website/lib/libring_sqlite.dylib
lrwxr-xr-x  1 root  wheel       61 Mar  5 08:01 libring_stbimage.dylib -> /Users/user/Downloads/ring_website/lib/libring_stbimage.dylib
lrwxr-xr-x  1 root  wheel       60 Mar  5 08:01 libring_threads.dylib -> /Users/user/Downloads/ring_website/lib/libring_threads.dylib
lrwxr-xr-x  1 root  wheel       55 Mar  5 08:01 libring_uv.dylib -> /Users/user/Downloads/ring_website/lib/libring_uv.dylib
lrwxr-xr-x  1 root  wheel       59 Mar  5 08:01 libringallegro.dylib -> /Users/user/Downloads/ring_website/lib/libringallegro.dylib
lrwxr-xr-x  1 root  wheel       54 Mar  5 08:01 libringqt.dylib -> /Users/user/Downloads/ring_website/lib/libringqt.dylib
lrwxr-xr-x  1 root  wheel       60 Mar  5 08:01 libringqt_light.dylib -> /Users/user/Downloads/ring_website/lib/libringqt_light.dylib
lrwxr-xr-x  1 root  wheel       58 Mar  5 08:01 libringraylib.dylib -> /Users/user/Downloads/ring_website/lib/libringraylib.dylib
-rw-r--r--  1 root  wheel   620568 Mar  5 08:01 libui.A.dylib
-rw-r--r--  1 root  wheel   620568 Mar  5 08:01 libui.dylib

I can load Ring and ringrepl 1.19 from the website, and now ringpm no longer produces a segfault, but you'll see I'm still having issues using any Ring code that relies on loading libraries:

CleanShot 2024-03-05 at 08.08.54@2x.png

CleanShot 2024-03-05 at 08.09.28@2x.png

In the case of rnote.ring, it fails to load librintqt.lib, despite the following symlink in usr/local/lib :

 libringqt.dylib -> /Users/user/Downloads/ring_website/lib/libringqt.dylib. Yes I have verified the existence of this file:

CleanShot 2024-03-05 at 08.28.03@2x.png

The same is true for ringpm, which fails to load libring_internet.dylib, which also has a symlink correctly established: 

libring_internet.dylib -> /Users/user/Downloads/ring_website/lib/libring_internet.dylib


So, I remain puzzled. It seems some progress has been made but things do not fully work yet. Since Mahmoud raised the point of a Windows installation, I got curious and spun up of Windows 11 VM to try installing Ring from the website (1.19). In about 30 seconds, I was up and running in RingNotepad without any errors whatsoever, which stands in pretty stark contrast to the experience on macOS.

Thanks all for your assistance up to this point,
ON

Ilir Liburn

unread,
Mar 5, 2024, 9:44:36 AMMar 5
to The Ring Programming Language
Hello ON,

it seems you are missing Ring extensions dependencies installation which you get by running ./installdepmac.sh inside the ring/language/src
Users/user/Downloads/ring_website/ path is telling me you haven't created user account under the Users, for example

Users/user/outnull

where you need to extract Ring archive to get ring subdirectory, e.g. Users/user/outnull/ring
From there you install Ring extensions dependencies and you run ./install.sh in bin directory

Greetings,
Ilir

Outnull

unread,
Mar 5, 2024, 10:05:15 PMMar 5
to The Ring Programming Language
Hi Ilir, 

I have in fact already run both ./installdepmac.sh and /ring/bin/install.sh

>> Users/user/Downloads/ring_website/ path is telling me you haven't created user account under the Users, for example
>> Users/user/outnull

You may have gotten confused by the path because I edited my actual OS username of it and replaced it with 'user' here. The actual path on my system is

  ~/Downloads/ring_website

Or alternatively: 

/Users/myrealusername/Downloads/ring_website

>> From there you install Ring extensions dependencies

 I've already run ~/Downloads/ring_website/bin/install.sh which results in this:

CleanShot 2024-03-05 at 20.58.36@2x.png

I don't think these xattr "warnings" matter though, because none of the files in /usr/local/bin or /usr/local/lib have any
extended attributes set: xattr * returns nothing.

Regards,
ON

Ilir Liburn

unread,
Mar 6, 2024, 9:35:47 AMMar 6
to The Ring Programming Language
Hello ON,

>> /Users/myrealusername/Downloads/ring_website

OK, but you never know if relative paths are used in any case (for example ~/ring/)

>> I don't think these xattr "warnings" matter though

Not on older Macs.

Greetings,
Ilir

stefan schaenzer

unread,
Mar 7, 2024, 9:48:15 AMMar 7
to The Ring Programming Language
Hello everyone,

there is news about the crash in GUI apps when the window size is changed.

After updating the Xcode Command Line Tools to Xcode 15.3 (build version 15E204a), the problems with the crashes in the GUI have not occurred with my test apps so far (neither with Ring with guilib.ring nor with a test app that I created in D lang that uses GTK3). 

Unfortunately, Rnote still crashes when I make the window smaller from the bottom left. It is interesting to note that there is no crash when I set win1.setMinimumSize(30, 20) in rnotecontroller.ring. With other ratios or values that I have tried, it crashes again. Very strange.

When I create an executable app of rnote with Ring3Exe, I get the following message on the console when I run rnote: "2024-03-07 15:38:01.545 rnote[40428:1201750] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:."

Greetings,
Stefan

Mahmoud Fayed

unread,
Mar 8, 2024, 8:41:42 PMMar 8
to The Ring Programming Language
Hello Stefan

>> "After updating the Xcode Command Line Tools to Xcode 15.3 (build version 15E204a), the problems with the crashes in the GUI have not occurred with my test apps so far (neither with Ring with guilib.ring nor with a test app that I created in D lang that uses GTK3). "

VERY GOOD NEWS, Thanks for sharing :D

>> "Unfortunately, Rnote still crashes when I make the window smaller from the bottom left. It is interesting to note that there is no crash when I set win1.setMinimumSize(30, 20) in rnotecontroller.ring. With other ratios or values that I have tried, it crashes again. Very strange."

Looks like a related issue, but the workaround is simple :D

>> "When I create an executable app of rnote with Ring3Exe, I get the following message on the console when I run rnote: "2024-03-07 15:38:01.545 rnote[40428:1201750] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.""


Greetings,
Mahmoud

Mahmoud Fayed

unread,
Apr 2, 2024, 12:16:45 AMApr 2
to The Ring Programming Language
Hello Stefan

Thanks for sharing useful information about using Ring in macOS

Ring Notepad is updated in Ring 1.20 to use fonts supported by the Operating System

Also, your suggestion about setting the minimu window size is applied:  ring/tools/ringnotepad/src/rnotecontroller.ring at master · ring-lang/ring (github.com)

Greetings,
Mahmoud

On Monday, February 12, 2024 at 12:17:29 PM UTC+3 stefan.s...@mailbox.org wrote:
Hello everyone,

I'm just getting started with Ring, and I'm having some problems on macOS.

Build from Source failed

I tried to build Ring from the source files. I got numerous warnings during the build process (often indicating that deprecated functions are being used), but no error messages.

Unfortunately, I got an error message when I subsequently called "$ ring rnote.ring".

Error message:

sudo ring rnote.ring

Library File : libringqt.dylib
Line 8 Error (R38) : Runtime Error in loading the dynamic library
In loadlib() In function loadlibfile() in file /Users/myuser/ring/libraries/guilib/loadlibfile.ring
called from line 11 in file rnote.ring

I then used the " ready to use" package "Binary release for macOS 64 bit" from the home page and it worked.

Missing fonts

When I start Ring Notepad with:

$ ring rnote.ring

I get the following message:

qt.qpa.fonts: Populating font family aliases took 159 ms. Replace uses of missing font family "Consolas" with one that exists to avoid this cost.

The error message indicates that when starting the Ring application (specifically with rnote), the Qt framework is trying to use the font "Consolas", but it is not available or correctly installed on your system. The lack of this font causes Qt to take extra time to find and assign replacement fonts, which delays the launch of the application.

I was able to fix this message with:

Download the Consolas font from http://www.fontpalace.com/font-details/Consolas/
Open Finder and navigate to Downloads directory
Double click the Consolas.ttf file
A dialog box appears displaying the details about the font
Click Install font button

The same applies to font family "Roboto".

If both fonts are installed, the message disappears.

Displaylink Crash Ring Notepad

I have an environment with two external monitors controlled by Displaylink Manager. I was able to identify Displaylink as the cause of sporadic, but frequent, crashes of Ring Notepad and other applications. Unfortunately, even a driver update did not bring any improvement. The only remedy was to connect it directly to my Macbook Pro.

Research has shown that other users with different applications and development tools also have problems with Displaylink. I suspect that the issues are caused by the implementation of the Displaylink display as a large virtual desktop and that the resolution for the rendering/display functions leads to the issues. There may be a solution for QT.

Can't Center Window

Furthermore, in connection with the virtual desktop across two to three monitors, my issue may be that I was unable to center a window on the primary display. Vertical centering worked, but horizontal centering did not. The window was always displayed at the far-right edge of the screen.

I was able to solve it like this (code excerpt):

// center the window
// create a new desktop widget
oDesktop = new qDesktopWidget()

// get the available geometry of the main window
geo=oDesktop.availableGeometry(oMainWindow)

see "width: " + geo.width() + nl
see "height: " + geo.height() + nl

// calculate the new ceter position of the main window
nNewX = ( geo.width() - oMainWindow.width() ) / 2
nNewY = ( geo.height() - oMainWindow.height() ) / 2

// set the new position of the main window
oMainWindow.move(nNewX, nNewY)

// show the main window
oMainWindow.show()

Technical data of my environment

macOS Sonoma 14.2.1 (Intel)
Ring 1.19 For macOS (64bit)

Maybe these are useful suggestions to improve the quality or help other users who have similar issues.

Greetings
Stefan
Reply all
Reply to author
Forward
0 new messages