[LLVMdev] version 1.0, compiling under cygwin

Chris Lattner sabre at nondot.org
Sat Oct 25 12:01:10 PDT 2003


On Sat, 25 Oct 2003, Valery A.Khamenya wrote:
>   (just for fun) I've tried to compile LLVM under cygwin.
>   With "make -k" I got only:

Cool.  We don't rountinely use this configuration, so there may be a bit
of leg work you'll have to do... :)  But that said, we would love to get
LLVM working cleanly on it!

> -----------------
> DynamicLinker.cpp: In function `void* GetAddressOfSymbol(const char*)':
> DynamicLinker.cpp:40: error: `RTLD_DEFAULT' undeclared (first use this
>    function)
> DynamicLinker.cpp:40: error: (Each undeclared identifier is reported only once
>    for each function it appears in.)
> -----------------
>
> well, the only value supported in cygwin's dlfcn.h are RTLD_LAZY,
> RTLD_NOW and RTLD_GLOBAL.

Does the cygwin version of dlopen return the main process if 0 is passed
in as the first parameter?  The wording in the linux man page looks like
this:

       If filename is a NULL pointer, then the returned handle is for the
       main program.

If so, this patch should fix the problem.  Let me know if it helps:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031020/008818.html

> than compilation itself finished, just linkage failed with one screen
> output!
> The beginning of output is here (sorry if it is too much for this
> maillist...) :
> -------------------------------------
> /cygdrive/w/tmp/llvm/llvm/lib/Support/Debug/CommandLine.o(.stab+0xce68): In function `GLOBAL__D__ZN2cl23ParseEnvironmentOptionsEPKcS1_S1_':

I believe that this is due to a known bug in the Cygwin linker.  See this
thread:
http://sources.redhat.com/ml/binutils/2003-08/msg00218.html

If you upgrade to the latest and greatest, this may be fixed.

> and the last issue was "etags: Unknown option: -l"
> Remark:
> ---------------------------------
> bash-2.05b$ etags.exe --version
> Exuberant Ctags 5.5, Copyright (C) 1996-2003 Darren Hiebert
>   Compiled: Jun  5 2003, 10:00:19
>   Addresses: <dhiebert at users.sourceforge.net>, http://ctags.sourceforge.net
>   Optional compiled features: +wildcards, +regex, +internal-sort
> ---------------------------------

Interesting.  The etags I have is part of emacs itself:
$ etags --version
etags (GNU Emacs 21.1.14)
Copyright (C) 1996 Free Software Foundation, Inc. and Ken Arnold
This program is distributed under the same terms as Emacs

The autoconf test for etags should not allow this version I guess.  For
now, you can just comment out the 'ETAGS =' line in your top level
Makefile.config.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list