[LLVMdev] Subversion head: build problem on cygwin?

Sam Bishop sam at bishop.dhs.org
Tue Mar 11 14:57:20 PDT 2008


Hi, Jules.

On Tue, March 11, 2008 2:14 pm, Jules wrote:
> Not sure if this is me or not, because this is the first time I've built
> LLVM on Cygwin, but I can't get a working compile.

Last I checked, LLVM-on-Cygwin has at least two problems, and you've hit
one of them.  Working around them isn't too bad, though patches to fix
them would be appreciated.

> llvm::sys::Path::GetMainExecutable(const char*, void*)':
> Unix/Path.inc:256: error: `Dl_info' undeclared (first use this function)
> Unix/Path.inc:256: error: (Each undeclared identifier is reported only
> once for each function it appears in.)
> Unix/Path.inc:256: error: expected `;' before "DLInfo"
> Unix/Path.inc:257: error: `DLInfo' undeclared (first use this function)
> Unix/Path.inc:257: error: `dladdr' undeclared (first use this function)
> ...
> Any ideas?

What LLVM is trying to do here is determine its own path.  I don't know
if the approach being used will work on Cygwin.  (The code is very new,
and it's never worked on Cygwin.)  You could try reading the
/proc/$$/exe symlink.  I don't know how long Cygwin has been emulating
/proc, though.

Once you get past that, the other build errors you'll get will be due to
code assuming that uint32_t is typedefed to int.  On 32-bit Cygwin, it's
typedefed to long.  (They're the same size, but it still confuses the
compiler.)  This is an on-going problem, and I only use Cygwin in a
pinch, so I've just modified the 32-bit typedefs in my
/usr/include/stdint.h file.  I've chosen to fight other battles.  :)

Hope this helps.

Sam




More information about the llvm-dev mailing list