compilation failures

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

compilation failures

Stefan Seefeld
I'm trying to compile clang with GCC 4.4.1 (Fedora 11 system compiler),
and I get compilation failures.
Some appear to be resolved with the attached patch, but this one I have
no idea to fix:

/home/stefan/projects/llvm/include/llvm/Support/GraphWriter.h:92: error:
no matching function for call to ‘llvm::DOTGraphTraits<const
clang::Stmt*>::DOTGraphTraits(bool&)’
StmtViz.cpp:32: note: candidates are: llvm::DOTGraphTraits<const
clang::Stmt*>::DOTGraphTraits(const llvm::DOTGraphTraits<const
clang::Stmt*>&)
StmtViz.cpp:32: note: llvm::DOTGraphTraits<const
clang::Stmt*>::DOTGraphTraits()

...


/home/stefan/projects/llvm/include/llvm/Support/GraphWriter.h:144:
error: no matching function for call to ‘llvm::DOTGraphTraits<const
clang::Stmt*>::getNodeLabel(const clang::Stmt*&, const clang::Stmt* const&)’
StmtViz.cpp:33: note: candidates are: static std::string
llvm::DOTGraphTraits<const clang::Stmt*>::getNodeLabel(const
clang::Stmt*, const clang::Stmt*, bool)

...

/home/stefan/projects/llvm/include/llvm/Support/GraphWriter.h:164:
error: no matching function for call to ‘llvm::DOTGraphTraits<const
clang::Stmt*>::getNodeLabel(const clang::Stmt*&, const clang::Stmt* const&)’
StmtViz.cpp:33: note: candidates are: static std::string
llvm::DOTGraphTraits<const clang::Stmt*>::getNodeLabel(const
clang::Stmt*, const clang::Stmt*, bool)

Is trunk in the middle of an API change ?

I'm also seeing compilation failures in llvm proper, which I'm working
around with "make -C tools/clang".
I get

llvm[2]: Compiling AsmMatcherEmitter.cpp for Debug build
In file included from AsmMatcherEmitter.cpp:78:
Record.h: In constructor ‘llvm::VarBitInit::VarBitInit(llvm::TypedInit*,
unsigned int)’:
Record.h:973: error: ‘dynamic_cast’ not permitted with -fno-rtti

How I can instruct the build system to print out the compiler command
line ? And why does it want to compile with -fno-rtti, when the code
actually requires it ?


Thanks,
Stefan

--

       ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: compilation failures

Eli Friedman
On Tue, Mar 9, 2010 at 3:35 PM, Stefan Seefeld <[hidden email]> wrote:

> I'm also seeing compilation failures in llvm proper, which I'm working
> around with "make -C tools/clang".
> I get
>
> llvm[2]: Compiling AsmMatcherEmitter.cpp for Debug build
> In file included from AsmMatcherEmitter.cpp:78:
> Record.h: In constructor ‘llvm::VarBitInit::VarBitInit(llvm::TypedInit*,
> unsigned int)’:
> Record.h:973: error: ‘dynamic_cast’ not permitted with -fno-rtti
>
> How I can instruct the build system to print out the compiler command line ?
> And why does it want to compile with -fno-rtti, when the code actually
> requires it ?

Can you try building LLVM+clang with a clean tree?  This looks like
something is going very wrong in the configuration.

-Eli

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: compilation failures

Stefan Seefeld
On 03/09/2010 07:01 PM, Eli Friedman wrote:
>
> Can you try building LLVM+clang with a clean tree?  This looks like
> something is going very wrong in the configuration.
>    

How do I do that ? I tried 'make clean', then './configure', then
'make', and I see the same issue with -fno-rtti again.
Skipping to clang, via 'make -C tools/clang', I now see this error:

make[3]: *** No rule to make target
`/home/stefan/projects/llvm/tools/clang/include/clang/Basic/Debug/DiagnosticAnalysisKinds.inc.tmp',
needed by `DiagnosticAnalysisKinds.inc'.  Stop.



Thanks,
         Stefan



--

       ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: compilation failures

Eli Friedman
On Tue, Mar 9, 2010 at 4:11 PM, Stefan Seefeld <[hidden email]> wrote:
> On 03/09/2010 07:01 PM, Eli Friedman wrote:
>>
>> Can you try building LLVM+clang with a clean tree?  This looks like
>> something is going very wrong in the configuration.
>>
>
> How do I do that ? I tried 'make clean', then './configure', then 'make',
> and I see the same issue with -fno-rtti again.

Really?  Can you try with a completely fresh checkout?  The make
system is supposed to make sure we pass -frtti for that code.

-Eli

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: compilation failures

Stefan Seefeld
On 03/09/2010 07:37 PM, Eli Friedman wrote:

> On Tue, Mar 9, 2010 at 4:11 PM, Stefan Seefeld<[hidden email]>  wrote:
>    
>> On 03/09/2010 07:01 PM, Eli Friedman wrote:
>>      
>>> Can you try building LLVM+clang with a clean tree?  This looks like
>>> something is going very wrong in the configuration.
>>>
>>>        
>> How do I do that ? I tried 'make clean', then './configure', then 'make',
>> and I see the same issue with -fno-rtti again.
>>      
> Really?  Can you try with a completely fresh checkout?  The make
> system is supposed to make sure we pass -frtti for that code.
>    

Same error. Here are the steps:

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools && svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ..
./configure
make

Is there a way to make the build system print out what it is doing ?
That may help me debug this, by finding out where the -fno-rtti option
is generated.


Thanks,
         Stefan


--

       ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: compilation failures

Stefan Seefeld
In reply to this post by Stefan Seefeld
On 03/09/2010 06:35 PM, Stefan Seefeld wrote:
> I'm trying to compile clang with GCC 4.4.1 (Fedora 11 system
> compiler), and I get compilation failures.
> Some appear to be resolved with the attached patch, but this one I
> have no idea to fix:
>

[...]

> How I can instruct the build system to print out the compiler command
> line ? And why does it want to compile with -fno-rtti, when the code
> actually requires it ?

Ping ?

I'd really like to get started, but right now something is quite broken
in my llvm source tree, yet I can't figure out what.
Unfortunately, I didn't even find any build instructions that may help
me find my way around. What am I supposed to do ?
As I mentioned, I ran './configure' and 'make', resulting in the
reported issue with -fno-rtti.

Attempting to build only the clang sub-component, via `make -C
tools/clang`, results in this error:

make[3]: *** No rule to make target
`/home/stefan/projects/llvm/tools/clang/include/clang/Basic/Debug/DiagnosticAnalysisKinds.inc.tmp',
needed by `DiagnosticAnalysisKinds.inc'.  Stop.


So something seems fundamentally wrong. Could someone please help ?
Is the build system described somewhere ? How can I debug it, to figure
out where the rogue -fno-rtti option is coming from, and why that .tmp
file might be missing ?

Thanks,
         Stefan


--

       ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: compilation failures

Daniel Dunbar
In reply to this post by Stefan Seefeld
On Tue, Mar 9, 2010 at 5:08 PM, Stefan Seefeld <[hidden email]> wrote:

> On 03/09/2010 07:37 PM, Eli Friedman wrote:
>> On Tue, Mar 9, 2010 at 4:11 PM, Stefan Seefeld<[hidden email]>  wrote:
>>
>>> On 03/09/2010 07:01 PM, Eli Friedman wrote:
>>>
>>>> Can you try building LLVM+clang with a clean tree?  This looks like
>>>> something is going very wrong in the configuration.
>>>>
>>>>
>>> How do I do that ? I tried 'make clean', then './configure', then 'make',
>>> and I see the same issue with -fno-rtti again.
>>>
>> Really?  Can you try with a completely fresh checkout?  The make
>> system is supposed to make sure we pass -frtti for that code.
>>
>
> Same error. Here are the steps:
>
> svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
> cd llvm/tools && svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
> cd ..
> ./configure
> make
>
> Is there a way to make the build system print out what it is doing ?
> That may help me debug this, by finding out where the -fno-rtti option
> is generated.

You can use 'make VERBOSE=1' to show what make is actually doing.

 - Daniel

> Thanks,
>         Stefan
>
>
> --
>
>       ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: compilation failures

Stefan Seefeld
On 03/10/2010 02:42 PM, Daniel Dunbar wrote:
>
> You can use 'make VERBOSE=1' to show what make is actually doing.
>    

Thanks, that helps a lot.


I just made the observation that when I invoke "make", I get the
-fno-rtti error in utils/TableGen/. However, if I do `make -C
utils/TableGen/`, everything works. This suggests that one of the outer
Makefiles exports either the CXXFLAGS, or the REQUIRES_RTTI variable,
overriding what utils/TableGen/Makefile provides itself.

FWIW, I'm using GNU make 3.8.1.

(I can now work around this issue by disabling the -fno-rtti flag in
Makefile.rules.)


Thanks,
         Stefan

--

       ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev