View previous topic :: View next topic |
Author |
Message |
BenHinkle
Joined: 27 Mar 2004 Posts: 76
|
Posted: Tue Feb 22, 2005 11:46 am Post subject: linux version? |
|
|
Is there a linux version? |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Tue Feb 22, 2005 5:24 pm Post subject: Re: linux version? |
|
|
BenHinkle wrote: | Is there a linux version? |
I have not compiled a linux executable, as I don't have linux. However, the source code is now up on the dsource.org site and it does have 'linux' section in it, so if you grab the source files and compile it with these on your dmd command line ...
Code: |
-op
build.d
util/pathex_bn.d
util/pathex.d
source_bn.d
util/str.d
build_bn.d
util/fdt_bn.d
util/str_bn.d
source.d
util/fdt.d
|
it should create a linux executable. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue Feb 22, 2005 6:18 pm Post subject: |
|
|
Great! You've got it on dsource.org. Thanks, Derek.
I hadn't got around to updating "build" for Linux.
I'll have a look at this and see what changes are needed for Linux. Last time I checked, changes were needed, but they were minor.
- John R. |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Tue Feb 22, 2005 7:30 pm Post subject: |
|
|
easier copy/past command line (just reformatted what Derek posted)
Code: |
dmd -op build.d util/pathex_bn.d util/pathex.d source_bn.d util/str.d build_bn.d util/fdt_bn.d util/str_bn.d source.d util/fdt.d
|
errors
Code: |
util/fdt.d(126): undefined identifier module str.strFormat
util/fdt.d(126): function expected before (), not 'void'
util/fdt.d(126): cannot implicitly convert expression module str.strFormat("?d",this.mDT) of type int to char[]
util/fdt.d(190): undefined identifier toStringz
util/fdt.d(190): function expected before (), not 'int'
util/fdt.d(190): cannot implicitly convert expression toStringz(pFileName) of type int to byte*
util/fdt.d(191): function std.c.linux.linux.open (char*,int,...) does not match argument types (byte*,int)
util/fdt.d(191): cannot implicitly convert expression lFileName of type byte* to char*
|
the *evil* lines of code
Code: |
util/fdt.d(126) return util.str.strFormat("?d", mDT);
|
where is the code to strFormat?
Code: |
util/fdt.d(190)lFileName = toStringz(pFileName);
|
just add import std.string; to the top of the file
Code: |
util/fdt.d(191)toStringz(pFileName);
|
change pFileName from byte * to char * |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Tue Feb 22, 2005 8:00 pm Post subject: |
|
|
Thanks for the bug report. I've corrected those issues now, but not uploaded them just yet. Maybe in a few hours... _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
brad Site Admin
Joined: 22 Feb 2004 Posts: 490 Location: Atlanta, GA USA
|
Posted: Wed Feb 23, 2005 1:43 pm Post subject: |
|
|
Derek,
There was still a bug in util/fdt.d around line 166. This was in the Posix version statement, so it didn't affect the Windows version.
Code: |
return str.string.format("?d", mDT);
|
I changed it to
Code: |
return std.string.format("?d", mDT);
|
and everything worked fine. I'm now trying to build Mango on linux...
I took the liberty (as sysadmin) to check in the change to SVN, and if this is the final for version 1.3, you should probably do a tag for that release:
Code: |
$ svn copy http://svn.dsource.org/svn/projects/build/trunk \
http://svn.dsource.org/svn/projects/build/release-1.3 \
-m "Tagging the 1.3 release of the 'build' project."
|
as noted here: http://svnbook.red-bean.com/en/1.1/ch04s06.html#svn-ch-4-sect-6.1
This way, if you ever need to debug or otherwise see a copy of the code as it was for version 1.3, and don't want to remember it was revision 7 or 8 in SVN terms, go to the Tags folder, not Trunk, and voila. Snapshots of your code at each release point may be found there...
BA |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Wed Feb 23, 2005 11:00 pm Post subject: |
|
|
Yay the code compiles under linux now. I'm still having some problems / oddities.
#1) when using -CFPATH flag on linux (without -V), it tells you
Code: |
-CFPATH/etc/ was /usr/local/bin/ now /etc/
|
shouldn't this be displayed only when you use the option -V?
#2) When I use the command option
Code: |
./build mold.d -cleanup loader.d -L-ldl -CFPATH/etc/ -full -debug -v -V
|
Here is what it is compiling with (when i use option -V, notice the last arg mold should be -ofmold)
Code: |
Compiling with.........
-L-ldl -debug -v -op -version=Posix -I/home/clayasaurus/dmd/src/phobos -unittest loader.d (etc. etc.) mold.d glui/gui.d mold
|
and here is how it passes it to dmd
Code: |
Running 'dmd -L-ldl -debug -v -op -version=Posix -I/home/clayasaurus/dmd/src/phobos -unittest loader.d engine/music.d (etc. etc.) mold.d glui/gui.d mold
|
Shouldn't it use -ofmold instead? When i manually change it to -ofmold it creates the executable, otherwise it gives the annoying error message
Code: |
module mold is in multiple packages mold
|
|
|
Back to top |
|
|
brad Site Admin
Joined: 22 Feb 2004 Posts: 490 Location: Atlanta, GA USA
|
Posted: Wed Feb 23, 2005 11:09 pm Post subject: |
|
|
clayasaurus wrote: |
Shouldn't it use -ofmold instead? When i manually change it to -ofmold it creates the executable, otherwise it gives the annoying error message
Code: |
module mold is in multiple packages mold
|
|
I had this same issue, and Derek says he has fixed it. See: http://www.dsource.org/forums/viewtopic.php?t=595&highlight=
I don't see the code in SVN yet, but it has been all of 10 minutes
BA |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Feb 23, 2005 11:21 pm Post subject: |
|
|
clayasaurus wrote: | Yay the code compiles under linux now. I'm still having some problems / oddities.
#1) when using -CFPATH flag on linux (without -V), it tells you
Code: |
-CFPATH/etc/ was /usr/local/bin/ now /etc/
|
shouldn't this be displayed only when you use the option -V?
|
Fussy, fussy, fussy. But yeah, I guess you're right.
clayasaurus wrote: |
#2) When I use the command option
Code: |
./build mold.d -cleanup loader.d -L-ldl -CFPATH/etc/ -full -debug -v -V
|
Here is what it is compiling with (when i use option -V, notice the last arg mold should be -ofmold)
|
Yep. Windows vs linux issue. I've fixed it now though and its been uploaded. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Wed Feb 23, 2005 11:34 pm Post subject: |
|
|
Awesome, thanks. I can now use build for my little project
Do you mind if I post a link to the linux executable I made?
edit: I guess i'll take your reply as a yes? (http://svn.dsource.org/svn/projects/warbots/game/build)
Last edited by clayasaurus on Thu Feb 24, 2005 9:12 am; edited 1 time in total |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Feb 23, 2005 11:37 pm Post subject: |
|
|
clayasaurus wrote: | Awesome, thanks. I can now use build for my little project
Do you mind if I post a link to the linux executable I made? |
Happy to oblige.
Thanks for the linux exec. I'll upload into the project download area for you. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Sun Feb 27, 2005 6:11 pm Post subject: |
|
|
I just tried to compile the latest build under linux and I get the following errors
Code: |
build.d(1333): undefined identifier vWinVer
build.d(1333): cannot implicitly convert expression pArg[5..cast(int)(length)] of type char[] to int
build.d(1335): undefined identifier vWinVer
build.d(1335): cannot implicitly convert expression pArg[4..cast(int)(length)] of type char[] to int
|
I got it to compile by wrapping a version(Windows) statement around the offending code, and it seems to compile my project fine. |
|
Back to top |
|
|
|