LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2012, 09:59 AM   #1
rmknox
Member
 
Registered: May 2010
Posts: 354

Rep: Reputation: 34
lost in LA - Fedora 14, OpenGL, pyglet - oh my!


I have downloaded and am having trouble trying to run a program from http://brainworkshop.sourceforge.net/. I run Fedora 14.

I am here with the hope that someone who has experience with python and OpenGL and GLUT and pyglet could give me some suggestions.

This is my first exposure to python and OpenGL and GLUT and pyglet.

I am educating myself using material from
http://docs.python.org.
http://www.videotutorialsrock.com/op...linux/home.php
http://pyglet.org/documentation.html

I ran glxinfo and see that I have direct rendering

According to the tutorial on brainworkshop I can tell whether my system is adaquately configured by looking in /usr/include/GL to see whether gl.h and glut.h are there. I have gl.h but not glut.h. Yum tells me that I have freeglut (from http://freeglut.sourceforge.net) which YUM says is equivalent.

After 3 days of trying to work my way through the brainworkshop program, I decided to see if I could run the pyglet samples from pyglet.org. Have not been successful there either,

When I try to run brainworkshop it initializes variables and then tries to create a window. It tries to create an instance of class MyWindow. In the process it calls a function named glx.glXGetVisualFromFBConfig, which returns an empty vector instead of the contents expected. When I look for glXGetVisualFromFBConfig I see that it is a variable that holds the result returned from a function named _link_function.

grep -i -r -w _link_function * shows _link_function used many times

At various locations various functions are imported as_link_function. At one spot None is assigned. Thus far I have not been successful in finding what function goes under that name when the problem occurs.

I am starting to wonder whether maybe the options in brainworkshop dont apply to Fedora.

Based on a little more research, pyglet.GL.glx.py has a statement
glXGetVisualFromFBConfig = _link_function('glXGetVisualFromFBConfig', POINTER(XVisualInfo), [POINTER(Display), GLXFBConfig], 'VERSION_1_3')

where _link_function points to link_GL in lib_glx.py

I dont understand it well enough, but I believe this statment is incompatible with my environment.

Last edited by rmknox; 04-25-2012 at 01:45 PM.
 
Old 04-25-2012, 09:31 PM   #2
hydraMax
Member
 
Registered: Jul 2010
Location: Skynet
Distribution: Debian + Emacs
Posts: 467
Blog Entries: 60

Rep: Reputation: 51
Regarding the first issue: Do you just have the "freeglut" package installed, or do you also have the "freeglut-devel" package installed? The -devel package is typically the one that contains the header files. (Because non-developers don't need them.)
 
1 members found this post helpful.
Old 04-25-2012, 09:35 PM   #3
jayceww
LQ Newbie
 
Registered: Apr 2012
Posts: 1

Rep: Reputation: 0
i do not know ..
 
Old 04-26-2012, 02:47 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
fedora 14 is past it's END OF LIFE
there is no support for it .
If you are going to use fedora then PLEASE stay current and install fedora 16 or in a few weeks fedora 17

also from the site you listed it uses python 2.5
fedora 14 has Python2.7.8
you most likely will need to install the old python 2.5 alongside the old 2.7.8
but seeing as fedora 14 is EOL most of the mirrors have been deleted


also fedora already has something like that installed with the "gnome-games"
or
in the standard fedora repo .It is called gbrainy

also
http://sourceforge.net/projects/brai...orkshop%204.8/
this was last updated in 2010
and will likley need hacking to build with the then current gcc 4.5

Last edited by John VV; 04-26-2012 at 02:51 AM.
 
1 members found this post helpful.
Old 04-26-2012, 08:37 AM   #5
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
hydraMAx - thanks - will get it

JOhn - re fedora 14 etc - I put 16 on my wifes computer and wish I had not. I just dont have the time to fix all the stuff that the change will bring to my computer - since I use mine to do work. I dont think I have "fedora" issues, but I und=nderstand your comment.

re python version - thanks for the heads up

re gbrainy - Fantastic! I'll get on it immediamente.

re gcc version - again thanks for the heads up

I have made some progess finding the solutio to my problem. It looks to me that the brainworkshop program assumes the user has a double buffered display system and that on my system the op sys does rendering without a special driver and is single buffered. I've found some resources that explain the issues regarding glXGetVisualFromFBConfig

https://www.opengl.org/sdk/docs/man/...omFBConfig.xml

http://publib.boulder.ibm.com/infoce...omFBConfig.htm

https://www.opengl.org/sdk/docs/man/xhtml/glXIntro.xml

My problem at this instant is that I dont have sufficient comand of python to make the change I'd like to try regarding buffereing - but I'm getting close. there is a function builder used here called _link_function. Apparenty it builds a python wrapper for a compiled function that exists. The result is that in python one can use procedures - perhaps compiled from c - and there are procedures like glXGetVisualFromFBConfig which one uses to interact with the display. Poco a poca estoy apriendo. My hope is that the program has some hard coded assumptions about the display system - which must be ok in most situations - and that I can generaliuze it.
BUT
If gbrainy is here and does the same thing - I'm eager to try it.
Why - because I'm turning 80 and getting forgetful and hope to keep the old neuron based computer running well as long as possible.

Thanks

Dick

p.s. - I downloaded gbrainy - it is impressive - and thanks. I'll play with it while I try to get brainworkshop running. Brainwirkshop works fine on my other disk (microsoft) but I need to reboot when I want to run it - and I much prefer to be in linux and thus currently boot the microsoft disk only when I want to do the brainworkshop program.

Last edited by rmknox; 04-26-2012 at 08:55 AM.
 
Old 04-29-2012, 08:51 PM   #6
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
I've concluded that fedora 14 has a problem

The brain... / python thing failed when a certain system call was made

I downloaded an openGL example written in c - compiled and linked it - and it failed at exactly the same system call. The c progrm hqs a segment fault. The python routine -- a wrapper for the system routine - returns a null vector - no doubt the wrapper catches the esception and returns a null.

So - like it or not - I may switch to fedora 16. I tried both the python/brain thieng and the c thing on fedora 16 and they work fine there.
 
Old 04-29-2012, 09:42 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
it "should "build
and installing a OLD python along side the current one is easy
and almost a MUST do with fedora
( not many programs will use the version that the current fedora uses )

python is meant , like gcc is, to have a few different versions installed

Quote:
I've concluded that fedora 14 has a problem
seeing as it is past END OF LIFE and fedora15 will hit EOL in less than 2 months

in fedora it is very common to have a second python installed to -- say
/usr/lib64/python25
then export that folder to the program that needs it
 
Old 04-30-2012, 07:23 AM   #8
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
Hi John
THanks for your suggestions and advice

It appears to me that the problem is not in python but at some deeper level, but thanks for the python pointers.

When python executes a wrapper for glXGetVisualFromFBConfig the wrapper returns a null vector.

When a test program written in C executes glXGetVisualFromFBConfig I get a segment fault!

When I move the executable of the c program to my wifes fedora 16 machine it abends there also - but if I compile it on her machine it runs ok. When I run the brain.../python thing on her system it runs fine.

Makes me think the openGL *.so files on the fedora system are defective - particularly whichever has 'glXGetVisualFromFBConfig. I note that my wifes system has different version numbers of the LIBS = -lX11 -lGL -lGLU

I see you do not use Fedora - you're obviously savvy - would I be better off with the operating sytems you use?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 6 OpenGL cheerful Linux - Software 4 01-14-2010 02:27 PM
[SOLVED] Fedora 11 - Where are the OpenGL headers? TobsterUK Programming 4 11-29-2009 05:06 PM
opengl on fedora divya111 Linux - Software 3 10-16-2009 01:54 PM
I upgraded Fedora 3 to Fedora 4 and only lost half a head of hair! dlowery LinuxQuestions.org Member Success Stories 0 04-17-2006 05:44 PM
I lost my openGL support! digital bots Slackware 0 09-02-2002 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration