View previous topic :: View next topic |
Author |
Message |
Nietsnie
Joined: 14 Mar 2007 Posts: 8
|
Posted: Sun Mar 25, 2007 12:48 pm Post subject: HOWTO: Derelict on x86_64 / Linux using GDC 0.23 |
|
|
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
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
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
Crispy
Joined: 26 Nov 2005 Posts: 67
|
Posted: Mon Mar 26, 2007 3:56 am Post subject: |
|
|
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 |
|
|
dan.lewis
Joined: 21 Feb 2007 Posts: 69 Location: Canada
|
Posted: Mon Mar 26, 2007 11:17 am Post subject: |
|
|
*sigh*
RTFM. <-- 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...
|
|
Back to top |
|
|
Nietsnie
Joined: 14 Mar 2007 Posts: 8
|
Posted: Tue Mar 27, 2007 11:24 am Post subject: |
|
|
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 |
|
|
|