Compilation Failure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation Failure

Bill Wendling
Hi all,

Did someone forget to check-in a patch? I'm getting this error during
compilation on PPC:

/Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/lib/Analysis/IPA/Andersens.cpp:
In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
/Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/lib/Analysis/IPA/Andersens.cpp:1189:
error: no matching function for call to
'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'
/Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/lib/Analysis/IPA/Andersens.cpp:
In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
/Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/lib/Analysis/IPA/Andersens.cpp:1189:
error: no matching function for call to
'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'


-bw
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Dale Johannesen

On Sep 24, 2007, at 2:29 PM, Bill Wendling wrote:

> Hi all,
>
> Did someone forget to check-in a patch? I'm getting this error during
> compilation on PPC:

A recent checkout compiled fine for me (on x86).

> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
> lib/Analysis/IPA/Andersens.cpp:
> In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
> lib/Analysis/IPA/Andersens.cpp:1189:
> error: no matching function for call to
> 'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'
> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
> lib/Analysis/IPA/Andersens.cpp:
> In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
> lib/Analysis/IPA/Andersens.cpp:1189:
> error: no matching function for call to
> 'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'
>
>
> -bw
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Bill Wendling
A debug or release build?

-bw

On Sep 24, 2007, at 2:36 PM, Dale Johannesen wrote:

>
> On Sep 24, 2007, at 2:29 PM, Bill Wendling wrote:
>
>> Hi all,
>>
>> Did someone forget to check-in a patch? I'm getting this error during
>> compilation on PPC:
>
> A recent checkout compiled fine for me (on x86).
>
>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>> lib/Analysis/IPA/Andersens.cpp:
>> In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>> lib/Analysis/IPA/Andersens.cpp:1189:
>> error: no matching function for call to
>> 'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'
>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>> lib/Analysis/IPA/Andersens.cpp:
>> In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>> lib/Analysis/IPA/Andersens.cpp:1189:
>> error: no matching function for call to
>> 'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'
>>
>>
>> -bw
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Dale Johannesen

On Sep 24, 2007, at 3:07 PM, Bill Wendling wrote:

> A debug or release build?
>
> -bw

Both, actually.

> On Sep 24, 2007, at 2:36 PM, Dale Johannesen wrote:
>
>>
>> On Sep 24, 2007, at 2:29 PM, Bill Wendling wrote:
>>
>>> Hi all,
>>>
>>> Did someone forget to check-in a patch? I'm getting this error  
>>> during
>>> compilation on PPC:
>>
>> A recent checkout compiled fine for me (on x86).
>>
>>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>>> lib/Analysis/IPA/Andersens.cpp:
>>> In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
>>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>>> lib/Analysis/IPA/Andersens.cpp:1189:
>>> error: no matching function for call to
>>> 'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'
>>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>>> lib/Analysis/IPA/Andersens.cpp:
>>> In function 'void dumpToDOUT(llvm::SparseBitVector<128u>*)':
>>> /Volumes/SandBox/Clean/llvm-9999-01.roots/llvm-9999-01~obj/src/llvm/
>>> lib/Analysis/IPA/Andersens.cpp:1189:
>>> error: no matching function for call to
>>> 'dump(llvm::SparseBitVector<128u>&, llvm::OStream)'
>>>
>>>
>>> -bw
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> [hidden email]         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Bill Wendling
On Sep 24, 2007, at 3:15 PM, Dale Johannesen wrote:

>
> On Sep 24, 2007, at 3:07 PM, Bill Wendling wrote:
>
>> A debug or release build?
>>
>> -bw
>
> Both, actually.

Weird. I see a potential problem, though. The code is like this:

void dumpToDOUT(SparseBitVector<> *bitmap) {
   dump(*bitmap, DOUT);
}

where dump expects an llvm::OStream& for the second argument.  
However, when NDEBUG is #defined, DOUT is "llvm::OStream(0)", so it  
can't be passed by reference.

-bw

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Daniel Berlin
On 9/24/07, Bill Wendling <[hidden email]> wrote:

> On Sep 24, 2007, at 3:15 PM, Dale Johannesen wrote:
>
> >
> > On Sep 24, 2007, at 3:07 PM, Bill Wendling wrote:
> >
> >> A debug or release build?
> >>
> >> -bw
> >
> > Both, actually.
>
> Weird. I see a potential problem, though. The code is like this:
>
> void dumpToDOUT(SparseBitVector<> *bitmap) {
>    dump(*bitmap, DOUT);
> }
>
> where dump expects an llvm::OStream& for the second argument.
> However, when NDEBUG is #defined, DOUT is "llvm::OStream(0)", so it
> can't be passed by reference.
What compiler are you compiling with?
I build release and debug builds on darwin (and run the testsuite)
before i check in my changes :).

You can feel free to remove the function, it is simply a GDB helper :)
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Bill Wendling
On 9/25/07, Daniel Berlin <[hidden email]> wrote:

> On 9/24/07, Bill Wendling <[hidden email]> wrote:
> > On Sep 24, 2007, at 3:15 PM, Dale Johannesen wrote:
> >
> > Weird. I see a potential problem, though. The code is like this:
> >
> > void dumpToDOUT(SparseBitVector<> *bitmap) {
> >    dump(*bitmap, DOUT);
> > }
> >
> > where dump expects an llvm::OStream& for the second argument.
> > However, when NDEBUG is #defined, DOUT is "llvm::OStream(0)", so it
> > can't be passed by reference.
> What compiler are you compiling with?
> I build release and debug builds on darwin (and run the testsuite)
> before i check in my changes :).
>
I'm just using GCC, though it's on Leopard. I'm not sure if they have
a fix to catch this type of code.

> You can feel free to remove the function, it is simply a GDB helper :)
>
I just put it inside #ifdef's, so it now works. :-)

-bw
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

dag-7
In reply to this post by Bill Wendling
On Monday 24 September 2007 17:23, Bill Wendling wrote:

> Weird. I see a potential problem, though. The code is like this:
>
> void dumpToDOUT(SparseBitVector<> *bitmap) {
>    dump(*bitmap, DOUT);
> }
>
> where dump expects an llvm::OStream& for the second argument.
> However, when NDEBUG is #defined, DOUT is "llvm::OStream(0)", so it
> can't be passed by reference.

We ran into a similar problem in our custom code here.  To work around
it I modified Debug.h like this:

#ifdef NDEBUG
static llvm::OStream NullStream(0);
#define DOUT llvm::NullStream
#else
#define DOUT llvm::getErrorOutputStream(DEBUG_TYPE)
#endif

                                             -Dave
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Bill Wendling
Hi Dave,

> We ran into a similar problem in our custom code here.  To work around
> it I modified Debug.h like this:
>
> #ifdef NDEBUG
> static llvm::OStream NullStream(0);
> #define DOUT llvm::NullStream
> #else
> #define DOUT llvm::getErrorOutputStream(DEBUG_TYPE)
> #endif
>
I thought about doing this, but there's the potential for naming
conflicts that won't be caught until a release build is done. :-( I
wonder, though. Would it make sense to put the stream decls in their
own namespace (say "namespace stream")? That way we could prevent
naming conflicts and also this bad "gotcha"...

-bw
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

dag-7
On Tuesday 25 September 2007 13:40, Bill Wendling wrote:

> I thought about doing this, but there's the potential for naming
> conflicts that won't be caught until a release build is done. :-( I

I considered this and figured that it was extremely unlikely in our code.
Certainly it's not a bullet-proof solution.

> wonder, though. Would it make sense to put the stream decls in their
> own namespace (say "namespace stream")? That way we could prevent
> naming conflicts and also this bad "gotcha"...

The problem is that you can't use "cerr" so conveniently unless you put
a "using stream::cerr" in Streams.h.  Maybe that's ok, though.  I'd be willing
to go this route.

                                          -Dave
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Daniel Berlin
In reply to this post by Bill Wendling
On 9/25/07, Bill Wendling <[hidden email]> wrote:

> On 9/25/07, Daniel Berlin <[hidden email]> wrote:
> > On 9/24/07, Bill Wendling <[hidden email]> wrote:
> > > On Sep 24, 2007, at 3:15 PM, Dale Johannesen wrote:
> > >
> > > Weird. I see a potential problem, though. The code is like this:
> > >
> > > void dumpToDOUT(SparseBitVector<> *bitmap) {
> > >    dump(*bitmap, DOUT);
> > > }
> > >
> > > where dump expects an llvm::OStream& for the second argument.
> > > However, when NDEBUG is #defined, DOUT is "llvm::OStream(0)", so it
> > > can't be passed by reference.
> > What compiler are you compiling with?
> > I build release and debug builds on darwin (and run the testsuite)
> > before i check in my changes :).
> >
> I'm just using GCC, though it's on Leopard. I'm not sure if they have
> a fix to catch this type of code.

I am also compiling on leopard, 9a559 :)
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Bill Wendling
On 9/25/07, Daniel Berlin <[hidden email]> wrote:

> On 9/25/07, Bill Wendling <[hidden email]> wrote:
> > On 9/25/07, Daniel Berlin <[hidden email]> wrote:
> > > On 9/24/07, Bill Wendling <[hidden email]> wrote:
> > > What compiler are you compiling with?
> > > I build release and debug builds on darwin (and run the testsuite)
> > > before i check in my changes :).
> > >
> > I'm just using GCC, though it's on Leopard. I'm not sure if they have
> > a fix to catch this type of code.
>
> I am also compiling on leopard, 9a559 :)
>
Okay. :-) I'm not sure what I'm doing differently. It could just be an
artifact of how the Apple-style builds are done (it's a bit of a
black-box to me). Anyway, It's actually more of a problem with the
LLVM streams in general.

-bw
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Failure

Bill Wendling
In reply to this post by dag-7
On 9/25/07, David Greene <[hidden email]> wrote:
> On Tuesday 25 September 2007 13:40, Bill Wendling wrote:
>
> > I thought about doing this, but there's the potential for naming
> > conflicts that won't be caught until a release build is done. :-( I
>
> I considered this and figured that it was extremely unlikely in our code.
> Certainly it's not a bullet-proof solution.
>
I'd think it unlikely as well. :-)

> > wonder, though. Would it make sense to put the stream decls in their
> > own namespace (say "namespace stream")? That way we could prevent
> > naming conflicts and also this bad "gotcha"...
>
> The problem is that you can't use "cerr" so conveniently unless you put
> a "using stream::cerr" in Streams.h.  Maybe that's ok, though.  I'd be willing
> to go this route.
>
Yeah. It's a bit more verbose, but could be worth it. I'll see what I can do.

-bw
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev