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

BETA v2.08
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Wed May 25, 2005 8:42 pm    Post subject: BETA v2.08 Reply with quote

Because I've made some major changes to the source, and because I haven't got a Unix or GDC environment to test things out, I'm making available a beta edition of the next version.

My testing so far in a Windows environment seems to indicate that its working but I'd really appreciate some Unix people giving it a shakedown. If you are going to test it for me, can you please let me know. That way I can know to wait for some feedback from you before releasing into the wild.

http://www.users.bigpond.com/ddparnell/build-beta-2.08.zip

This zip file just contains the source files; no doc updates yet.

The changes are summarized here...

** FIX: "thanks to teqdruid": In Unix environments, any pragma(link, <name>) statements were not sending the correct syntax to the compiler's command line. The "<name>" is now prefixed with "-L-l" for Unix systems.

** FIX: "thanks to Carlos": In Unix environments, any "-version" switch on the Utility's command line was not being converted to the correct Unix format of "-fversion...". So now, if the Build tool gets either "-version..." or "-fversion=..." on its command line, it will recognise it as a 'Version' request for the compiler and output it on the command line in the correct format for the environment it is running in, namely "-fversion..." for GNU (gdc) and "-version..." for Windows.

Note: The same applies to the "-debug..." and "-fdebug..." switches.

** FIX: The pragma(nolink) was being ignored under some circumstances. Now it splits the compilation phase from the linking phase, and only includes the non-nolink files on the linker's command line.

** FIX: "thanks to kris": 'debug' statements were not being taken into account when examining code for import statements.

** FIX: 'debug' and 'version' levels are now being taken into account.

** FIX: 'debug' and 'version' values being set inside a source file were being made global rather than module scoped.

** ENH: The path of any source file that imports a module will be added to the list of root paths to search for module source files. This means that you can now have module source files referenced relative to the source file that imports them. This is the new default behaviour but it can be turned off by using the new -noautoimport switch or for individual files by placing them inside parenthesis.

** ENH: New switch -noautoimport is used to turn off the automatic adding of search roots based on the path of the source files being compiled.

WARNING: The utility only does a single scan of each source file and thus if an file sets a 'debug' or 'version' value after a function which uses that value, it will be ignored. You are requested to ensure that all your 'debug' and 'version' setting is done prior to the first module member.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Thu May 26, 2005 7:13 am    Post subject: Reply with quote

Wow! Thanks, Derek.

Looks like you made all the fixes you said you would.

I'll give it a try on windows and linux.

-JJR
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Thu May 26, 2005 3:53 pm    Post subject: Reply with quote

Compiling with DMD 0.125, gcc 3.4.2, Ubuntu Linux:

Code:

dmd -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/bmscanner.d util/bmscanner_bn.d util/macro.d
build.d(1922): undefined identifier vLibPaths
build.d(1922): no property 'length' for type 'int'
build.d(1922): constant vLibPaths.length is not an lvalue
build.d(1923): undefined identifier vLibPaths
build.d(1923): Can only concatenate arrays, not int ~= char[4]
build.d(1931): undefined identifier vLibPaths
build.d(1931): Can only concatenate arrays, not int ~= char[]
build.d(1932): undefined identifier vLibPaths
build.d(1932): Can only concatenate arrays, not int ~= char[]
build.d(1936): undefined identifier vLibPaths
build.d(1936): no property 'length' for type 'int'
build.d(1936): undefined identifier vLibPaths
build.d(1936): no property 'length' for type 'int'
build.d(1936): constant vLibPaths.length is not an lvalue
build.d(1940): undefined identifier vLibPaths
make: *** [build] Error 1


gdc 0.11, gcc 3.4.3, Mac OS X:

Code:

dmd -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/bmscanner.d util/bmscanner_bn.d util/macro.d
build.d: module build source.LibExt is private
build.d:1318: undefined identifier vLibPaths
build.d:1318: foreach: int is not an aggregate type
make: *** [build] Error 1
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Thu May 26, 2005 4:35 pm    Post subject: Reply with quote

Carlos wrote:
Compiling with DMD 0.125, gcc 3.4.2, Ubuntu Linux:

Code:

dmd -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/bmscanner.d util/bmscanner_bn.d util/macro.d
build.d(1922): undefined identifier vLibPaths
build.d(1922): no property 'length' for type 'int'
build.d(1922): constant vLibPaths.length is not an lvalue
build.d(1923): undefined identifier vLibPaths
build.d(1923): Can only concatenate arrays, not int ~= char[4]
build.d(1931): undefined identifier vLibPaths
build.d(1931): Can only concatenate arrays, not int ~= char[]
build.d(1932): undefined identifier vLibPaths
build.d(1932): Can only concatenate arrays, not int ~= char[]
build.d(1936): undefined identifier vLibPaths
build.d(1936): no property 'length' for type 'int'
build.d(1936): undefined identifier vLibPaths
build.d(1936): no property 'length' for type 'int'
build.d(1936): constant vLibPaths.length is not an lvalue
build.d(1940): undefined identifier vLibPaths
make: *** [build] Error 1



The same on Gentoo w/ dmd.125

Moreover, I had to change one filename from BMscanner.d to bmscanner.d for make not to complain. Still, it doesn't work
Back to top
View user's profile Send private message MSN Messenger
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Thu May 26, 2005 6:12 pm    Post subject: Reply with quote

Quote:
I haven't got a Unix or GDC environment to test things out


Somebody give this man a shell account!
Back to top
View user's profile Send private message Send e-mail AIM Address
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Thu May 26, 2005 6:35 pm    Post subject: Reply with quote

teqdruid wrote:
Quote:
I haven't got a Unix or GDC environment to test things out


Somebody give this man a shell account!


I could give this man a shell account on FC2, but I haven't got GDC there.
PM me if you're interested, Derek Smile
Back to top
View user's profile Send private message MSN Messenger
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Thu May 26, 2005 6:35 pm    Post subject: Reply with quote

Ok, I've updated the ZIP file. Thanks.

I forgot to define vLibPaths in the Unix version. And in some code I cut&pasted from source.d to build.d I forgot to rename a variable.

h3r3tic wrote:

Moreover, I had to change one filename from BMscanner.d to bmscanner.d for make not to complain. Still, it doesn't work


This is really weird. I renamed it to lower case on my machine but every so often something renames it back again!
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Thu May 26, 2005 6:58 pm    Post subject: Reply with quote

h3r3tic wrote:
teqdruid wrote:
Quote:
I haven't got a Unix or GDC environment to test things out


Somebody give this man a shell account!


I could give this man a shell account on FC2, but I haven't got GDC there.
PM me if you're interested, Derek Smile

Laughing Thanks, but it might not be needed. I'm planning to install Linux this weekend - of course that might mean a whole lot of questions coming your way soon Smile
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Thu May 26, 2005 8:27 pm    Post subject: Reply with quote

I just downloaded and tested it, and it doesn't appear that the pragma(link) bug is fixed. When I try to compile my program against Mango's ICU with pragma(link, dl); in it, I get:
Code:
... unimportant stuff omitted....
t.o /home/teqdruid/workspace/include/mango/io/Exception.o /home/teqdruid/workspace/include/mango/xml/dom/model/Element.o -o test dl.a -lphobos -lpthread -lm
gcc: dl.a: No such file or directory
--- errorlevel 1

When that dl.a should be -ldl instead. -ldl doesn't occur anywhere in the output.

I might note that I'm not using gdc. I'm using dmd for everything, so if your modifications are in version(GNU) blocks, they may not be compiled in. Build doesn't compile if I specify -verison=GNU in the makefile. I'm not sure if this is the issue.

-John
Back to top
View user's profile Send private message Send e-mail AIM Address
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Thu May 26, 2005 10:47 pm    Post subject: Reply with quote

teqdruid wrote:
I just downloaded and tested it, and it doesn't appear that the pragma(link) bug is fixed.


[Smacks head] Exclamation

I got confused. I compiled that code in with GNU and not Posix.

The fixed source is on my web site. Sorry for that... Embarassed

teqdruid wrote:
I might note that I'm not using gdc. I'm using dmd for everything, so if your modifications are in version(GNU) blocks, they may not be compiled in. Build doesn't compile if I specify -verison=GNU in the makefile. I'm not sure if this is the issue.


You can not compile with version=GNU using the digital mars compiler. This will just give heaps of duplicate definitions.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Thu May 26, 2005 10:51 pm    Post subject: Reply with quote

Code:
$ make -f Makefile.unix
make: Warning: File `build.d' has modification time 5e+04 s in the future
dmd -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/bmscanner.d util/bmscanner_bn.d util/macro.d
build.d(1320): foreach: char[] is not an array of char[]
make: *** [build] Error 1

It don't compile

Quote:
You can not compile with version=GNU using the digital mars compiler. This will just give heaps of duplicate definitions.

Yep... I noticed that when I tried to do it, and the error messages scrolled by so fast, I couldn't read any of 'em.
Back to top
View user's profile Send private message Send e-mail AIM Address
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Thu May 26, 2005 11:23 pm    Post subject: Reply with quote

teqdruid wrote:
Code:
foreach: char[] is not an array of char[]
make: *** [build] Error 1



I started putting in support for the -LIBPATH= switch but didn't finish doing it. That is now done.

So now you can do ...
Code:

build myapp.d -LIBPATH=c:\mylibs;c:\otherlibs

and it transforms it into the appropriate format for Windows and Unix.

The ZIP is updated.

Thanks again guys.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Fri May 27, 2005 12:00 am    Post subject: Reply with quote

Well... it compiled, and I got something interestingly difference this time:
Code:

... qdruid/workspace/include/mango/io/Exception.o /home/teqdruid/workspace/include/mango/xml/dom/model/Element.o -o test dl.a -lphobos -lpthread -lm -Xlinker -l-version=Posix
gcc: dl.a: No such file or directory
--- errorlevel 1


I think I added the -version=Posix to my .brf since my first report on this beta.

Sorry I'm not more familiar with the build code, otherwise I'd send a patch.

Quote:
Thanks again guys.

Thanks for build
Back to top
View user's profile Send private message Send e-mail AIM Address
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Fri May 27, 2005 1:11 am    Post subject: Reply with quote

teqdruid wrote:
Well... it compiled, and I got something interestingly difference this time:
Code:

... qdruid/workspace/include/mango/io/Exception.o /home/teqdruid/workspace/include/mango/xml/dom/model/Element.o -o test dl.a -lphobos -lpthread -lm -Xlinker -l-version=Posix
gcc: dl.a: No such file or directory
--- errorlevel 1


I think I added the -version=Posix to my .brf since my first report on this beta.

Sorry I'm not more familiar with the build code, otherwise I'd send a patch.


I guess the two odd things are the it doesn't have "-L-ldl.a" instead of just "dl.a", and that it has "-lversion=Posix".

The first I think I've tracked down and fixed. The second I haven't got a clue. What have you got in the BRF file? You should have ...
Code:

-version=Posix

but that isn't really needed as Build inserts that anyway when being used in a Unix environment.

The ZIP has been updated again.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Fri May 27, 2005 11:59 am    Post subject: Reply with quote

OK. We're getting real close here. Now I'm getting:
Code:
....
lient.o /home/teqdruid/workspace/include/mango/io/Exception.o /home/teqdruid/workspace/include/mango/xml/dom/model/Element.o -o test -lphobos -lpthread -lm -Xlinker -ldl.a
/usr/bin/ld: Warning: size of symbol `_D3std6stdarg9va_arg_Aa6va_argFKPvZAa' changed from 23 in /home/teqdruid/workspace/include/mango/xml/rpc/objects.o to 34 in /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libphobos.a(format.o)
/usr/bin/ld: cannot find -ldl.a
collect2: ld returned 1 exit status
--- errorlevel 1

This is close- the .a just has to be removed so it's not -ldl.a but just -ldl

After running a few other quick tests, this seems to be the only problem left concerning this issue.

John
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build 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