www.digitalmars.com         C & C++   DMDScript  

D.gnu - Compiling Build

reply sclytrack pi.be writes:
Hello, I've just successfully compiled gdc 0.17 
I'm attempting to build build, but with some problems

Question?
--------
util/fileex.d:97: undefined identifier package util.str


Undefined identifier package, does that mean it gdc doesn't find the package?


Error stuff
-----------

sclytrack ubuntu:~/Temporary/build-2.10/Source$ ls
build_bn.d  build.d  default.rdf  example_build.cfg  Makefile.dos  Makefile.unix
source_bn.o  source.o
build_bn.o  build.o  docsrc       Makefile           Makefile.gdc  source_bn.d
source.d     util
sclytrack ubuntu:~/Temporary/build-2.10/Source$ make
gdmd -op -release -inline -ofbuild 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 util/fileex.d util/fileex_bn.d util/linetoken.d util/linetoken_bn.d
util/macro.d
util/fileex.d:97: undefined identifier package util.str
util/fileex.d:97: undefined identifier package util.str
util/fileex.d:97: no property 'splitlines' for type 'void'
util/fileex.d:97: function expected before (), not 1 of type int
util/fileex.d:97: cannot implicitly convert expression (1(lText)) of type int to
char[][]
util/fileex.d:105: undefined identifier package util.str
util/fileex.d:105: undefined identifier package util.str
util/fileex.d:105: no property 'splitlines' for type 'void'
util/fileex.d:105: function expected before (), not 1 of type int
util/fileex.d:105: cannot implicitly convert expression (1(lText)) of type int
to dchar[][]
util/fileex.d:113: undefined identifier package util.str
util/fileex.d:113: undefined identifier package util.str
util/fileex.d:113: no property 'splitlines' for type 'void'
util/fileex.d:113: function expected before (), not 1 of type int
util/fileex.d:113: cannot implicitly convert expression (1(lText)) of type int
to wchar[][]
util/fileex.d:121: undefined identifier package util.str
util/fileex.d:121: undefined identifier package util.str
util/fileex.d:121: no property 'splitlines' for type 'void'
util/fileex.d:121: function expected before (), not 1 of type int
util/fileex.d:121: cannot implicitly convert expression (1(lText)) of type int
to char[][]
util/fileex.d:172: undefined identifier package util.str
util/fileex.d:172: undefined identifier package util.str
util/fileex.d:172: no property 'splitlines' for type 'void'
util/fileex.d:172: function expected before (), not 1 of type int
util/fileex.d:172: cannot implicitly convert expression (1(pLines)) of type int
to char[][]
make: *** [build] Error 1


===========================fileex.d

module util.fileex;

private import util.fileex_bn;   // The build number for this module.



private{

import std.file;

import std.string;

import std.path;

import std.ctype;

import std.regexp;



import std.stdio;



char[][] vGrepOpts;



}


char[][] GetTextLines(char[] pFileName, GetOpt pOpt = GetOpt.Always)

{

char[][] lLines;

char[]   lText;

lText = GetText(pFileName, pOpt);

lLines = util.str.splitlines( lText );

return lLines;

}

===========================util.str.d
module util.str;

private import util.str_bn;

char[][] splitlines(char[] s)

{

dchar[][] temp32;

char[][] temp8;



temp32 =  splitlines(std.utf.toUTF32(s));

temp8.length = temp32.length;

foreach( int i, dchar[] lLine; temp32)

{

temp8[i] = std.utf.toUTF8(lLine);

}



return temp8;

}



sclytrack ubuntu:~/Temporary/build-2.10/Source/util$ gdc --version
gdc (GCC) 4.0.2 (gdc 0.17, using dmd 0.140)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Apr 20 2006
parent reply Derek Parnell <derek psych.ward> writes:
On Thu, 20 Apr 2006 08:20:29 +0000 (UTC), sclytrack pi.be wrote:

 Hello, I've just successfully compiled gdc 0.17 
 I'm attempting to build build, but with some problems

Yes there were some mistakes in the distro. Add "import util.str;" to util.fileex.d and use the make file below ... ----[Makefile.gdc]------------------------- DMD=gdmd DFLAGS=-op -release -inline SOURCES=build.d util/pathex_bn.d util/pathex.d source_bn.d util/str.d build_bn.d util/booltype.d util/fdt_bn.d util/str_bn.d source.d util/fdt.d util/fileex.d util/fileex_bn.d util/linetoken.d util/linetoken_bn.d util/macro.d all: build build: $(SOURCES) $(DMD) $(DFLAGS) -of$ $(SOURCES) clean: rm -f *.o build rm -f util/*.o -------[end Makefile.gdc]---------------------- -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 20/04/2006 6:27:07 PM
Apr 20 2006
parent sclytrack pi.be writes:
gdc 0.17/gcc 4.0.2/Ubuntu

Thanks for the quick response.

I have some Link Errors, found std.c.linux.linux in phobos directory.
libphobos is linked by default?


gdmd -op -release -inline -ofbuild build.d util/pathex_bn.d util/pathex.d
source_bn.d util/str.d build_bn.d util/booltype.d util/fdt_bn.d util/str_bn.d
source.d util/fdt.d util/fileex.d util/fileex_bn.d util/linetoken.d
util/linetoken_bn.d util/macro.d
/build.o:(.data+0x1fc): undefined reference to `_ModuleInfo_3std1c5linux5linux'
util/fdt.o:(.data+0x80): undefined reference to `_ModuleInfo_3std1c5linux5linux'
collect2: ld returned 1 exit status


In article <8tgj8kw0fmqn.13eb3ik4qedjs$.dlg 40tude.net>, Derek Parnell says...
On Thu, 20 Apr 2006 08:20:29 +0000 (UTC), sclytrack pi.be wrote:

 Hello, I've just successfully compiled gdc 0.17 
 I'm attempting to build build, but with some problems

Yes there were some mistakes in the distro. Add "import util.str;" to util.fileex.d and use the make file below ...

Apr 20 2006