[LLVMdev] mingw binary is corrupt

Reid Spencer rspencer at reidspencer.com
Tue Nov 28 11:28:46 PST 2006


Hi SevenThunders,

On Tue, 2006-11-28 at 10:43 -0800, SevenThunders wrote:

> After launching Msys and setting my path to include llvm/bin I tried to run
> llvm-config but apparently that is not on my path since it's in the
> directory llvm/release/bin

Yup.

> 
> doing make clean followed by make in tools/llvm-config ends up failing at
> the same place.

That won't work. llvm-config depends on the libraries being built. It
extracts the dependencies between the libraries as its main feature. 

Have you read http://llvm.org/GettingStarted.html ?

> So I went back to the llvm directory ran ./configure again (I can't remember
> if I ran this the first time.) 

Its definitely required.

> and then did
> make clean
> followed by 
> make
> 
> I now fail at yet another place, I'm not even sure if this is before or
> after the last failure
> 
> llvm[2]: ======= Finished Linking Release Executable BFtoLLVM (without
> symbols)
> make[2]: Leaving directory `/d/Apps/llvm/examples/BFtoLLVM'
> make[2]: Entering directory `/d/Apps/llvm/examples/ParallelJIT'
> llvm[2]: Compiling ParallelJIT.cpp for Release build 
> ParallelJIT.cpp:20:21: pthread.h: No such file or directory
> ParallelJIT.cpp:212: error: `pthread_cond_t' does not name a type
> ParallelJIT.cpp:212: error: extra semicolon
> ParallelJIT.cpp:213: error: `pthread_mutex_t' does not name a type
> ParallelJIT.cpp:213: error: extra semicolon
> .... lots more errors
> 
> pthread.h does not exist anywhere in the llvm directory so it must assume
> that it's a system file.

pthread is the posix threading library. I doubt its available on Windows
unless you're using Interix as well (sounds like you're not).  The above
errors are completely understandable for win32.  You can forgo building
the examples by using "make tools-only".

However, the makefiles shouldn't even build this unless pthread is
available. Looks to be a bug in the makefiles.

> 
> Well after some google searches I found this site
> http://www.gnunet.org/hacking_win32_build.php3
> 
> They had some links to a windows version of pthread released under an LGPL
> license.  Following their instructions, I installed the library, include
> files and a .dll file into the mingw directories.  This  permitted the build
> to finish!  Now I'll have to test it I suppose.

Good deal :)

> 
> Thanks for the help.

You're welcome. Glad you got it built.

Reid.





More information about the llvm-dev mailing list