Like I said, it is in my path. That's not enough. I'd be happy if Morten chimed in with any suggestions as to how he got it to work. On Thu, 04 Nov 2004 18:45:18 -0800 Reid Spencer <reid at x10sys.com> wrote:> Two suggestions: > > 1. m4 might be located by your PATH variable. > 2. Talk to Morten Ofstad about how he got it to work. > > Reid. > > On Wed, 2004-11-03 at 19:34, Jeff Cohen wrote: > > I have problems getting the GNU tools to execute properly. I installed > > bison, sed, and flex from gnuwin32.sourceforge.net as suggested in the > > README. The installers for these packages did not want to put them in > > the llvm/win32/{tools,share} directory, which is unfortunately where the > > project files expect them to be. I copied the files manually to these > > directories, but bison still refuses to work. I get: > > > > ..\tools\bison: m4: No such file or directory > > > > m4.exe is present in the same directory as bison. I don't know where > > bison expects to find it. I know where it would expect to find it on > > Unix, but that directory does not exist on a Windows system. Yes, m4.exe > > is in the path, but that's not good enough for bison. It's also present > > where their installer put it; that's not good enough either. > > > > Sigh... this is precisely why I hate using GNU software under Windows, > > because gotchas like this keep happening. I suppose I can always build > > my own binaries from the sources; that would solve the problem if > > nothing else will... once I figure out how bison locates m4... but not > > tonight. > > > > On Wed, 3 Nov 2004 09:03:28 -0800 > > Jeff Cohen <jeffc at jolt-lang.org> wrote: > > > > > I'll try and verify it later tonight. > > > > > > On Wed, 03 Nov 2004 08:18:51 -0800 > > > Reid Spencer <reid at x10sys.com> wrote: > > > > > > > The Visual Studio project files that Morten Ofstad provided have been committed > > > > to CVS in the win32 directory. I would appreciate it if Morten and at least one > > > > other win32 developer could verify that the files work correctly as committed. > > > > > > > > Thanks, > > > > > > > > Reid. > > > > > > > > _______________________________________________ > > > > LLVM Developers mailing list > > > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > > > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > _______________________________________________ > > > LLVM Developers mailing list > > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >
Solved it. Looking at the source of bison, I found an undocumented environment variable M4 that points to the m4 binary. Setting it to the absolute path did the job. When not present, it ought to find it in the path as it uses execvp. At least on Unix. I have no idea what it does on Windows as I could not get the source used to build the Windows version (the installer claimed it installed the source, but it didn't). The link of tablegen fails still fails, though, complaining of a missing support.lib. This is due to a bug in the debug configuration of tablegen (and is not present in the release configuration). Patch attached. Watching this thing build, what comes to mind is that it would go a whole lot faster if we could use precompiled header files. Unfortunately, there's no way to do this with VC++ without modifying every *.cpp file. On the other hand, doesn't gcc support precompiled header files also? Not that it necessarily does it in even remotely the same way... The build finally gets to Fibonacci and fails with: c:\llvm\examples\Fibonacci\fibonacci.cpp(111) : error C2065: 'args' : undeclared identifier c:\llvm\examples\Fibonacci\fibonacci.cpp(111) : error C2228: left of '.IntVal' must have class/struct/union type I don't how this compiles with gcc. "args" is mispelled. Should be "Args". Patch attached for this also. Also, the llvm.suo file should not be in the repository. This has per-user configuration settings for VS. I'm surprised you even knew it was there to be checked in, as it's a hidden file. This file had hard-coded paths to Morten's setup, and even had his breakpoints in it. So... once these problems are fixed, I run fibonacci and get the following output: --------- implementation ; Functions: int %fib(int %AnArg) { EntryBlock: %cond = setle int %AnArg, 2 ; <bool> [#uses=1] br bool %cond, label %return, label %recurse return: ; preds = %EntryBlock ret int 1 recurse: ; preds = %EntryBlock %arg = sub int %AnArg, 1 ; <int> [#uses=1] %fibx1 = call int %fib( int %arg ) ; <int> [#uses=1] %arg1 = sub int %AnArg, 2 ; <int> [#uses=1] %fibx2 = call int %fib( int %arg1 ) ; <int> [#uses=1] %addresult = add int %fibx1, %fibx2 ; <int> [#uses=1] ret int %addresult } --------- starting fibonacci(10) with JIT... Result: 55 I assume this is correct. -------------- next part -------------- A non-text attachment was scrubbed... Name: win.diffs Type: application/octet-stream Size: 1204 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041104/4e4d4aef/attachment.obj>
On Thu, 4 Nov 2004, Jeff Cohen wrote:> path as it uses execvp. At least on Unix. I have no idea what it does > on Windows as I could not get the source used to build the Windows > version (the installer claimed it installed the source, but it didn't).Wierd.> The link of tablegen fails still fails, though, complaining of a missing > support.lib. This is due to a bug in the debug configuration of > tablegen (and is not present in the release configuration). Patch > attached.Ok, applied, thanks! http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041101/020249.html> Watching this thing build, what comes to mind is that it would go a > whole lot faster if we could use precompiled header files.I don't know of a good way to do that. Personally, I'm a big fan of just putting as little into #includes as possible, instead of relying on PCH.> The build finally gets to Fibonacci and fails with: > > c:\llvm\examples\Fibonacci\fibonacci.cpp(111) : error C2065: 'args' : undeclared identifier > c:\llvm\examples\Fibonacci\fibonacci.cpp(111) : error C2228: left of '.IntVal' must have class/struct/union type > > I don't how this compiles with gcc. "args" is mispelled. Should be > "Args". Patch attached for this also.This was a transient bug in CVS that you must have just been unlucky to get, sorry about that.> Also, the llvm.suo file should not be in the repository. This has > per-user configuration settings for VS. I'm surprised you even knew it > was there to be checked in, as it's a hidden file. This file had > hard-coded paths to Morten's setup, and even had his breakpoints in it.Ok, nuked. http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041101/020250.html> starting fibonacci(10) with JIT... > Result: 55 > I assume this is correct.Yup, this is right! Does this mean that you guys don't need the hack to pull in the X86 backend by force on Win32? -Chris -- http://llvm.org/ http://nondot.org/sabre/