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

HOWTO: Derelict on x86_64 / Linux using GDC 0.23

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



Joined: 14 Mar 2007
Posts: 8

PostPosted: Sun Mar 25, 2007 12:48 pm    Post subject: HOWTO: Derelict on x86_64 / Linux using GDC 0.23 Reply with quote

This is going to be a very quick and dirty step by step HOWO, here goes:

I'll assume you have GDC 0.23 installed properly, including the gdmd script. (Also known as, set the "d" use flag on gentoo and emerge gcc 4.1.2 Smile


First, Build/Bud is borked for GDC and 64bit systems, so do the following:

1. Get Build/Bud 3.04: http://trac.dsource.org/projects/build/browser/downloads/bud-3.04.src.zip?format=raw
2. Unzip build somewhere
3. Apply this patch: http://www.subracing.com/bud-gdc.patch (patch -p1 < bud-gdc.patch)
4. Build build:
cd <build>/Source; make -f Makefile.gdc; ./build build -full -op
5. Put in your path somewhere


Now, derelict has a couple of minor issues on a 64bit system, so do the following:

1. Get Derelict (I tried with trunk-r246): http://www.dsource.org/projects/derelict/changeset/head/trunk?old_path=%2F&format=zip
2. Unzip somewhere
3. Apply this patch: http://www.subracing.com/derelict-amd64.patch (patch -p1 < derelict-amd64.patch)
4. Build Derelict: gdmd -run buildme.d debug
4a. I had to run this twice for some reason. If it gives you: "Error: temp.brf: No such file or directory" after the DerelictIL package, just repeat the command, and it will go through.
5. It should have compiled, try building an example and see if it works:
build -IDerelictSDL -IDerelictUtil examples/sdl_ex1.d -op -L-ldl
if that builds then:
./examples/sdl_ex1

You should get a nice little screen pop up with fancy colors Smile

If you want to double check it's a 64bit binary:

objdump -f examples/sdl_ex1

should give you:
examples/sdl_ex1: file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00000000004028e0
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Sun Mar 25, 2007 8:53 pm    Post subject: Reply with quote

Is there any way to do a version(64Bit) or some such with GDC?
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
Crispy



Joined: 26 Nov 2005
Posts: 67

PostPosted: Mon Mar 26, 2007 3:56 am    Post subject: Reply with quote

How about this (untested)?

Code:
static if (size_t.sizeof == 8) version=bits64


I don't know if size_t is actually adjusted properly for 64-bit OSes or not.
Back to top
View user's profile Send private message
dan.lewis



Joined: 21 Feb 2007
Posts: 69
Location: Canada

PostPosted: Mon Mar 26, 2007 11:17 am    Post subject: Reply with quote

*sigh*

RTFM. Shocked <-- I know I'm guilty of this more than most of you.

D version control already has a predefined version(x86_64) that *should* be automatically available. Of course, neither GDC nor DMD trunk currently operate with x86_64, so it wouldn't be set...

Razz
Back to top
View user's profile Send private message
Nietsnie



Joined: 14 Mar 2007
Posts: 8

PostPosted: Tue Mar 27, 2007 11:24 am    Post subject: Reply with quote

aldacron wrote:
Is there any way to do a version(64Bit) or some such with GDC?


Yes.

GDC 0.23 has full 64bit support.

I had no issues compiling 64bit Derelict SDL/OpenGL binaries that I was making and running then on my system.
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