[LLVMdev] LLVM Cygwin Run Errors

Reid Spencer reid at x10sys.com
Tue May 24 22:10:38 PDT 2005


Hello Kiat

On Wed, 2005-05-25 at 10:21 +0800, thean kiat sew wrote:
> Hi, 
> 
> I installed the cfrontend 1.5 and LLVM 1.5 from source in cygwin
> successfully using GCC3.4.3 and binutils2.15 (as in makefiles do not
> complain errors except some warnings).

Great!

> 
> However when I do this, there are some errors like,
> 
> ***************************************************************
> u0201201 at 9nnvf2ay /home/cfrontend/install/lib
> $ llvm-ranlib libiberty.a
> llvm-ranlib: Error opening archive file: libiberty.a
> 
> ****************************************************************
> This happens to llvm-ranlib libiberty.a, llvm-ranlib libstdc++.a,
> llvm-ranlib libsupc++.a too. May I know what is the cause and how to
> solve it? (I saw a post similar to this, but there is no solution
> provided.)

Unfortunately there isn't a solution right now. This isn't a problem, it
only makes things slower not incorrect. Unfortunately I have lost my
Cygwin machine (disk failure) so I can't diagnose this for you. If you
want to take a stab at debugging llvm-ranlib and discovering why it is
failing to open the file, that would be a great help to us. The error
message is coming from a sys::Path method when it tries to open
libiberty.a. Chances are its a path construction problem involving a
space on Windows. Try installing llvm-ranlib into a path that doesn't
have a space in it?

> Another problem is when I run hello.c which is
>    #include <stdio.h>
>    int main() {
>      printf("hello world\n");
>      return 0;
>    }
> 
> I got this,
> *******************************************************
> u0201201 at 9nnvf2ay /home
> $ llvm-gcc hello.c -o hello
> gccld: warning: Cannot find library 'user32'
> gccld: warning: Cannot find library 'kernel32'
> gccld: warning: Cannot find library 'advapi32'
> gccld: warning: Cannot find library 'shell32'
> 
> ********************************************************

This isn't a big deal. Its just the llvm-gcc linker warning you that its
default search path couldn't find the required libraries to link with.
This doesn't affect the generated bytecode file.

> The lli tool doesn't work as well. 

LLI is known not to work on Cygwin. Cygwin has problems with resolving
symbols via dlsym when the symbol is in the executable and not in one of
the DLLs

> 
> However, llvm-dis,llc,gcc hello.s -o hello.native,./hello.native work.
> (I have not try with the other tools yet)

I'm glad at least part of it is working for you. Unfortunately we simply
don't have the resources to address Cygwin ports at this time. If you
find any solutions to the above problems, please let us know and we'll
gladly accept patches against it.

> 
> Your help will be very much appreciated. 

> Regards,
> Kiat
> 

Thanks for trying LLVM on Cygwin and letting us know your experience.

Reid.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050524/7e5877d8/attachment.sig>


More information about the llvm-dev mailing list