Duncan Pierce
2009-Jan-18 12:58 UTC
[LLVMdev] Build problems on MinGW solved - possible llvm-config bug
Óscar Fuentes <ofv <at> wanadoo.es> writes:> Duncan Pierce <duncan <at> duncanpierce.org> writes: > > > I have /lib/libimagehlp.a and /lib/libpsapi.a > > And llvm-config seems to be asking for them to be picked up: > > > > -I//include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2 > > -fomit-frame-pointer -Woverloaded-virtual > > -L//lib -lpsapi -limagehlp -lm > > -lLLVMCore -lLLVMSupport -lLLVMSystem > > > > So I'm still mystified. > > Put them at the end of the library list: > > -lLLVMCore -lLLVMSupport -lLLVMSystem -limagehlp -lpsapi -lmThis works. I had a look at changing the llvm-config.in.in but my Perl hacking skills aren't up to getting --libnames and --libfiles to work as well as --libs. I discovered one other thing that was causing me problems on MinGW: if I use the msys.bat to open a terminal llvm-config inserts double slashes at the start of any absolute path it generates (e.g. //lib/LLVMX86CodeGen.o) - this breaks g++. If I do the same thing from a DOS prompt running bash, slashes don't get doubled and everything works fine. Thanks once again Óscar and Anton. Duncan Pierce
Óscar Fuentes
2009-Jan-18 13:20 UTC
[LLVMdev] Build problems on MinGW solved - possible llvm-config bug
Duncan Pierce <duncan at duncanpierce.org> writes:>> > I have /lib/libimagehlp.a and /lib/libpsapi.a >> > And llvm-config seems to be asking for them to be picked up: >> > >> > -I//include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2 >> > -fomit-frame-pointer -Woverloaded-virtual >> > -L//lib -lpsapi -limagehlp -lm >> > -lLLVMCore -lLLVMSupport -lLLVMSystem >> > >> > So I'm still mystified. >> >> Put them at the end of the library list: >> >> -lLLVMCore -lLLVMSupport -lLLVMSystem -limagehlp -lpsapi -lm > > This works. I had a look at changing the llvm-config.in.in but my Perl hacking > skills aren't up to getting --libnames and --libfiles to work as well as --libs.Would you like to file a bug report? This is the way of getting it fixed.> I discovered one other thing that was causing me problems on MinGW: if I use the > msys.bat to open a terminal llvm-config inserts double slashes at the start of > any absolute path it generates (e.g. //lib/LLVMX86CodeGen.o) - this breaks g++. > > If I do the same thing from a DOS prompt running bash, slashes don't get doubled > and everything works fine.This one also deserves a bug report. My guess is that llvm-config is throwing backslashes (\) which are escaped at some intermediate point and finally translated to double slashes by MSYS.> Thanks once again Óscar and Anton.You're welcome. -- Oscar
Duncan Pierce
2009-Jan-18 14:59 UTC
[LLVMdev] Build problems on MinGW solved - possible llvm-config bug
>> This works. I had a look at changing the llvm-config.in.in but my Perl hacking >> skills aren't up to getting --libnames and --libfiles to work as well as --libs. > > Would you like to file a bug report? This is the way of getting it > fixed.Done (3347)> This one also deserves a bug report. My guess is that llvm-config is > throwing backslashes (\) which are escaped at some intermediate point > and finally translated to double slashes by MSYS.3348 - I've taken the liberty of pasting your comment here into the report. Duncan Pierce
Anton Korobeynikov
2009-Jan-18 15:02 UTC
[LLVMdev] Build problems on MinGW solved - possible llvm-config bug
Hello, Duncan> I discovered one other thing that was causing me problems on MinGW: if I use the > msys.bat to open a terminal llvm-config inserts double slashes at the start of > any absolute path it generates (e.g. //lib/LLVMX86CodeGen.o) - this breaks g++.That's strange, never seen this before. Do you have two different version of perl installed? (for example, one msys DTK and another one - standalone ActivePerl, etc.) -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Duncan Pierce
2009-Jan-18 15:13 UTC
[LLVMdev] Build problems on MinGW solved - possible llvm-config bug
2009/1/18 Anton Korobeynikov <anton at korobeynikov.info>:> Hello, Duncan > >> I discovered one other thing that was causing me problems on MinGW: if I use the >> msys.bat to open a terminal llvm-config inserts double slashes at the start of >> any absolute path it generates (e.g. //lib/LLVMX86CodeGen.o) - this breaks g++.> That's strange, never seen this before. Do you have two different > version of perl installed? (for example, one msys DTK and another one > - standalone ActivePerl, etc.)I have a /usr/bin/perl.exe (bash under DOS prompt finds this one) and a /bin/perl.exe (msys.bat finds this one). But these are the same according to diff --binary. I only installed one. In fact, I deleted my entire first MinGW installation when I first found I couldn't llvm working and reinstalled cleanly, using perl from msys. Duncan
Reasonably Related Threads
- [LLVMdev] Build problems on MinGW solved - possible llvm-config bug
- [LLVMdev] Build problems on MinGW solved - possible llvm-config bug
- [LLVMdev] Working on getting MingW32/native tools-only source build up
- [LLVMdev] mingw binary is corrupt
- [LLVMdev] Compiling LLVM 2.7 with MinGW GCC 4.5.0