Homesource Forums

Homeworld Source Editing Talk
It is currently Sun Sep 24, 2017 6:05 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Sep 29, 2006 4:32 pm 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
(Thread forked from aob's Introduction.)

aob wrote:
Well I got it compiled, but it's complaining about librgl.so.

Like this?

Code:
SDL_GL_LoadLibrary(libGL.so): Failed loading libGL.so: dlcompat: file "libGL.so" not found
SDL_GL_LoadLibrary(librgl.so): Failed loading librgl.so: dlcompat: file "librgl.so" not found

I encountered this on my laptop a few days ago but didn't have time to look into it. I put it down to the fact that I had only just upgraded my laptop to SDL 1.2.11 and Xcode 2.4 and I'd probably just cocked something up. However, your comments set a few alarm bells ringing...

I've just rechecked my desktop (primary development machine) and was a little shocked to find an old version of SDL (1.2.7) in my user area which was being used instead of the system installation (1.2.11). Removing it replicates the laptop symptoms on my desktop. So, it looks like something to do with SDL. Either it's bust, or how we are invoking it needs to change for HomeworldSDL to work with SDL 1.2.7+.

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 4:49 pm 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
Update: error occurs with SDL 1.2.10 or later.

Interestingly, changes to SDL_GL_LoadLibrary were introduced in that version but the description sounds innocuous enough:

SDL 1.2.10 Release Notes wrote:
API enhancements
SDL_GL_LoadLibrary() will load the system default OpenGL library if it is passed NULL as a parameter.

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 5:17 pm 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
OK I've checked in a temporary fix for this. It also fixes the double-resolution switch that used to occur at game launch too which is a nice bonus, particularly as the menu screen appears much faster now.

Code:
------------------------------------------------------------------------
r177 | lmop | 2006-09-29 23:13:20 +0100 (Fri, 29 Sep 2006) | 3 lines
Changed paths:
   M /homeworld/trunk/src/SDL/gldll.c

Temporary fix for loading of libGL.so under Mac OS X using SDL 1.2.10+.
Also fixes double-resolution switching at application launch.

------------------------------------------------------------------------

Index: gldll.c
===================================================================
--- gldll.c     (revision 176)
+++ gldll.c     (revision 177)
@@ -565,11 +565,15 @@
            }
         #endif
 
+        #ifdef _MACOSX_FIX_ME
+        dllName = NULL;
+        #endif
+
         //try loading the .DLL
         if (SDL_GL_LoadLibrary(dllName) == -1)
         {
             fprintf(stderr, "SDL_GL_LoadLibrary(%s): %s\n",
-                dllName, SDL_GetError());
+                (dllName ? dllName : "NULL"), SDL_GetError());
             return GL_FALSE;
         }
     }

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 6:35 pm 
Offline

Joined: Wed Sep 27, 2006 8:41 pm
Posts: 3
Lord...

I just reverted my tree and updated to r249. I basically fell off the earth for a while there in October.

My recollection of my fix for this was something similar but slightly different. My reading of the SDL docs on Mac was that we didn't need to call any library loads at all. As it was it looked like someone had written up a bunch of code to just pop in the OpenGL framework to get all the address callbacks.

Back into it this weekend I hope!

-a


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 19, 2006 3:53 am 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
some variant of this still happens if you use sdl 1.2.10 (on my ubuntu distro laptop anyways). I don't know what would happen for me if sdl 1.2.11 were used, i'll check it later or sooner if asked

i moved a symlink of librgl*.so to /usr/lib and the problem went away. (strace helped)

"strace ./homeworld 2>hwlog":
Code:
open("/lib/tls/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/librgl.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/lib/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/librgl.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/lib/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/sse2/librgl.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/lib/cmov/librgl.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/lib/librgl.so", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/librgl.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/i686/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/tls/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/i686/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i486-linux-gnu/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/i686/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/tls/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/i686/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/i686/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/i686/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/i686/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/sse2/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/sse2/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/cmov/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/i486-linux-gnu/librgl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "SDL_GL_LoadLibrary(librgl.so): F"..., 126SDL_GL_LoadLibrary(librgl.so): Failed loading librgl.so: librgl.so: cannot open shared object file: No such file or directory

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 21, 2006 2:55 am 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
yeah, using sdl1.2.11 the problem is gone.

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group