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

Linux Issues in Build 3.01

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Jun 20, 2006 12:11 am    Post subject: Linux Issues in Build 3.01 Reply with quote

I'm not sure of the status of the the linux fix. I've been looking into this and came across a recent post on the d newsgroup by a person called Xebes:

Quote:
I had the same problem. The cause seems to be the commas. I replaced the comma
in line 1445 of build.d with a whitespace and inserted LINKSWITCH=-lpthread in
build.cfg. Then it worked for me with a simple hello world program.


(NOTE: the test build was build itself with a "build build.d" and "build @full.brf")

I replaced the comma on that line with a " " and it fixed that particular problem; but unfortunately this revealed another issue. Removing lines 1450 and 1451 fixed that (actually 1449 could be removed as well). Basically that prevented the replacement of a "util/str.o" with "uti /str.o" which was showing up in the command line list (creating havoc).

So now we arrive at the final issue. Doing a "build build.d" with the above fixes in place results in all files in the current directory getting compiled by dmd to object files, but apparently build does not do anything to the ones in the util directory. This causes gcc to stop on error for all util/*.o files (which don't exist):

Code:
gcc: util/str.o: No such file or directory
gcc: util/str_bn.o: No such file or directory
gcc: util/linetoken.o: No such file or directory
.... and so on ....


I'm not sure how to describe or troubleshoot this in more detail. The last version working properly on linux was version 2.09.

Thanks,

JJR
Back to top
View user's profile Send private message
Derek Parnell



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

PostPosted: Tue Jun 20, 2006 12:27 am    Post subject: Reply with quote

Thanks. I have actually fixed this one but I've been short of time to get a new release out the door. I've been working on the Harmonia build problem today and I've just managed to find the bug, so I should have a new release in the next 12-24 hours.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
Bradley Smith



Joined: 20 Jun 2006
Posts: 60

PostPosted: Tue Jun 20, 2006 2:52 am    Post subject: Reply with quote

Here is a patch for some issues with using subversion revision 47 on Linux with DMD 0.161:

Quote:
Code:
Index: Makefile.unix
===================================================================
--- Makefile.unix       (revision 47)
+++ Makefile.unix       (working copy)
@@ -9,4 +9,4 @@

 clean:
        rm -f *.o build
-       fm -r util/*.o
+       rm -r util/*.o
Index: build.d
===================================================================
--- build.d     (revision 47)
+++ build.d     (working copy)
@@ -134,6 +134,7 @@
             char[] vLibrarianOpts = `-c -p256`;
             char[] vHomePathId = "HOME";
             char[] vEtcPath    = "";
+            char[] vOutFileSwitch = "-of";
         }

         version(Posix) {
@@ -151,12 +152,12 @@
             char[] vLibrarianOpts = `-r`;
             char[] vHomePathId = "HOME";
             char[] vEtcPath    = "/etc/";
+            char[] vOutFileSwitch = "-o";
         }

         char[]     vVersionSwitch = "-version";
         char[]     vDebugSwitch = "-debug";
         char[][]   vCompilerDefs;
-        char[]     vOutFileSwitch = "-of";
         char[]     vImportPath = "-I";
         bool       vUseModBaseName = false;
         char[]     vLinkLibSwitch = "-l";
@@ -1442,14 +1443,21 @@
             {   // using commandline; may run into limits
                 version(DigitalMars)
                 {
-                    lCommandLine=std.string.replace(lCommandLine, "\n", ",");
-                    // Locate switches and change delim from a comma to a blank,
-                    // then remove any trailing comma too.
-                    int lPos = std.string.find(lCommandLine, "/");
-                    if (lPos != -1)
-                        lCommandLine[lPos-1] = ' ';
-                    if (lCommandLine[$-1] == ',')
-                        lCommandLine[$-1] = ' ';
+                    version(Posix)
+                    {
+                        lCommandLine=std.string.replace(lCommandLine, "\n", " ");
+                    }
+                    else
+                    {
+                        lCommandLine=std.string.replace(lCommandLine, "\n", ",");
+                        // Locate switches and change delim from a comma to a blank,
+                        // then remove any trailing comma too.
+                        int lPos = std.string.find(lCommandLine, "/");
+                        if (lPos != -1)
+                            lCommandLine[lPos-1] = ' ';
+                        if (lCommandLine[$-1] == ',')
+                            lCommandLine[$-1] = ' ';
+                    }
                 }
                 version(GNU)
                     lCommandLine=std.string.replace(lCommandLine, "\n", " ");
@@ -2053,9 +2061,9 @@
                     lPaths[$-1] ~= lChar;

             }
-            for(int i = 0; i < lPaths.length; i++)
+            for(int j = 0; j < lPaths.length; j++)
             {
-                lPaths[i] = std.string.strip(lPaths[i]);
+                lPaths[j] = std.string.strip(lPaths[j]);
             }

             foreach( char[] lPath; lPaths)
@@ -2489,6 +2497,7 @@
         {
             vDefaultLibs ~= "c";
             vDefaultLibs ~= "phobos";
+            vDefaultLibs ~= "pthread";
             vDefaultLibs ~= "m";
         }
     }
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build All times are GMT - 6 Hours
Page 1 of 1

 
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