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

ddmd on linux
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> ddmd
View previous topic :: View next topic  
Author Message
mrmonday



Joined: 23 Jul 2008
Posts: 7

PostPosted: Fri Apr 02, 2010 9:55 pm    Post subject: ddmd on linux Reply with quote

I have started working on a linux port of ddmd, and once it's working I hope to help portind the rest of dmd and getting us up to date with 2.042. Unfortunately, after about 30 minutes of work I hit an ICE, which then turned into another, which is blocking development for now, I will try and work around them where possible though until they're fixed. If there's any chance I could get commit access that would be great, it would mean as soon as a linux port is ready I will be able to set it out in the wild, if not I'll use my own repository for a while. Thanks for starting such a great project Smile

PS: In case you were wondering:
http://d.puremagic.com/issues/show_bug.cgi?id=4054 (Inifile.d)
http://d.puremagic.com/issues/show_bug.cgi?id=4055 (Declaration.d TypedefDeclaration.d)
Feel free to vote Smile
Back to top
View user's profile Send private message
mrmonday



Joined: 23 Jul 2008
Posts: 7

PostPosted: Sat Apr 03, 2010 5:21 pm    Post subject: Re: ddmd on linux Reply with quote

With various hacks to get around the bugs, ddmd now compiles on linux Smile As I don't have commit access yet I'll set up my own repository and push to that for now, changes can always be merged in later. I'll start compiling test cases now and see how it goes, then start implementing more features.

On the way I encountered another bug if you'd like to vote for it:
http://d.puremagic.com/issues/show_bug.cgi?id=4059
Back to top
View user's profile Send private message
mrmonday



Joined: 23 Jul 2008
Posts: 7

PostPosted: Sat Apr 03, 2010 7:24 pm    Post subject: Re: ddmd on linux Reply with quote

OK, I've pushed my changes to a public repo... You can now use ddmd on linux!

Code:
$ hg clone http://hg.octarineparrot.com/ddmd/


Then you need to build dmd 2.032 as a library in debug mode. To do this:

Code:
$ mkdir dmd32 && cd dmd32
$ wget http://ftp.digitalmars.com/dmd.2.032.zip
$ unzip dmd.2.032.zip
$ rm -rf dmd2/{windows,osx,samples,man,html}
$ cp linux_lib.mak dmd32/dmd2/src/dmd
$ cd dmd32/dmd2/src/dmd
$ make -f linux_lib.mak
$ cd $OLDPWD


You can then build ddmd:

Code:
$ ./build.sh
$ ./bin/ddmd --help


If all has gone well you should see the dmd help info. Let me know if you have any issues Smile

@korDen: Let me know if you want to merge this into the main ddmd branch, as there are probably a few changes that we'll need to coordinate on to make sure this version of ddmd works on Windows too. I'd also be grateful if I had access to the main repository Smile
Back to top
View user's profile Send private message
korDen



Joined: 12 Mar 2008
Posts: 11

PostPosted: Mon Apr 12, 2010 5:26 am    Post subject: Reply with quote

Great news! You should have e-mailed me earlier, because I don't monitor these forums, nor do I receive any notifications. I was lucky to notice main page edit made by you and followed the link posted Smile

I've added you as a developer. Try pushing the changes, and I'll test if anything got broken on Windows.
Back to top
View user's profile Send private message
mrmonday



Joined: 23 Jul 2008
Posts: 7

PostPosted: Mon Apr 12, 2010 9:16 am    Post subject: Reply with quote

I have no doubt that things will have broken on windows, as quite a few things I didn't pay attention and took an "I just want to get it working on linux" attitude, in other places I version(Windows)'d things. Most of the changes you should be able to just compare any erroring code with the first diff and see what changed, I know for example one function that was extern(Pascal) on Windows needed to be extern(C) on linux etc. Is there a better way for us to communicate than on here so we can collaborate on this properly and ensure the minimum breakage?
Back to top
View user's profile Send private message
manni



Joined: 16 Jan 2006
Posts: 25

PostPosted: Fri Jun 11, 2010 2:47 am    Post subject: Reply with quote

hg clone http://hg.octarineparrot.com/ddmd/
503 - Service Not Available Crying or Very sad
Back to top
View user's profile Send private message
mrmonday



Joined: 23 Jul 2008
Posts: 7

PostPosted: Fri Jun 11, 2010 4:00 am    Post subject: Reply with quote

There's no need to use the octarineparrot.com url any more for linux, the main repo has had all the linux changes merged in Smile
Back to top
View user's profile Send private message
manni



Joined: 16 Jan 2006
Posts: 25

PostPosted: Mon Jun 14, 2010 11:47 pm    Post subject: Reply with quote

fine fine.
I will test it.
Back to top
View user's profile Send private message
manni



Joined: 16 Jan 2006
Posts: 25

PostPosted: Fri Jul 09, 2010 1:47 am    Post subject: Reply with quote

After make -f linux_lib.mak i get the following output:

Quote:

g++ -m32 -c -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1 -Ibackend -Itk -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH backend/dwarf.c
backend/dwarf.c:54:26: error: ../mars/mars.h: No such file or directory
backend/dwarf.c: In function 'void dwarf_initfile(const char*)':
backend/dwarf.c:453: error: 'global' was not declared in this scope

*** 2 errors, 0 warnings
make: *** [dwarf.o] Fehler 1


Maybe the file mars.h is missing?

manni
Back to top
View user's profile Send private message
manni



Joined: 16 Jan 2006
Posts: 25

PostPosted: Mon Jul 12, 2010 1:37 am    Post subject: Reply with quote

Hello,

so i have make a new dirctory in dmd32/dmd2/src/dmd/mars with three files:
mars.h
mars.c
complex_t.h

After that i get a new error message:
Quote:

g++ -m32 -c backend/strtold.c
backend/strtold.c: In function 'long double strtold(const char*, char**)':
backend/strtold.c:495: error: invalid conversion from 'void*' to 'char*'


I have changed the line 495 from *endp = (void *) p; to
*endp = (char *) p;

Didn't know is this correct.

But now i have ddmd compiler Very Happy

manni
Back to top
View user's profile Send private message
michaelp



Joined: 27 Jul 2008
Posts: 114

PostPosted: Mon Jul 12, 2010 8:08 am    Post subject: Reply with quote

I think you are trying to build dmd, not ddmd. ddmd is programmed in D, while the source files you are compiling are c/c++ files.

Here is the ddmd project page.
Back to top
View user's profile Send private message
manni



Joined: 16 Jan 2006
Posts: 25

PostPosted: Wed Jul 14, 2010 5:41 am    Post subject: Reply with quote

Maybe you are right.

The three files needed for generate a libdmd.a file.

How can i figure out that my ddmd Binary used the correct files?

Maybe there is a test d file?

mfg manni
Back to top
View user's profile Send private message
atommixz



Joined: 24 Sep 2010
Posts: 1

PostPosted: Fri Sep 24, 2010 12:38 pm    Post subject: Reply with quote

When ddmd build him-self for Linux-64 platform? Months or years?
Back to top
View user's profile Send private message
Abscissa



Joined: 23 Feb 2005
Posts: 40
Location: Cleveland, OH, US

PostPosted: Sat Sep 25, 2010 8:26 pm    Post subject: Reply with quote

I'm getting this when trying to build dmd.lib on linux (kubuntu 10.04, 32-bit) using mrmonday's instructions above:

Code:
$ make -f linux_lib.mak
g++ -m32 -c -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1  -Iroot -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH id.c
In file included from id.c:2:
id.h:24: error: expected unqualified-id before '__alignof__'
id.h:24: error: expected ';' before '__alignof__'
id.c:22: error: expected unqualified-id before '__alignof__'
id.c:22: error: expected initializer before '__alignof__'
id.c: In static member function 'static void Id::initialize()':
id.c:261: error: expected primary-expression before '=' token
make: *** [id.o] Error 1


EDIT: I should probably note that this is with dmd 2.039 and the latest ddmd (rev fe932c1a9563)
Back to top
View user's profile Send private message
Abscissa



Joined: 23 Feb 2005
Posts: 40
Location: Cleveland, OH, US

PostPosted: Sat Sep 25, 2010 8:47 pm    Post subject: Reply with quote

If I *don't* apply the dmdpatch.patch, then it gets past that parts but then craps out here:

Code:
g++ -m32 -c -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1  -Ibackend -Itk -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH irstate.c
In file included from irstate.c:11:
mtype.h:18:18: error: root.h: No such file or directory
mtype.h:19:25: error: stringtable.h: No such file or directory
In file included from mtype.h:21,
                 from irstate.c:11:
arraytypes.h:29: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:31: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:33: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:35: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:37: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:39: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:41: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:43: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:45: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:47: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
arraytypes.h:49: error: invalid use of incomplete type 'struct Array'
mars.h:113: error: forward declaration of 'struct Array'
In file included from expression.h:15,
                 from mtype.h:22,
                 from irstate.c:11:
identifier.h:21: error: expected class-name before '{' token
identifier.h:27: error: 'Object' has not been declared
identifier.h:28: error: 'hash_t' does not name a type
identifier.h:29: error: 'Object' has not been declared
In file included from mtype.h:22,
                 from irstate.c:11:
expression.h:80: error: expected class-name before '{' token
expression.h:175: error: 'Object' has not been declared
expression.h:207: error: 'Object' has not been declared
expression.h:230: error: 'Object' has not been declared
expression.h:245: error: field 'hexp' has incomplete type
expression.h:346: error: 'Object' has not been declared
expression.h:355: error: 'Object' has not been declared
expression.h:375: error: 'Object' has not been declared
expression.h:594: error: 'Object' has not been declared
expression.h:669: error: ISO C++ forbids declaration of 'Object' with no type
expression.h:669: error: expected ';' before '*' token
expression.h:671: error: 'Object' has not been declared
In file included from irstate.c:11:
mtype.h:112: error: expected class-name before '{' token
mtype.h:219: error: 'Object' has not been declared
mtype.h:596: error: field 'idents' has incomplete type
mtype.h:824: error: 'Object' has not been declared
mtype.h:855: error: expected class-name before '{' token
In file included from declaration.h:18,
                 from irstate.c:12:
dsymbol.h:98: error: expected class-name before '{' token
dsymbol.h:112: error: 'Object' has not been declared
dsymbol.h:308: error: expected class-name before '{' token
make: *** [irstate.o] Error 1


Compiling an ordinary dmd 2.039 with "make -f linux.mak" works fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ddmd All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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