1. opengl on linux.

I've tried a few things on this, and started going round in circles on google. To cut a long story short,

$ locate -e libGL.so 
/usr/lib/i386-linux-gnu/libGL.so 
/usr/lib/i386-linux-gnu/mesa/libGL.so 
/usr/lib/i386-linux-gnu/mesa/libGL.so.1 
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 
However:
$ ./phix demo/pGUI/gears.exw 
Error! Can't find /usr/lib/x86_64-linux-gnu/libGL.soError! Can't find glAccum(). 
Press any key.. 
I have no idea where it is getting x86_64-linux-gnu from, no such directory, it is a 32 bit OS (Ubuntu running in VirtualBox on a 64-bit machine)

Any ideas?

Pete

new topic     » topic index » view message » categorize

2. Re: opengl on linux.

What happens when you run this?

$ LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ ./phix demo/pGUI/gears.exw 

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: opengl on linux.

ghaberek said...

What happens when you run this?

$ LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ ./phix demo/pGUI/gears.exw 

-Greg

No change. As I understand it, Ubuntu does not like LD_LIBRARY_PATH anyway, and you have to use /etc/ld.so.conf.d, which in my case contains 3 files:

i386-linux-gnu_GL.conf:  
/usr/lib/i386-linux-gnu/mesa 
 
i686-linux-gnu.conf: 
# Multiarch support 
/lib/i386-linux-gnu 
/usr/lib/i386-linux-gnu 
/lib/i686-linux-gnu 
/usr/lib/i686-linux-gnu 
 
libc.conf: 
# libc default configuration 
/usr/local/lib 
Which ought to cover it... but it don't (even after re-running sudo ldconfig)

I have just run an strace (damn report had 140,000 pigging getpid() in it) and at the end of it:

open("/home/pete/phix/demo/pGUI/pfindany.e", O_RDONLY) = -1 ENOENT (No such file or directory) 
open("/home/pete/phix/pfindany.e", O_RDONLY) = -1 ENOENT (No such file or directory) 
open("/home/pete/phix/builtins/VM/pfindany.e", O_RDONLY) = -1 ENOENT (No such file or directory) 
open("/home/pete/phix/builtins/pfindany.e", O_RDONLY) = 3 
_llseek(3, 0, [0], SEEK_SET)            = 0 
fstat64(3, {st_mode=S_IFREG|0777, st_size=425, ...}) = 0 
read(3, "--\r\n-- pfindany.e\r\n--\r\n--  Phix "..., 425) = 425 
close(3)                                = 0 
brk(0x90c2000)                          = 0x90c2000 
brk(0x90e3000)                          = 0x90e3000 
brk(0x910d000)                          = 0x910d000 
mmap2(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x971000 
mmap2(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43c000 
getcwd("/home/pete/phix", 512)          = 16 
chdir("/home/pete/phix/demo/pGUI/")     = 0 
time(NULL)                              = 1480359050 
open("/usr/lib/x86_64-linux-gnu/libGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
write(1, "Error! Can't find /usr/lib/x86_6"..., 52) = 52 
write(1, "Error! Can't find glAccum().\nPre"..., 44) = 44 
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig -icanon -echo ...}) = 0 
read(0, "\n", 1)                        = 1 
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0 
_exit(0)                                = ? 
So I can see ptok.e having a good hunt around for pfindany.e, then pemit2.e allocating space for code and data, then pGUI.e doing it's chdir, then it ought to be open_dll("libiup.so"), via libdl/dlopen, going straight for a directory which does not exist, is not in the list of places where I think it should be looking, and giving up immediately. I have found "libGL.so.1" (but absolutely no sign of that path) hiding in libiupgl.so, which I am opening a bit later, maybe the strace is not showing dlopen that hit the cache? Anyway, still completely stuck. Maybe I need to create /usr/lib/x86_64-linux-gnu and put a softlink(?) in it? Which is also still a bit above my pay grade.

new topic     » goto parent     » topic index » view message » categorize

4. Re: opengl on linux.

petelomax said...

Anyway, still completely stuck.

I am at a loss as well. Not sure what else to suggest. sad

petelomax said...

Maybe I need to create /usr/lib/x86_64-linux-gnu and put a softlink(?) in it? Which is also still a bit above my pay grade.

That I can help with. grin

$ mkdir /usr/lib/x86_64-linux-gnu 
$ cd /usr/lib/x86_64-linux-gnu 
$ ln -s ../i386-linux-gnu/libGL.so 

-Greg

new topic     » goto parent     » topic index » view message » categorize

5. Re: opengl on linux.

ghaberek said...

That I can help with. grin

$ mkdir /usr/lib/x86_64-linux-gnu 
$ cd /usr/lib/x86_64-linux-gnu 
$ ln -s ../i386-linux-gnu/libGL.so 

Well, that moves me on to

Error! Can't find wglGetProcAddress(). 
Not to worry - maybe someone can fix this when I get this release out, or maybe it will just work for them anyway (mind you, 64-bit c_func still needs a few tweaks for opengl).

Pete

new topic     » goto parent     » topic index » view message » categorize

6. Re: opengl on linux.

petelomax said...

Well, that moves me on to

Error! Can't find wglGetProcAddress(). 
Not to worry - maybe someone can fix this when I get this release out, or maybe it will just work for them anyway (mind you, 64-bit c_func still needs a few tweaks for opengl).

I don't think that function is defined on Linux. The "w" part makes me think it's Windows-specific. There is a GLX function available though:

$ grep GetProcAddress /usr/include/GL/glxext.h 
__GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); 
__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); 

$ nm -D /usr/lib/x86_64-linux-gnu/libGL.so | grep "GetProcAddress" 
000000000001a640 T glXGetProcAddress 
000000000001a640 T glXGetProcAddressARB 

-Greg

new topic     » goto parent     » topic index » view message » categorize

7. Re: opengl on linux.

SUCCESS!
I just got gears.exw to run on Linux!

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu