[LLVMdev] [Cygwin] 'make tools-only' configuration error

Reid Spencer reid at x10sys.com
Tue May 31 15:00:40 PDT 2005


Aaron,

Comments inline ...

On Tue, 2005-05-31 at 21:15 +0100, Aaron Gray wrote:
> I did not report this first error earlier as I thought it trivial.
>  
> Basically it looks like something odd is happening with the
> configuration and 'include/llvm/config/config.h'
>  
> Getting this error on building the tools on a fresh Cygwin install and
> update :-
>  
> $ make tools-only
> make[1]: Entering directory `/usr/build/llvm/lib/System'
> llvm[1]: Compiling Path.cpp for Debug build
> In file included from /usr/src/llvm/lib/System/Path.cpp:104:
> /usr/src/llvm/lib/System/Unix/Path.inc: In static member function
> `static llvm::
> sys::Path llvm::sys::Path::GetTemporaryDirectory()':
> /usr/src/llvm/lib/System/Unix/Path.inc:93: error: `mkdtemp' undeclared
> (first us
> e this function)

This is definitely a configure problem. If mkdtemp function was found
(and it was because HAVE_MKDTEMP was set to 1) then it should find
mkdtemp in the headers. 

> /usr/src/llvm/lib/System/Unix/Path.inc:93: error: (Each undeclared
> identifier is
>  reported only once for each function it appears in.)
> make[1]: *** [/usr/build/llvm/lib/System/Debug/Path.o] Error 1
> make[1]: Leaving directory `/usr/build/llvm/lib/System'
> make: *** [all] Error 1
>  
> On commenting out the "#define HAVE_MKDTEMP 1" this error is bypassed,
> but what is leading to this error ?

I don't know, possibly they moved the header file in which mkdtemp is
defined in your new version of Cygwin.
>  
> This happens on a new fresh install of Cygwin, GCC 3.4.3, binutils
> 2.15, and fresh llvm from CVS !

That all sounds right to me. Must be the "new" version of Cygwin. Go
to /usr/include and do this:

find . -name '*.h' -exec grep mkdtemp {} \; -print

and let me know if you get any output. The output will tell you which
header file mkdtemp is defined in. Make sure that is the header that is
included in lib/System/Unix/Path.inc (it might be a few #includes
removed).

>  
> And it is repeatable. Either I am doing something basic wrong or there
> is an issue here, what I do not understand is why I did not run into
> it when we (Reid Spencer and myself) did the previous Cygwin debugging
> session.
>  
> It looks like the configure script is failing drastically, I am
> confused.

That would be bad for this entire process. How is it failing? Any output
from it?

>  
> Still getting the previous error :-
>  
> llvm[2]: Linking Debug executable llc
> /usr/build/llvm/Debug/lib/LLVMX86.o(.text+0x30506): In function
> `_GLOBAL__D__ZN7
> 6_GLOBAL__N__usr_src_llvm_lib_Target_X86_X86ISelPattern.cpp_9D2164D3_CFE6F8F217X
> 86TargetLowering14LowerArgumentsERN4llvm8FunctionERNS1_12SelectionDAGE':
> /usr/src/llvm/lib/Target/X86/X86ISelPattern.cpp:73: undefined
> reference to `X86C
> ompilationCallback2'
> /usr/build/llvm/Debug/lib/LLVMX86.o(.text
> +0x305f2):/usr/src/llvm/lib/Target/X86/
> X86ISelPattern.cpp:73: undefined reference to
> `_X86CompilationCallback'
> /usr/build/llvm/Debug/lib/LLVMX86.o(.text
> +0x30601):/usr/src/llvm/lib/Target/X86/
> X86ISelPattern.cpp:73: undefined reference to
> `_X86CompilationCallback'
> collect2: ld returned 1 exit status
> make[2]: *** [/usr/build/llvm/Debug/bin/llc.exe] Error 1
> make[2]: Leaving directory `/usr/build/llvm/tools/llc'
> make[1]: *** [llc/.makeall] Error 2
> make[1]: Leaving directory `/usr/build/llvm/tools'
> make: *** [all] Error 1
>  
> Doing 'make tools-only ENABLE_OPTIMIZED=1 gives a simular but
> different error :-
>  
> llvm[2]: Linking Release executable llc (without symbols)
> collect2: ld terminated with signal 11 [Segmentation fault], core
> dumped
> /usr/build/llvm-2/Release/lib/LLVMX86.o(.text
> +0x51d76):X86InstrInfo.cpp: undefined reference to
> `X86CompilationCallback2'
> /usr/build/llvm-2/Release/lib/LLVMX86.o(.text+0x51e0a):X86JITInfo.cpp:
> undefined reference to `_X86CompilationCallback'
> /usr/build/llvm-2/Release/lib/LLVMX86.o(.text+0x51e1f):X86JITInfo.cpp:
> undefined reference to `_X86CompilationCallback'
> /usr/binutils-2.15/bin/ld: BFD 2.15 assertion
> fail ../../../src/binutils-2.15/bfd/cofflink.c:1930
> make[2]: *** [/usr/build/llvm-2/Release/bin/llc.exe] Error 1
> make[2]: Leaving directory `/usr/build/llvm-2/tools/llc'
> make[1]: *** [llc/.makeall] Error 2
> make[1]: Leaving directory `/usr/build/llvm-2/tools'
> make: *** [all] Error 1
>  

That's all just bizarre but its possible that it is related to a more
fundamental error, especially a configure script problem. 

> I have gone back to the older Cygwin environment that worked before
> but am now getting the same results as with the newer Cygwin
> installation. Why it worked before but not now I do not know.

Hrm. That's not good. 

Can you build with "TOOL_VERBOSE=1" and capture the output and send it
to me. Something like:

make TOOL_VERBOSE=1 2>&1 >make.out

Send that to me (not the list) and I'll take a look. Please also do
this:

make reconfigure

and send me the "configure.out" file that gets generated as well as
"config.log".


>  
> The first error in this mail does not occur with the older Cygwin
> installation.

Yeah, as I suspected, its probably related to the new version of Cygwin.

>  
> The only thing I can think is it is my instillation proceedure but I
> cannot find anything wrong with it.

There's something fishier than just your inst >>>A<<< ll :) procedure at
work here.

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/20050531/6afbcadd/attachment.sig>


More information about the llvm-dev mailing list