[cfe-dev] Another Linker error with clang++

Jean-Daniel Dupas devlists at shadowlab.org
Thu Sep 15 05:57:20 PDT 2011


Le 15 sept. 2011 à 14:26, Devchandra L Meetei a écrit :

> Downloaded the latest  code base from svn and did make -ENABLED_OPTIMISED=1
> The resultant binary compiles and linked perfectly
> However,
> very preliminary comparison results with time command
> -------------------
> clang++
> real    5m44.626s
> user    4m54.984s
> sys     0m42.463s
> ----------------------
> g++ 
> real    5m16.298s
> user    4m10.836s
> sys     0m47.825s
> 

You should also disable assertions to get an optimal release build.

./configure --enable-optimized --disable-assertions

> The resultant binaries of my project with clang is 319 MB and whereas g++ one is 302 MB
> 

> 
> 
> 
> 
> On Wed, Sep 14, 2011 at 11:17 PM, Douglas Gregor <dgregor at apple.com> wrote:
> 
> 
> Sent from my iPhone
> 
> On Sep 14, 2011, at 10:31 AM, Devchandra L Meetei <dlmeetei at gmail.com> wrote:
> 
>> I use the binary one(precompiled version 2.9) found at http://llvm.org/releases/ for X86_64. Now I am compiling the released version 2.9 from the same site
> 
> That won't help. Clang 2.9 is ancient in Clang-time; I'm suggesting that you get the latest development version of Clang from Subversion. 
> 
>> On Wed, Sep 14, 2011 at 10:52 PM, Douglas Gregor <dgregor at apple.com> wrote:
>> 
>> On Sep 14, 2011, at 10:02 AM, Devchandra L Meetei wrote:
>> 
>>> 
>>> I was trying with 2.9 release. linker problem persists
>> 
>> Are you saying that you compiled the latest Clang from Subversion, and the problem still remains? If so, please file a bug with preprocessed sources so we can reproduce the problem.
>> 
>>   - Doug
>> 
>>> --Dev
>>> On Wed, Sep 14, 2011 at 9:42 PM, Devchandra L Meetei <dlmeetei at gmail.com> wrote:
>>> Sure Douglas, Let me try and update on that 
>>> ---Dev
>>> 
>>> 
>>> On Wed, Sep 14, 2011 at 8:25 PM, Douglas Gregor <dgregor at apple.com> wrote:
>>> 
>>> On Sep 14, 2011, at 2:29 AM, Devchandra L Meetei wrote:
>>> 
>>>>  
>>>> 
>>>> history |grep export gave this and error message are below
>>>> export CC=/home/deleisha/Downloads/clang+llvm-2.9-x86_64-linux.tar/bin/clang
>>>> export CXX=/home/deleisha/Downloads/clang+llvm-2.9-x86_64-linux.tar/bin/clang++
>>>> 
>>>> 
>>>> Er, what are the error messages?
>>>> 
>>>> /home/deleisha/CodeSpace/pegasus/pkg/obj/Pegasus/General/MofWriter.o: In function `Pegasus::MofWriter::appendValueElement(Pegasus::Buffer&, Pegasus::CIMValue const&)':
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:387: undefined reference to `Pegasus::Array<Pegasus::CIMObject>::Array()'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:389: undefined reference to `Pegasus::Array<Pegasus::CIMObject>::getData() const'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:389: undefined reference to `Pegasus::Array<Pegasus::CIMObject>::size() const'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:391: undefined reference to `Pegasus::Array<Pegasus::CIMObject>::~Array()'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:391: undefined reference to `Pegasus::Array<Pegasus::CIMObject>::~Array()'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:394: undefined reference to `Pegasus::Array<Pegasus::CIMInstance>::Array()'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:396: undefined reference to `Pegasus::Array<Pegasus::CIMInstance>::getData() const'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:396: undefined reference to `Pegasus::Array<Pegasus::CIMInstance>::size() const'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:398: undefined reference to `Pegasus::Array<Pegasus::CIMInstance>::~Array()'
>>>> /home/deleisha/CodeSpace/pegasus/src/Pegasus/General/MofWriter.cpp:398: undefined reference to `Pegasus::Array<Pegasus::CIMInstance>::~Array()'
>>>> /usr/bin/ld: /home/deleisha/CodeSpace/pegasus/pkg/lib/libpeggeneral.so.1: hidden symbol `_ZN7Pegasus5ArrayINS_9CIMObjectEEixEj' isn't defined
>>>> /usr/bin/ld: final link failed: Nonrepresentable section on output
>>>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>>> make[3]: *** [/home/deleisha/CodeSpace/pegasus/pkg/lib/libpeggeneral.so.1] Error 1
>>>> make[3]: Leaving directory `/home/deleisha/CodeSpace/pegasus/src/Pegasus/General'
>>>> make[2]: *** [all] Error 2
>>>> make[2]: Leaving directory `/home/deleisha/CodeSpace/pegasus/src/Pegasus'
>>>> make[1]: *** [all] Error 2
>>>> make[1]: Leaving directory `/home/deleisha/CodeSpace/pegasus/src'
>>>> make: *** [all] Error 2
>>> 
>>> Clang's handling of visibility has improved greatly since Clang 2.9. Please try the latest Clang trunk and see if that works for you.
>>> 
>>> 	- Doug
>>> 
>>> 
>>> 
>> 
>> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- Jean-Daniel




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110915/b3bc3441/attachment.html>


More information about the cfe-dev mailing list