Dear All,<br><br>Over the past months I've had quite a bit of trouble building llvm 2.9 and 3.0 using MinGW+MSYS+Perl 5.6.1 for MSYS on a Windows XP SP 3 computer. I should also specify that I was consistently not using "--enable-shared" in the configure script when I saw this issue. I was using "--enable-optimized" and "--disable-assertions". How much of that is relevant to this particular problem, I don't really know. There were plenty of problems that turned out to be my own fault, but eventually I hit a snag that I couldn't attribute to myself. llvm-config was failing to produce dependencies list for all of the core libraries (e.g. llvm/Release/lib). At first I didn't know much of how to address this issue, but I finally these past few days tracked the issue to /llvm/utils/GenLibDeps.pl. Essentially, my environment differed enough from my other computer (Linux) to the point where the "chomp" command in the while(<UNDEFS>) loops in gen_one_entry() was apparently not stripping CR characters ('\r' or '\x0D') from the key that was to be tested ($_). So, for example:<br>
<br># Earlier in the script, associating symbols with the library they are defined in.<br>$libdefs{"llvm_foo_symbol"} = "llvm_foo_library.a";<br><br># Later on, trying to generate dependency lists, but it's destined to fail, b/c "chomp" isn't doing enough chomping.<br>
if(defined $libdefs{"llvm_foo_symbol\r"} ... ) { ... }<br><br>For the record, I have built llvm using a Linux distro with far fewer hiccups. And I seem to recall that building llvm with this same MinGW environment but using --enable-shared worked somewhat, but I can't recall if I had to do some makefile hacking to make that work as well. The only reason I mention it is that I think I saw llvm-config as an *.exe once, rather than as a shell script. Let me know if I'm talking craziness.<br>
<br>I am not at all a frequent Perl coder, so please review this patch with an extra hint of caution.<br><br>Sincerely,<br>~MathOnNapkins (Dave)<br>