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).
However when I do this, there are some errors like,
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).
However when I do this, there are some errors like,
Hello Kiat
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@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@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.
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).However when I do this, there are some errors like,
***************************************************************
u0201201@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.)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@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'********************************************************
The lli tool doesn't work as well.However, llvm-dis,llc,gcc hello.s -o hello.native,./hello.native work.
(I have not try with the other tools yet)Your help will be very much appreciated.
Good going thats about where I got to
Thats about the state of play with Cygwin. llvm-gcc is broke on Cygwin.
I believe you can use the other llvm tools to get a hello world assembled and linked, using ld. Have not tried it yet though.
Aaron
Hi,
I am wondering whether the bytecode generated by my llvm-gcc is correct?
When I run
$ llvm-gcc hello.c -o hello
What I get is hello.exe.bc, and hello.exe (I can actually llvm-dis the
bytecode file which is hello.exe.bc).
However, I do not get a shell script(named hello) as stated in the
documentation...
Best Regards,
Kiat
The documentation is a bit Unix-centered in that respect, on Windows and
Cygwin, executables require the .exe suffix, so your shell script is
named "hello.exe" .
Hi,
I am wondering whether the bytecode generated by my llvm-gcc is correct?
Should be.
When I run
$ llvm-gcc hello.c -o hello
Try llvm-gcc with a -v option and you will see what is going on.
Basically gccld is being passes some libraries names for windows that gccld
thinks are bytecode achive library files !
However, I do not get a shell script(named hello) as stated in the
documentation...
right, never looked for it, have a look to see if it is in the source.
I have some preliminary HTML documentation for installing llvm and cfronend.
http://angray.members.beeb.net/llvm/MakingLLVM.html
Unfortunately when checking it on a second machine I could not get
binutils-2.15 to build on it.
Would you have a look at the documentation and if you can see why binutils
would not build I would be very greatfull.
Aaron
Hi,
Maybe I can provide you with the installation steps that I done in my machine.
What I did is,
1. first install cygwin, I attached a list of the packages I
installed. (there are quite a lot of packages)
2. build the binutils-2.15.
3. Then gcc-3.4.3. (I am using the new binutils which is the 2.15)
4. Next, I follow the instructions in the LLVM documentation to
further build the cfrontend then LLVM.
Hope that it helps.
Regards,
Kiat
install.txt (1.43 KB)
1. first install cygwin, I attached a list of the packages I
installed. (there are quite a lot of packages)
Yes, there are alot of unnessasary packages for LLVM.
Aaron