Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

make fails on MinGW+MSYS / some libraries don't get created #11244

Open Quuxplusone opened 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR11050
Status NEW
Importance P normal
Reported by gyorokpeter@freemail.hu
Reported on 2011-10-02 13:47:17 -0700
Last modified on 2012-12-23 15:00:21 -0800
Version trunk
Hardware PC Windows NT
CC anton@korobeynikov.info, geek4civic@gmail.com, llvm-bugs@lists.llvm.org, valtron2000@gmail.com
Fixed by commit(s)
Attachments errors.zip (74002 bytes, application/x-sdlc)
llvm.zip (77357 bytes, application/x-sdlc)
Blocks
Blocked by
See also

When I try to run make from msys it fails at opt.exe with about 7000 "undefined reference" errors in AnalysisWrappers.o. This happens with 2.8, 2.9 and the SVN versions.

Operating system: Windows 7 (64-bit)

Quuxplusone commented 12 years ago

Do you have msys perl installed? Or you're using ActivePerl?

Quuxplusone commented 12 years ago

I'm using perl "v5.8.8 built for msys-64int".

Quuxplusone commented 12 years ago

Please attach the whole console output for the error.

Quuxplusone commented 12 years ago

Attached errors.zip (74002 bytes, application/x-sdlc): Error log (zipped to fit in size limit)

Quuxplusone commented 12 years ago

Please attach the same file for "make VERBOSE=1"

Quuxplusone commented 12 years ago

Attached llvm.zip (77357 bytes, application/x-sdlc): Error+stdout log

Quuxplusone commented 12 years ago
(In reply to comment #6)
> Created an attachment (id=7396) [details]
> Error+stdout log
>
> The error log is the same, so I have included the standard output too if it
> helps.
It looks like not all necessary libraries are linked in. This might be due to
broken llvm-config which, in turn, might be due to broken perl / system tools.
The latter is quite probable given that everything works for me and for bunch
of other people for 2.8, 2.9 and svn tot.
Quuxplusone commented 12 years ago
(In reply to comment #7)
> (In reply to comment #6)
> > Created an attachment (id=7396) [details] [details]
> > Error+stdout log
> >
> > The error log is the same, so I have included the standard output too if it
> > helps.
> It looks like not all necessary libraries are linked in. This might be due to
> broken llvm-config which, in turn, might be due to broken perl / system tools.
> The latter is quite probable given that everything works for me and for bunch
> of other people for 2.8, 2.9 and svn tot.

Which tools does this exactly refer to? I installed MinGW/MSYS using the
installer available from mingw.org, which automatically downloads the newest
version of everything. Are there "less broken" versions than that somewhere?
Quuxplusone commented 12 years ago
I have fixed it by putting the MSYS bin directory to the beginning of %PATH%
(previously it was at the end). Also I had to put the external tools like
graphviz and doxygen out of the "Program Files" directory and into a directory
with no space in the name.

Now make runs successfully. During make install, sometimes I got the error that
strip.exe couldn't create a file because it already exists, but after a few
runs it went through.

Now the only remaining problem is that the following libraries don't get
created:
-lLLVMXCoreAsmPrinter
-lLLVMSystemZAsmPrinter
-lLLVMSparcAsmPrinter
-lLLVMPIC16AsmPrinter
-lLLVMPIC16CodeGen
-lLLVMPIC16Info
-lLLVMMSIL
-lLLVMMSILInfo
-lLLVMMipsAsmPrinter
-lLLVMDebugger
-lLLVMCellSPUAsmPrinter
-lLLVMBlackfinAsmPrinter
-lLLVMAlphaAsmPrinter
-lLLVMSystem
Quuxplusone commented 12 years ago

I supposed MSYS bash shell login script might insert his path at first.

Quuxplusone commented 11 years ago

Greetings. I've been engaged on an adventure building LLVM on MinGW32 for the past three days, and I've come to that journey's end.

I (hopefully completely) documented what I did in the wiki for a project I was hoping to use LLVM for (llvmpy, actually, but that's a different story).

If you follow the instructions here: https://github.com/valtron/owl/wiki/Build-LLVM-with-MinGW32-and-MSYS, you should be able to build LLVM and compile and run the Kaleidoscope example.

I plan to post a bug report for llvm-config.cpp once I get a diff in order. But I'm posting this here (even though this bug is over a year old) hoping that this information will be helpful to others using MinGW.