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

Derelict3 build fails.

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



Joined: 12 Sep 2011
Posts: 40

PostPosted: Mon Feb 06, 2012 11:31 am    Post subject: Derelict3 build fails. Reply with quote

I am trying to build Derelict3 from github. (Archlinux 32 bit, dmd 2.057).

I had to change https://github.com/aldacron/Derelict3/blob/master/import/derelict/opengl3/gl3.d#L55 to Derelict_OS_Posix, then I got this "errors":
Code:
─[ArchBox][/tmp/Derelict3/build]╼ dmd derelict.d
Using the Digital Mars DMD compiler.
─[ArchBox][/tmp/Derelict3/build]╼ ./derelict                         
Building all packages.
Building DerelictGL3

../import/derelict/opengl3/wgl.d
../import/derelict/opengl3/functions.d
../import/derelict/opengl3/gl3.d
../import/derelict/opengl3/constants.d
../import/derelict/opengl3/arb.d
../import/derelict/opengl3/internal.d
../import/derelict/opengl3/types.d
../import/derelict/opengl3/gl3.d(73): Error: undefined identifier hasValidContext
../import/derelict/opengl3/gl3.d(76): Warning: statement is not reachable
../import/derelict/opengl3/gl3.d(77): Warning: statement is not reachable
../import/derelict/opengl3/gl3.d(79): Warning: statement is not reachable
../import/derelict/opengl3/gl3.d(669): Warning: statement is not reachable
../import/derelict/opengl3/gl3.d(671): Warning: statement is not reachable
../import/derelict/opengl3/gl3.d(672): Warning: statement is not reachable
../import/derelict/opengl3/gl3.d(746): Error: undefined identifier loadPlatformGL
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Feb 06, 2012 10:11 pm    Post subject: Reply with quote

You know, I've been asking people to test on Linux and Mac and still haven't implemented the platform module in DerelictGL3 for either. Sorry about that. I'll try to get on it today.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Feb 06, 2012 11:58 pm    Post subject: Reply with quote

OK, I've added a glx module to DerelictGL3. I don't have a Linux distro set up at the moment, so I haven't compiled it yet. Let me know how it works out.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Tue Feb 07, 2012 12:30 am    Post subject: Reply with quote

FWIW, I've also added support for CGL on Mac. Again, untested. If anyone out there can do so, please let me know if there are problems with it.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
dav1d



Joined: 12 Sep 2011
Posts: 40

PostPosted: Tue Feb 07, 2012 7:22 am    Post subject: Reply with quote

If you need someone to test on Linux, just ask me (I am often on freenode #D).

Hope this helps: http://paste.pocoo.org/show/NzppzhQbGPFLMG2218sT/
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Tue Feb 07, 2012 9:47 pm    Post subject: Reply with quote

Thanks! I merged a pull request that should have fixed the cgl problems. And now I've pushed your fixes for glx. Hope it all works now.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
dav1d



Joined: 12 Sep 2011
Posts: 40

PostPosted: Wed Feb 08, 2012 7:23 am    Post subject: Reply with quote

Ok, I had to fix in glx.d line 227,
Code:
if(glxGetCurrentContext && glxGetCurrentContext())
to
Code:
if(glXGetCurrentContext && glXGetCurrentContext())
(uppercase X)

Now it seems to work.
Code:
─[ArchBox][/tmp/Derelict3/build]╼ vim ../import/derelict/opengl3/glx.d
─[ArchBox][/tmp/Derelict3/build]╼ ./derelict                         
Building all packages.
Building DerelictGL3

../import/derelict/opengl3/wgl.d
../import/derelict/opengl3/glx.d
../import/derelict/opengl3/functions.d
../import/derelict/opengl3/cgl.d
../import/derelict/opengl3/gl3.d
../import/derelict/opengl3/constants.d
../import/derelict/opengl3/arb.d
../import/derelict/opengl3/internal.d
../import/derelict/opengl3/types.d

Build succeeded.
Building DerelictGLFW3

../import/derelict/glfw3/glfw3.d
../import/derelict/glfw3/functions.d
../import/derelict/glfw3/types.d

Build succeeded.
Building DerelictUtil

../import/derelict/util/loader.d
../import/derelict/util/system.d
../import/derelict/util/wintypes.d
../import/derelict/util/exception.d
../import/derelict/util/sharedlib.d
../import/derelict/util/xtypes.d

Build succeeded.


Thanks! Now it's time to create a PKGBUILD Smile
Back to top
View user's profile Send private message
dav1d



Joined: 12 Sep 2011
Posts: 40

PostPosted: Wed Feb 08, 2012 7:56 am    Post subject: Reply with quote

Done: https://aur.archlinux.org/packages.php?ID=56506

// Edit: Licensed under BSD? (I took it from the old PKGBUILD)
// Edit²: the "fix" used in the PKGBUILD
Code:
sed -i -e "s/glxGetCurrentContext/glXGetCurrentContext/g" "import/derelict/opengl3/glx.d"
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Feb 08, 2012 8:10 am    Post subject: Reply with quote

dav1d wrote:
// Edit: Licensed under BSD? (I took it from the old PKGBUILD)


No, Boost.

Quote:
// Edit²: the "fix" used in the PKGBUILD
Code:
sed -i -e "s/glxGetCurrentContext/glXGetCurrentContext/g" "import/derelict/opengl3/glx.d"


Thanks, I've updated the repo.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
dav1d



Joined: 12 Sep 2011
Posts: 40

PostPosted: Wed Feb 08, 2012 8:24 am    Post subject: Reply with quote

Updated
Back to top
View user's profile Send private message
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