versor
versor copied to clipboard
Problem with glut on Fedora 35
Hi,
beside other things I have a problem with glut to build the examples.
Firstly, i had to include -lglut to versor/build/CMakeFiles/xBasic.dir/link.txt to resolve symbols with glutXXX.
When I run the application it says: freeglut ERROR: Function <glutSolidSphere> called without first calling 'glutInit' and stops running.
I have similar problems with other examples.
The functions of glut are referenced in versor/ext/gfx/gfx/gfx:glyphs.h, which is included in versor/include/vsr/draw/vsr_XXX_draw.h etc.
What is going wrong?
I recently swapped in GLFW for Glut on the windowing side due to hyper-resolution issues with newer mac screens.
Looks like on Mac glutInit
is still called (allowing glutSolidSphere
to work) but not so on Linux. I have a branch bug28-linux-graphics-glfw
which calls glutInit when initializing GLFW window -- I am unable to test on Linux but perhaps you could? On mac, this causes a "double init" of Glut, but I haven't determined where the first init happens.
Understood. I cloned the bug28-linux-graphics-glfw and made some minor changes (lambdas in .h-files result in multiple references which the GCC linker apparently doesn't allow and I have to declare them const). Again I added manually -lglut to the link.txt's. Some graphical examples still run correctly as before like xMotor. Those who stopped because of the missing glutInit now crash with a Segmentation fault (core dumped).
The crashes happen immediately after opening the graphical window. If you want me to do further tests I would recommend to work on one specific example.
you could try a different branch -- bug28-linux-graphics-glut -- which just avoids using GLFW altogher
I'll take a look. I'm not yet familiar with these graphics libraries, but perhaps I'll try to figure it out for myself over time.
There is no difference to run the examples of bug28-linux-graphics-glut or bug28-linux-graphics-glfw. The same binaries crash. During make the following the warning "Policy CMP0072 is not set" is shown, which is related to graphics libraries (for all branches I have tested so far).
Attached you can find some output of cmake to get an overview of the configuration cmake.log .
Are you able to run in gdb and share the backtrace from the crash?
On Fri, Jan 28, 2022 at 5:10 AM StumpfMichael @.***> wrote:
Attached you can find some output of cmake to get an overview of the configuration cmake.log https://github.com/wolftype/versor/files/7957713/cmake.log .
— Reply to this email directly, view it on GitHub https://github.com/wolftype/versor/issues/28#issuecomment-1024067516, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIRQX7QNDGWU4N4D4QYLKLUYJTQTANCNFSM5M33LK2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I built the bug28-linux-graphics-glfw branch on Ubuntu 20.04 (Hyper-V VM on Windows 10) and I am seeing a circle, plane, and sphere when I use ./run.sh examples/xBasic.cpp
.
Maybe its a version issue for a library dependency? Here's a list my package dependencies as listed in .circleci/config.yml
.
libxrandr-dev | 2:1.5.2-0ubuntu1 | http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libxinerama-dev | 2:1.1.4-2 | http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libxcursor-dev | 1:1.2.0-2 | http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libglew-dev | 2.1.0-4 | http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
freeglut3-dev | 2.8.1-3 | http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
libxi-dev | 2:1.7.10-0ubuntu1 | http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libxmu-dev | 2:1.1.3-0ubuntu1 | http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
Ok, let us concentrate on xBasic. I'll create a VM with the latest Ubuntu release and experiment with both OS's.
These are the corresponding packages on Fedora 35: libXrandr-devel-1.5.2-7.fc35.x86_64 libXinerama-devel-1.1.4-9.fc35.x86_64 libXcursor-devel-1.2.0-6.fc35.x86_64 glew-devel-2.1.0-10.fc35.x86_64 freeglut-devel-3.2.1-10.fc35.x86_64 libXi-devel-1.7.10-7.fc35.x86_64 libXmu-devel-1.1.3-7.fc35.x86_64
There is a difference of the freeglut version: (see: http://freeglut.sourceforge.net/)
ubuntu 20.04: 2.8.1 from 04/05/2013 fedora 35: 3.2.1 from 09/29/2019
There you can find the reason for not updating freeglut on Debian/Ubuntu: https://sourceforge.net/p/freeglut/bugs/255/ I'll investigate, if it is related to the crash of versor's examples.
I downloaded the sources from freeglut 3.2.1 and applied the following patch: https://sourceforge.net/p/freeglut/code/1868/ Unfortunately the binaries of both branches still crash.
I downloaded the sources from freeglut 2.8.1. and installed the library on Fedora 35. xBasic does indeed run, but the other ones still crash. I'll run tests on Ubuntu 20.
I installed both branches on Ubuntu 20. There the examples do not crash at all. The installation was smoother (-lglut is already included, etc.). As far as I can tell the examples of bug28-linux-graphics-glfw work without major problems. Only when you click inside the window of xRoot the graphics disappear. The examples of bug28-linux-graphics-glut have more graphical problems. Sometimes you see nothing or only fragments. The linker complained four symbols (is_positive, has_inner, has_outer, Flip). I had to comment out line 14-16 of InstructionTest.cpp and line 42 of Product Test.cpp. I feel comfortable with Ubuntu and have no intention to fix problems of Fedora. Thank you for the support here. From my point of view the issue can be closed.
Thanks for the thoroughness here. One quick question if you have the time: how does devel branch behave on Ubuntu 20?
On Sun, Jan 30, 2022 at 5:53 AM StumpfMichael @.***> wrote:
I installed both branches on Ubuntu 20. There the examples do not crash at all. The installation was smoother (-lglut is already included, etc.). As far as I can tell the examples of bug28-linux-graphics-glfw work without major problems. Only when you click inside the window of xRoot the graphics disappear. The examples of bug28-linux-graphics-glut have more graphical problems. Sometimes you see nothing or only fragments. The linker complained four symbols (is_positive, has_inner, has_outer, Flip). I had to comment out line 14-16 of InstructionTest.cpp and line 42 of Product Test.cpp. I feel comfortable with Ubuntu and have no intention to fix problems of Fedora. Thank you for the support here. From my point of view the issue can be closed.
— Reply to this email directly, view it on GitHub https://github.com/wolftype/versor/issues/28#issuecomment-1025117144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIRQXYIXQ5D7AFHD3Z3MKLUYUKBZANCNFSM5M33LK2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
In the devel branch some binaries stop with the comment "freeglut ERROR: Function <glutSolidSphere> called without first calling 'GlutXXX'", with XXX being either SolidCone, SolidSphere or WireSphere. Those are xBasic, xFabricChain, xFabricChainConstrained,, xField, xMeet, xPointToCircle, xRobotArm and xTorusKnot. The others work well. In the bug28 branches xRawGlut shows a second triangle with flicker, in devel it is one clear triangle.
Sorry, the error message is slightly different: freeglut ERROR: Function <glutXXX> called without first calling 'glutInit'.
thanks -- re-opening issue as others are experiencing trouble on windows. i have a new branch bug28-remove-glut
which removes glut calls and replaces the glutXXX calls with standardd render calls. so no needd for initiatialization. examples/xTorusKnot
is a good example to try, as it attempts rendering both in immediate mode and "advanced" programmable render mode.
On Ubuntu 20 all the examples run very well. On Fedora 35 even xTorusKnot still crashes.