FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with DerelictGLFW

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
darkuranium



Joined: 26 Jan 2008
Posts: 10

PostPosted: Mon Jan 05, 2009 2:08 pm    Post subject: Problems with DerelictGLFW Reply with quote

I know that DerelictGLFW is not an official package, but I have some problems with it.

As you might (or might not) know, GLFW now comes with the *.so build option on Linux (the official package, without hacking around).

BTW, as far as I recall, this was the #1 reason that DerelictGLFW is not an official Derelict package -- yes, there are official GLFW bindings, but they are horribly broken, and besides, I prefer linking DLLs on-the-fly (so that I can show messages on loading exceptions and perhaps catch them)

---

The program compiles fine, but upon use, I get this error:
Quote:
Failed to load shared library Failed to load shared library libglfw.so

(no, not my mistake in copying -- the "Failed to load shared library" part is repeated twice)

I'm using gcc to compile glfw and gdc to compile my program.

Any help would be appretiated.
Thanks!

EDIT: I tried building with -no-export-dynamic, but didn't seem to do the trick. Same error.
EDIT2: I forgot to mention that DerelictGLFW works perfectly fine on Windows (compiled with DMD though).
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
darkuranium



Joined: 26 Jan 2008
Posts: 10

PostPosted: Fri Jan 09, 2009 12:41 pm    Post subject: Reply with quote

ideas?

I ran strace on it, and it seems to load it correctly the 1st time, but continues anyways:
open("./Libraries/libglfw.so", O_RDONLY) = 3
open("./libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
...(and so on)...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jan 11, 2009 10:19 pm    Post subject: Re: Problems with DerelictGLFW Reply with quote

darkuranium wrote:
I know that DerelictGLFW is not an official package, but I have some problems with it.

As you might (or might not) know, GLFW now comes with the *.so build option on Linux (the official package, without hacking around).
...


Yes, I think I heard this mentioned before. This is good news, for sure. DerelictGLFW was indeed removed because it appeared that the the GLFW team was abandoning support for shared libraries. It appears that they have changed their mind. It also looks like the GLFW is still alive and well. But it's current popularity seems hard to determine, especially given the number of other similar projects now available.

I'm not sure if it's worth including in Derelict again, but maybe Mike will be interested? GLFW does seem to have a dedicated set of developers that maintain it.

Originally, I think the availability of Schooner (glfw port to D) also discredited any further need for glfw bindings. But Schooner is now abandoned so maybe another look at these bindings is warranted?

darkuranium wrote:

BTW, as far as I recall, this was the #1 reason that DerelictGLFW is not an official Derelict package -- yes, there are official GLFW bindings, but they are horribly broken, and besides, I prefer linking DLLs on-the-fly (so that I can show messages on loading exceptions and perhaps catch them)


Yes, that was one of the main reasons.

-JJR
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jan 11, 2009 10:24 pm    Post subject: Reply with quote

darkuranium wrote:
ideas?

I ran strace on it, and it seems to load it correctly the 1st time, but continues anyways:
open("./Libraries/libglfw.so", O_RDONLY) = 3
open("./libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libglfw.so", O_RDONLY) = -1 ENOENT (No such file or directory)
...(and so on)...


Where are you getting the DerelictGLFW bindings? Are these from an old Derelict branch?

Also, how have you installed libglfw.so? Was this using your linux distribution's package system? If so, did you install the developer package (something like libglfw-dev). You should at least find out if these libraries are installed, where they are installed, and then identify the library names... sometimes the dev libraries have post-fixed '0's after the name such as libglfw.so.0. Later versions of Derelict fixed these loading issues, I think. Maybe the old version you are using has not.

-JJR
Back to top
View user's profile Send private message
darkuranium



Joined: 26 Jan 2008
Posts: 10

PostPosted: Mon Jan 12, 2009 3:30 pm    Post subject: Reply with quote

If you notice the stacktrace it says '= 3' on the stack trace -- that means that the library does indeed exist and that it was opened.

I've compiled DerelictGLFW myself, but I seem to have similar problems with all of custom Derelict bindings (continuing to search through libs despite successfully loading and outputting "Failed to load" twice).

I use DerelictUtil from the latest branch, but DerelictGLFW are the bindings I submitted.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group