MINGW Compiler error.

Greetings,

I have a compiler error that I have not been able to get through. I usually depend upon pre-built binaries but there was none available for the pre-release. I also try scanning the web site and mail list but was unable to find an answer. I was getting this or similar error with 2.3. I am just trying to build with the core library. I tried this in a xp and vista VM with the same results, I have Leopard, and was hoping to use this for similar build environment. I use eclipse/CDT for development on windows.

Built with "C:/MinGW/bin/sh.exe"-2.04$ ./configure --prefix=/usr --enable-optimized --disa
ble-shared --disable-multilib --disable-asserts

output:
llvm[1]: Compiling BasicBlock.cpp for Release build
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
  member function 'bool __gnu_cxx::_EqualOpConcept<_First, _Second>::__constraint
s_() [with _First = llvm::BasicBlock, _Second = llvm::BasicBlock*]':
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:296
: instantiated from 'void __gnu_cxx::_EqualOpConcept<_First, _Second>::__const
raints() [with _First = llvm::BasicBlock, _Second = llvm::BasicBlock*]'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:62:
    instantiated from 'void __gnu_cxx::__function_requires() [with _Concept = __g
nu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>]'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_algo.h:3810: instan
tiated from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = llvm::stuck_out_tongue:
redIterator<llvm::BasicBlock, llvm::value_use_iterator<llvm::User> >, _Tp = llvm
::BasicBlock*]'
BasicBlock.cpp:180: instantiated from here
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:296
: error: no match for 'operator==' in '((__gnu_cxx::_EqualOpConcept<llvm::BasicB
lock, llvm::BasicBlock*>*)this)- >__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, ll
vm::BasicBlock*>::__a == ((__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::Ba
sicBlock*>*)this)->__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock
*>::__b'
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/ADT/APInt.h:1379: note: can
didates are: bool llvm::operator==(uint64_t, const llvm::APInt&)
make[1]: *** [/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore/Release/BasicBl
ock.o] Error 1
make[1]: Leaving directory `/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore'
make: *** [all] Error 1

Any help will be greatly appreciated.

Regards
Mark Kromis

Resend

Mark Kromis wrote:

Resend

Greetings,

I have a compiler error that I have not been able to get through. I usually depend upon pre-built binaries but there was none available for the pre-release. I also try scanning the web site and mail list but was unable to find an answer. I was getting this or similar error with 2.3. I am just trying to build with the core library. I tried this in a xp and vista VM with the same results, I have Leopard, and was hoping to use this for similar build environment. I use eclipse/CDT for development on windows.

Built with "C:/MinGW/bin/sh.exe"-2.04$ ./configure --prefix=/usr -- enable-optimized --disa
ble-shared --disable-multilib --disable-asserts
    

Ok...I would have expected that to suppress the following error:

output:
llvm[1]: Compiling BasicBlock.cpp for Release build
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/ boost_concept_check.h: In
member function 'bool __gnu_cxx::_EqualOpConcept<_First, _Second>::__constraint
s_() [with _First = llvm::BasicBlock, _Second = llvm::BasicBlock*]':
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/ boost_concept_check.h:296
: instantiated from 'void __gnu_cxx::_EqualOpConcept<_First, _Second>::__const
raints() [with _First = llvm::BasicBlock, _Second = llvm::BasicBlock*]'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/ boost_concept_check.h:62:
  instantiated from 'void __gnu_cxx::__function_requires() [with _Concept = __g
nu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>]'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_algo.h: 3810: instan
tiated from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = llvm::stuck_out_tongue:
redIterator<llvm::BasicBlock, llvm::value_use_iterator<llvm::User>
    

, _Tp = llvm
      

::BasicBlock*]'
BasicBlock.cpp:180: instantiated from here
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/ boost_concept_check.h:296
: error: no match for 'operator==' in '((__gnu_cxx::_EqualOpConcept<llvm::BasicB
lock, llvm::BasicBlock*>*)this)-
    

__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, ll
      

vm::BasicBlock*>::__a == ((__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::Ba
sicBlock*>*)this)->__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock
*>::__b'
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/ADT/APInt.h:
    

BasicBlock is failing the EqualityComparable concept check. This should be breaking --enable-asserts and --enable-expensive-checks, not --enable-optimized (concept checks should be disabled in release mode, which is controlled by NDEBUG).

1379: note: can
didates are: bool llvm::operator==(uint64_t, const llvm::APInt&)
make[1]: *** [/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore/ Release/BasicBl
ock.o] Error 1
make[1]: Leaving directory `/c/Users/Greybird/Desktop/llvm/llvm-2.4/ lib/VMCore'
make: *** [all] Error 1
    

GCC 4.3.0 is not finding the equality operator suitable for comparing these; the implied STL invocation would be buggy.

I don't think I'll be able to take a close look at this tonight (I have MingW32 3.4.5 and MingW32 4.2.1 ready, not MingW32 4.3.0).

Kenneth

Mark Kromis wrote:

Resend

Greetings,

I have a compiler error that I have not been able to get through. I

usually depend upon pre-built binaries but there was none available

for the pre-release. I also try scanning the web site and mail list

but was unable to find an answer. I was getting this or similar

error with 2.3. I am just trying to build with the core library. I

tried this in a xp and vista VM with the same results, I have

Leopard, and was hoping to use this for similar build environment. I

use eclipse/CDT for development on windows.

Built with “C:/MinGW/bin/sh.exe”-2.04$ ./configure --prefix=/usr –

enable-optimized --disa

ble-shared --disable-multilib --disable-asserts

Ok…I would have expected that to suppress the following error:

I must have been typed that, I misspelled assertions. --disable-assertions does get around that error, but I get a different one. I was hoping that fixing one error would fix the other. Since there were no other comments on the mail list about that particular issue, I was hoping it was something easy to fix on the compiler, since it compiles fine on Leopard.

When assertions are disabled I get this error:

llvm[1]: Compiling IntrinsicInst.cpp for Release-Asserts build
In file included from IntrinsicInst.cpp:32:
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
instantiation of ‘__gnu_cxx::_SGIAssignableConceptllvm::MachineMove’:
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<llvm::MachineMove, std::allocatorllvm::MachineMove >

c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:216
: error: ‘__gnu_cxx::_SGIAssignableConcept<_Tp>::__a’ has incomplete type
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:53: error: forward declaration of ‘struct llvm::MachineMove’
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
member function ‘void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints() [w
ith _Tp = llvm::MachineMove]’:
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<llvm::MachineMove, std::allocatorllvm::MachineMove >

c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:208
: error: using invalid field ‘__gnu_cxx::_SGIAssignableConcept<_Tp>::__a’
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:208
: error: ‘__b’ has incomplete type
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:209
: error: using invalid field ‘__gnu_cxx::_SGIAssignableConcept<_Tp>::__a’
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:209
: error: using invalid field ‘__gnu_cxx::_SGIAssignableConcept<_Tp>::__a’
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<llvm::MachineMove, std::allocatorllvm::MachineMove >

c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:210
: error: using invalid field ‘__gnu_cxx::_SGIAssignableConcept<_Tp>::__a’
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
member function ‘void __gnu_cxx::_SGIAssignableConcept<_Tp>::__const_constraint
s(const _Tp&) [with _Tp = llvm::MachineMove]’:
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:210
: instantiated from ‘void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints
() [with _Tp = llvm::MachineMove]’
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from ‘std::vector<llvm::MachineMove, std::allocatorllvm::MachineMove >

c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:213
: error: ‘__c’ has incomplete type
c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:214
: error: using invalid field ‘__gnu_cxx::_SGIAssignableConcept<_Tp>::__a’
make[1]: *** [/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore/Release-Asserts
/IntrinsicInst.o] Error 1
make[1]: Leaving directory `/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore’
make: *** [all] Error 1

output:

llvm[1]: Compiling BasicBlock.cpp for Release build

c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/

boost_concept_check.h: In

member function 'bool __gnu_cxx::_EqualOpConcept<_First,

_Second>::__constraint

s_() [with _First = llvm::BasicBlock, _Second = llvm::BasicBlock*]':

c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/

boost_concept_check.h:296

: instantiated from 'void __gnu_cxx::_EqualOpConcept<_First,

_Second>::__const

raints() [with _First = llvm::BasicBlock, _Second =

llvm::BasicBlock*]’

c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/

boost_concept_check.h:62:

instantiated from 'void __gnu_cxx::__function_requires() [with

_Concept = __g

nu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>]’

c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_algo.h:

3810: instan

tiated from '_IIter std::find(_IIter, _IIter, const _Tp&) [with

_IIter = llvm::stuck_out_tongue:

redIterator<llvm::BasicBlock, llvm::value_use_iteratorllvm::User

, _Tp = llvm

::BasicBlock*]’

BasicBlock.cpp:180: instantiated from here

c:\mingw\bin../lib/gcc/mingw32/4.3.0/include/c++/bits/

boost_concept_check.h:296

: error: no match for ‘operator==’ in

'((__gnu_cxx::_EqualOpConcept<llvm::BasicB

lock, llvm::BasicBlock*>*)this)-

__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, ll

vm::BasicBlock*>::__a ==

((__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::Ba

sicBlock*>*)this)->__gnu_cxx::_EqualOpConcept<llvm::BasicBlock,

llvm::BasicBlock

*>::__b’

c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/ADT/APInt.h:

BasicBlock is failing the EqualityComparable concept check. This should
be breaking --enable-asserts and --enable-expensive-checks, not
–enable-optimized (concept checks should be disabled in release mode,
which is controlled by NDEBUG).

I just tried with plain “./configure --enable-optimized” and was getting the same. But if I did " ./configure --enable-optimized --disable-assertions" I get the other error.

1379: note: can

didates are: bool llvm::operator==(uint64_t, const llvm::APInt&)

make[1]: *** [/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore/

Release/BasicBl

ock.o] Error 1

make[1]: Leaving directory `/c/Users/Greybird/Desktop/llvm/llvm-2.4/

lib/VMCore’

make: *** [all] Error 1

GCC 4.3.0 is not finding the equality operator suitable for comparing
these; the implied STL invocation would be buggy.

So would that be a buggy STL, I’m assuming on the compiler? If so is there a MingW package I need to update or recompile? I downloaded 4.3.0 from the sourceforge page for mingw.

I don’t think I’ll be able to take a close look at this tonight (I have
MingW32 3.4.5 and MingW32 4.2.1 ready, not MingW32 4.3.0).

Kenneth


LLVM Developers mailing list
LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Thanks again in advance.

Regards
Mark Kromis

Mark Kromis wrote:

Ok...I would have expected that to suppress the following error:

I must have been typed that, I misspelled assertions. --disable-assertions does get around that error, but I get a different one. I was hoping that fixing one error would fix the other.

I wish. The concept-checking classes are intended to catch fundamental errors in STL invariants at a more readable stage, but they do bloat the executable.

Since there were no other comments on the mail list about that particular issue, I was hoping it was something easy to fix on the compiler, since it compiles fine on Leopard.

When assertions are disabled I get this error:
llvm[1]: Compiling IntrinsicInst.cpp for Release-Asserts build
In file included from IntrinsicInst.cpp:32:
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
instantiation of '__gnu_cxx::_SGIAssignableConcept<llvm::MachineMove>':
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<llvm::MachineMove, std::allocator<llvm::MachineMove> >
'
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:216
: error: '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a' has incomplete type
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:53: error: forward declaration of 'struct llvm::MachineMove'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
member function 'void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints() [w
ith _Tp = llvm::MachineMove]':
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<llvm::MachineMove, std::allocator<llvm::MachineMove> >
'
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:208
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:208
: error: '__b' has incomplete type
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:209
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:209
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<llvm::MachineMove, std::allocator<llvm::MachineMove> >
'
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:210
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
member function 'void __gnu_cxx::_SGIAssignableConcept<_Tp>::__const_constraint
s(const _Tp&) [with _Tp = llvm::MachineMove]':
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:210
: instantiated from 'void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints
() [with _Tp = llvm::MachineMove]'
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<llvm::MachineMove, std::allocator<llvm::MachineMove> >
'
c:/Users/Greybird/Desktop/llvm/llvm-2.4/include/llvm/CodeGen/MachineModuleInfo.h
:1007: instantiated from here
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:213
: error: '__c' has incomplete type
c:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:214
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
make[1]: *** [/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore/Release-Asserts
/IntrinsicInst.o] Error 1
make[1]: Leaving directory `/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore'
make: *** [all] Error 1

BasicBlock is failing the EqualityComparable concept check. This should
be breaking --enable-asserts and --enable-expensive-checks, not
--enable-optimized (concept checks should be disabled in release mode,
which is controlled by NDEBUG).

I just tried with plain "./configure --enable-optimized" and was getting the same. But if I did " ./configure --enable-optimized --disable-assertions" I get the other error.

Ok.

1379: note: candidates are: bool llvm::operator==(uint64_t, const llvm::APInt&)
make[1]: *** [/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore/
Release/BasicBlock.o] Error 1
make[1]: Leaving directory `/c/Users/Greybird/Desktop/llvm/llvm-2.4/lib/VMCore'
make: *** [all] Error 1

GCC 4.3.0 is not finding the equality operator suitable for comparing
these; the implied STL invocation would be buggy.

So would that be a buggy STL, I'm assuming on the compiler? If so is there a MingW package I need to update or recompile? I downloaded 4.3.0 from the sourceforge page for mingw.

More like the STL catching a compiler bug. Inspecting llvm/ADT/APInt.h, the following are defined:

bool APInt::operator==(const APInt& RHS) const;
bool APInt::operator==(uint64_t RHS) const;
bool operator==(uint64_t V1, const APInt& V2);

(This is true for both SVN and 2.4 prerelease). MingW32 4.3.0 is not finding the member operator== implementations (they are public), only the non-member operator== . While I don't think of myself as a language lawyer, this casually appears to be a failure in Koenig lookup. This would make MingW32 4.3.0 generally unusable in production.

A priori, bypassing the error could be done by moving

bool APInt::operator==(const APInt& RHS) const;
bool APInt::operator==(uint64_t RHS) const;

to

bool operator==(const APInt& LHS, const APInt& RHS) const;
bool operator==(const APInt& LHS, uint64_t RHS) const;

and adjusting other declarations so that the non-member functions could get at the currently private data fields. However, I can't recommend merging those changes into LLVM.

Kenneth

Kenneth

LLVM is not currently concept-check clean. Your MinGW is apparently
configured with --enable-concept-checks, or something in your
toolchain is causing -D_GLIBCXX_CONCEPT_CHECKS to be added to the
build, and LLVM currently cannot be built this way.

The errors you've posted so far are just the beginning; there
are many more errors after them. Some widely-used idioms within
LLVM violate standard concept requirements; fixing these will
require some broad changes.

Dan

Commenting out GLIBCXX_CONCEPT_CHECKS from ...\MinGW\lib\gcc\mingw32\4.3.0\include\c++\mingw32\bits\c++config.h seemed to do the trick.
I put the path in here incase someone runs into the same issue. The installed package from mingw32 was from their web site. So it was enabled by them. Now there are many link library errors. If I can get them to link I should be good until I try to compile the llvm-gcc stuff.

Regards
Mark Kromis