SOLVED: OpenSCAD doesn't work on Nomad, nor does FreeCAD

Another disappointment. OpenSCAD will open, but will not get past welcome screen. FreeCAD works, but I really wanted to learn OpenSCAD. Guess I’ll have to do that on my Arch Linux box.

UPDATE: I spoke too soon. FreeCAD doesn’t work either. The start page comes up, and I can save a new file, but the file will not open and nothing works.

Very disappointing. If I figure it out, I’ll post the solution.

So…
Here’s the error message I’m getting upon starting OpenSCAD:

tony@NomadBSD$ openscad
QOpenGLContext::makeCurrent() called with non-opengl surface 0x809fbee10
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed

I’ll start troubleshooting and see what I come up with. Any help with this would be appreciated.

And here’s where it locks up on FreeCAD:

20:24:52  Traceback (most recent call last):
20:24:52    File "/usr/local/FreeCAD/Mod/Tux/NavigationIndicatorGui.py", line 488, in setCurrent
20:24:52      def setCurrent():
20:24:52  KeyboardInterrupt

Keyboard interrupt was where I ^c to get it to stop and print what it was doing when it stuck. The messages for both OpenSCAD and FreeCAD seem to show a similar issue.

I apologize for responding to this after such a long wait. I have some dev projects I’m working on so I cant frequent this forum as much as I’d like to at the moment but maybe we can figure this out.

I just installed openscad. I’m not experiencing the same issues. I searched opengl in octopkg and it seems I have qt5-opengl, mesa-libs, mesa-dri, glew, libGLU, libgltf, libepoxy installed. I’m not sure what openscad relies on but can you compare this list to what you have installed when searching opengl in there and see if installing any of them, if you are missing any, helps you? Just keep me posted and I’ll see if we can get it working. Also, what hardware are you running on?

Thank you for looking in on us!
dmesg | less:

Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
VT(efifb): resolution 1920x1080
CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (2400.00-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406e3  Family=0x6  Model=0x4e  Stepping=3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x121<LAHF,ABM,Prefetch>
  Structured Extended Features=0x29c67af<FSGSBASE,TSCADJ,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,NFPUSG,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PROCTRACE>
  Structured Extended Features3=0xbc002e00<MCUOPT,MD_CLEAR,TSXFA,IBPB,STIBP,L1DFL,ARCH_CAP,SSBD>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  IA32_ARCH_CAPS=0xc04<RSBA>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics

I have Nomad installed to the SSD on my Dell 2-in-1 7569 laptop, 16G ram, 1TB Sata m.2 SSD.

I searched opengl in Octopkg and I have all the same dependencies installed, with an additional one: ftgl.

Now, just for clarity, the OpenSCAD welcome box opens, but when I try to open a file from it, or any of the examples, I can see a top bar for the window, but nothing appears in it. I can see that the program is running, but nothing appears on the screen. The error message I gave you was from opening OpenSCAD from terminal, clicking on a file to open, then clicking on the top bar in Nomad to open the window. Same results as opening it from the Applications menu.

I was doing some research into similar issues other people have had, with other programs, that have caused similar issues. Do you have qt5 installed? It seems as though some people have had success with either qt4 or qt5 in fixing similar issues as the different versions support different ways to call opengl stuff. I’ll keep looking for more solutions. If you haven’t yet it may be worth checking for both application and freebsd updates as well.

For me FreeCAD 0.19.4 is working on my fully updated NomadBSD 130R-2021 (still FreeBSD 13.0).
I’m able to load an example-file modify it, save it, close everything and open the modified file again with success.

Regarding qt5 - a lot is installed from the get-go (~44 packages).

This comming weekend I’m hoping to get time to upgrade to FreeBSD 13.1 - and will report if it should break FreeCAD

[Edit]
OK, starting a FreeCAD install on a vanilla NomadBSD-USB-stick upgraded to 13.1 before leaving for the night:

> sudo pkg install freecad
Number of packages to be installed: 59
[snip]
The process will require 2 GiB more space.
453 MiB to be downloaded.

Proceed with this action? [y/N] y

Wow o_O

I’ve been told building it from ports is an over-nighter!

Failure to install FreeCAD on a 16Gb USB vanilla NomadBSD install upgraded to 13.1.

The install filled up the USB drive and choked during the 55th package out of 59.
That doesn’t make sense - there was plenty of space before…
There must be a lot of small files…?

> df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/label/nomadroot 3.4G 3.1G -18M 101% / (filled up during 13.1-upgrade, but without an error)
[snip]
/dev/label/nomaddata.eli 11G 11G -797M 108% /data (filled up during FreeCAD-install)

I installed qt5 and reinstalled FreeCAD, but no change. I get the start page, I can open and save new project files, but cannot close the start page or open a window to work on a new project. I can navigate to the various preference and settings pages and they seem to be working, but I cannot get off the start page. None of the sliders or close/min/max buttons work on the start page windows.

No change either on OpenSCAD. I get the welcome window, but when I select an example file I can see a top bar for the window, but no window content appears, just the top bar.

Ok. New development. I just booted my laptop from the NomadBSD USB install and both FreeCAD and OpenSCAD started flawlessly. Kdenlive also started without issue.

So, apparently it is the translation from the USB install to the full install on the SSD that causes the issue. I expect it’s simply a path issue, so that’s where I’ll start looking. I’m not very savvy at this kind of stuff, so any coaching would be appreciated.

It seems like it may be the same issue that is in another thread posted around the same time. A fill reinstall of just thst package by either uninstalling and reinstalling or just forcing the package to install again may work. I think its either a file copying issue or possibly permissions. If you try one of the methods please report back to let me know of the results. If it works I’ll try to get time to write a script or something to mitigate the issue going forward and post it here.

Reinstalling with the -f flag did not correct the situation. I previously uninstalled/reinstalled the three packages in question several times with no success. Uninstalling/reinstalling worked for the issue I had with Thunderbird, but not for FreeCAD, OpenSCAD, or Kdenlive.

After careful consideration, I decided that since I seem to be the only one with this particular issue and since it affects several applications, and since those applications run on my USB Nomad install, I must have messed something up in configuring my SSD NomadBSD install to suit my needs/tastes and that must be why several applications will not run on my system. I decided to reinstall from my USB and see what happens.

The install is complete, I updated packages, and I installed OpenSCAD first thing. It runs. I am installing FreeBSD-src as I type this. Once that’s done, I’ll continue with installation of FreeCAD and kdenlive and report the results.

UPDATE: All three applications, FreeCAD, OpenSCAD, and kdenlive are now working. So there was something in my configuration that was at fault.

I’ll mark this thread SOLVED.

I might add another possible source of problems, that happened to me some time ago. It might not be in your case @tthenrie , but I had similar problem with Blender not working on my Intel graphic card system. Problem was as I found on FreeBSD forums, that this can happen if you have nVidia drivers installed on system. I did have 340 series drivers installed, because that was graphic card I used for a while, befor switching to onboard graphic. Since nvidia ships with slightly modified opengl library, that can wreck havoc in some apps. Solution is do uninstall nvidia drivers.

2 Likes