All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [yocto] #yocto #sdk - meta-clang undefined references
@ 2020-09-16 14:04 Monsees, Steven C (US)
  2020-09-16 15:37 ` Monsees, Steven C (US)
  2020-09-16 16:29 ` Khem Raj
  0 siblings, 2 replies; 7+ messages in thread
From: Monsees, Steven C (US) @ 2020-09-16 14:04 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto


I can see that libclang is being included...so, not sure why when linking an executable these references are missing...

-----Original Message-----
From: Monsees, Steven C (US) 
Sent: Wednesday, September 16, 2020 7:06 AM
To: 'Khem Raj' <raj.khem@gmail.com>
Cc: yocto@lists.yoctoproject.org
Subject: RE: [yocto] #yocto #sdk - meta-clang undefined references



It should be linking in libclang , I will validate...

Note performing 'nm' on libclang appear to show the majority present...

Question: if I needed to include a library, what/how would I modify a recipe under Yocto to be sure to include/link in the library ?

Thanks,
Steve

-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com]
Sent: Tuesday, September 15, 2020 5:06 PM
To: Monsees, Steven C (US) <steven.monsees@baesystems.com>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references

*** WARNING ***
EXTERNAL EMAIL -- This message originates from outside our organization.


On Tue, Sep 15, 2020 at 12:56 PM Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
>
>
>
> I am building meta-clang (sumo based 6.0.1), with cmake (3.8.2), all 
> under a standard SDK “rocko based” (2.4.1)…
>
>
>
> Are the following routines accessible/supported under meta-clang ?
>
>
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'
>
> libgbe.so: undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::~DiagnosticsEngine()'
>
> libgbe.so: undefined reference to `clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::~CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>, clang::DiagnosticOptions*, clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::CodeGenOptions::CodeGenOptions()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::~CompilerInstance()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, clang::MemoryBufferCache*)'
>
> libgbe.so: undefined reference to `clang::EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext*)'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::setInvocation(std::shared_ptr<clang::CompilerInvocation>)'
>
> libgbe.so: undefined reference to `clang::CodeGenAction::takeModule()'
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::DiagnosticIDs()'
>

are you linking this library with libclang ? secondly, also check that its not emitting bunch of libraries which needs to then individually linked

>
>
> thanks,
>
> Steve
>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] #yocto #sdk - meta-clang undefined references
  2020-09-16 14:04 [yocto] #yocto #sdk - meta-clang undefined references Monsees, Steven C (US)
@ 2020-09-16 15:37 ` Monsees, Steven C (US)
  2020-09-16 16:29 ` Khem Raj
  1 sibling, 0 replies; 7+ messages in thread
From: Monsees, Steven C (US) @ 2020-09-16 15:37 UTC (permalink / raw)
  To: Monsees, Steven C (US), Khem Raj; +Cc: yocto


Found a cmake issue and fixed almost all of it, down to 1 missing reference:


/ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_to_gen.cpp: In function ‘bool gbe::llvmToGen(gbe::ir::Unit&, const void*, int, bool, int, std::__cxx11::string&)’:
/ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_to_gen.cpp:325:68: error: no matching function for call to ‘llvm::LLVMContext::setDiagnosticHandler(void (*)(const llvm::DiagnosticInfo&, void*), gbe::gbeDiagnosticContext*)’
     mod.getContext().setDiagnosticHandler(&gbeDiagnosticHandler,&dc);
                                                                    ^
In file included from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/Metadata.h:30:0,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/TrackingMDRef.h:17,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/DebugLoc.h:18,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/Instruction.h:22,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/BasicBlock.h:23,
                 from /ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_includes.hpp:30,
                 from /ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_to_gen.cpp:25:
/opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/LLVMContext.h:213:8: note: candidate: void llvm::LLVMContext::setDiagnosticHandler(std::unique_ptr<llvm::DiagnosticHandler>&&, bool)
   void setDiagnosticHandler(std::unique_ptr<DiagnosticHandler> &&DH,
        ^~~~~~~~~~~~~~~~~~~~
/opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/LLVMContext.h:213:8: note:   no known conversion for argument 1 from ‘void (*)(const llvm::DiagnosticInfo&, void*)’ to ‘std::unique_ptr<llvm::DiagnosticHandler>&&’
make[2]: *** [backend/src/CMakeFiles/gbe.dir/llvm/llvm_to_gen.cpp.o] Error 1
make[1]: *** [backend/src/CMakeFiles/gbe.dir/all] Error 2
make: *** [all] Error 2
11:27 smonsees@yix490016 ~/yocto/test/beignet-Release_v1.3/mybuild>


-----Original Message-----
From: yocto@lists.yoctoproject.org [mailto:yocto@lists.yoctoproject.org] On Behalf Of Monsees, Steven C (US) via lists.yoctoproject.org
Sent: Wednesday, September 16, 2020 10:05 AM
To: Khem Raj <raj.khem@gmail.com>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references

*** WARNING ***
EXTERNAL EMAIL -- This message originates from outside our organization.



I can see that libclang is being included...so, not sure why when linking an executable these references are missing...

-----Original Message-----
From: Monsees, Steven C (US) 
Sent: Wednesday, September 16, 2020 7:06 AM
To: 'Khem Raj' <raj.khem@gmail.com>
Cc: yocto@lists.yoctoproject.org
Subject: RE: [yocto] #yocto #sdk - meta-clang undefined references



It should be linking in libclang , I will validate...

Note performing 'nm' on libclang appear to show the majority present...

Question: if I needed to include a library, what/how would I modify a recipe under Yocto to be sure to include/link in the library ?

Thanks,
Steve

-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com]
Sent: Tuesday, September 15, 2020 5:06 PM
To: Monsees, Steven C (US) <steven.monsees@baesystems.com>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references

*** WARNING ***
EXTERNAL EMAIL -- This message originates from outside our organization.


On Tue, Sep 15, 2020 at 12:56 PM Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
>
>
>
> I am building meta-clang (sumo based 6.0.1), with cmake (3.8.2), all 
> under a standard SDK “rocko based” (2.4.1)…
>
>
>
> Are the following routines accessible/supported under meta-clang ?
>
>
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'
>
> libgbe.so: undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::~DiagnosticsEngine()'
>
> libgbe.so: undefined reference to `clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::~CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>, clang::DiagnosticOptions*, clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::CodeGenOptions::CodeGenOptions()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::~CompilerInstance()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, clang::MemoryBufferCache*)'
>
> libgbe.so: undefined reference to `clang::EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext*)'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::setInvocation(std::shared_ptr<clang::CompilerInvocation>)'
>
> libgbe.so: undefined reference to `clang::CodeGenAction::takeModule()'
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::DiagnosticIDs()'
>

are you linking this library with libclang ? secondly, also check that its not emitting bunch of libraries which needs to then individually linked

>
>
> thanks,
>
> Steve
>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] #yocto #sdk - meta-clang undefined references
  2020-09-16 14:04 [yocto] #yocto #sdk - meta-clang undefined references Monsees, Steven C (US)
  2020-09-16 15:37 ` Monsees, Steven C (US)
@ 2020-09-16 16:29 ` Khem Raj
  1 sibling, 0 replies; 7+ messages in thread
From: Khem Raj @ 2020-09-16 16:29 UTC (permalink / raw)
  To: Monsees, Steven C (US); +Cc: yocto

Can you inspect the clang libs for these symbols?

On Wed, Sep 16, 2020 at 7:04 AM Monsees, Steven C (US) via
lists.yoctoproject.org
<steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
>
>
> I can see that libclang is being included...so, not sure why when linking an executable these references are missing...
>
> -----Original Message-----
> From: Monsees, Steven C (US)
> Sent: Wednesday, September 16, 2020 7:06 AM
> To: 'Khem Raj' <raj.khem@gmail.com>
> Cc: yocto@lists.yoctoproject.org
> Subject: RE: [yocto] #yocto #sdk - meta-clang undefined references
>
>
>
> It should be linking in libclang , I will validate...
>
> Note performing 'nm' on libclang appear to show the majority present...
>
> Question: if I needed to include a library, what/how would I modify a recipe under Yocto to be sure to include/link in the library ?
>
> Thanks,
> Steve
>
> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Tuesday, September 15, 2020 5:06 PM
> To: Monsees, Steven C (US) <steven.monsees@baesystems.com>
> Cc: yocto@lists.yoctoproject.org
> Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references
>
> *** WARNING ***
> EXTERNAL EMAIL -- This message originates from outside our organization.
>
>
> On Tue, Sep 15, 2020 at 12:56 PM Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
> >
> >
> >
> > I am building meta-clang (sumo based 6.0.1), with cmake (3.8.2), all
> > under a standard SDK “rocko based” (2.4.1)…
> >
> >
> >
> > Are the following routines accessible/supported under meta-clang ?
> >
> >
> >
> > libgbe.so: undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'
> >
> > libgbe.so: undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions*, bool)'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticsEngine::~DiagnosticsEngine()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocationBase::~CompilerInvocationBase()'
> >
> > libgbe.so: undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>, clang::DiagnosticOptions*, clang::DiagnosticConsumer*, bool)'
> >
> > libgbe.so: undefined reference to `clang::CodeGenOptions::CodeGenOptions()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::~CompilerInstance()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, clang::MemoryBufferCache*)'
> >
> > libgbe.so: undefined reference to `clang::EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext*)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocationBase::CompilerInvocationBase()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::setInvocation(std::shared_ptr<clang::CompilerInvocation>)'
> >
> > libgbe.so: undefined reference to `clang::CodeGenAction::takeModule()'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticIDs::DiagnosticIDs()'
> >
>
> are you linking this library with libclang ? secondly, also check that its not emitting bunch of libraries which needs to then individually linked
>
> >
> >
> > thanks,
> >
> > Steve
> >
> >
>
> 
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] #yocto #sdk - meta-clang undefined references
  2020-09-16 16:32     ` Khem Raj
@ 2020-09-16 16:35       ` Monsees, Steven C (US)
  0 siblings, 0 replies; 7+ messages in thread
From: Monsees, Steven C (US) @ 2020-09-16 16:35 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto


Yes, I did this... I am currently down to 1 issue:


/ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_to_gen.cpp: In function ‘bool gbe::llvmToGen(gbe::ir::Unit&, const void*, int, bool, int, std::__cxx11::string&)’:
/ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_to_gen.cpp:325:68: error: no matching function for call to ‘llvm::LLVMContext::setDiagnosticHandler(void (*)(const llvm::DiagnosticInfo&, void*), gbe::gbeDiagnosticContext*)’
     mod.getContext().setDiagnosticHandler(&gbeDiagnosticHandler,&dc);
                                                                    ^
In file included from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/Metadata.h:30:0,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/TrackingMDRef.h:17,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/DebugLoc.h:18,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/Instruction.h:22,
                 from /opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/BasicBlock.h:23,
                 from /ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_includes.hpp:30,
                 from /ede/smonsees/yocto/test/beignet-Release_v1.3/backend/src/llvm/llvm_to_gen.cpp:25:
/opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/LLVMContext.h:213:8: note: candidate: void llvm::LLVMContext::setDiagnosticHandler(std::unique_ptr<llvm::DiagnosticHandler>&&, bool)
   void setDiagnosticHandler(std::unique_ptr<DiagnosticHandler> &&DH,
        ^~~~~~~~~~~~~~~~~~~~
/opt/limws/2.4.1/sysroots/llvm-clang/include/llvm/IR/LLVMContext.h:213:8: note:   no known conversion for argument 1 from ‘void (*)(const llvm::DiagnosticInfo&, void*)’ to ‘std::unique_ptr<llvm::DiagnosticHandler>&&’
make[2]: *** [backend/src/CMakeFiles/gbe.dir/llvm/llvm_to_gen.cpp.o] Error 1
make[1]: *** [backend/src/CMakeFiles/gbe.dir/all] Error 2
make: *** [all] Error 2
11:27 smonsees@yix490016 ~/yocto/test/beignet-Release_v1.3/mybuild>

-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com] 
Sent: Wednesday, September 16, 2020 12:32 PM
To: Monsees, Steven C (US) <steven.monsees@baesystems.com>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references

*** WARNING ***
EXTERNAL EMAIL -- This message originates from outside our organization.


that means your link step is not linking libclang properly into your app, perhaps change the order so -lclang appears last

On Wed, Sep 16, 2020 at 4:06 AM Monsees, Steven C (US) <steven.monsees@baesystems.com> wrote:
>
>
>
> It should be linking in libclang , I will validate...
>
> Note performing 'nm' on libclang appear to show the majority present...
>
> Question: if I needed to include a library, what/how would I modify a recipe under Yocto to be sure to include/link in the library ?
>
> Thanks,
> Steve
>
> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Tuesday, September 15, 2020 5:06 PM
> To: Monsees, Steven C (US) <steven.monsees@baesystems.com>
> Cc: yocto@lists.yoctoproject.org
> Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references
>
> *** WARNING ***
> EXTERNAL EMAIL -- This message originates from outside our organization.
>
>
> On Tue, Sep 15, 2020 at 12:56 PM Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
> >
> >
> >
> > I am building meta-clang (sumo based 6.0.1), with cmake (3.8.2), all 
> > under a standard SDK “rocko based” (2.4.1)…
> >
> >
> >
> > Are the following routines accessible/supported under meta-clang ?
> >
> >
> >
> > libgbe.so: undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'
> >
> > libgbe.so: undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions*, bool)'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticsEngine::~DiagnosticsEngine()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocationBase::~CompilerInvocationBase()'
> >
> > libgbe.so: undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>, clang::DiagnosticOptions*, clang::DiagnosticConsumer*, bool)'
> >
> > libgbe.so: undefined reference to `clang::CodeGenOptions::CodeGenOptions()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::~CompilerInstance()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, clang::MemoryBufferCache*)'
> >
> > libgbe.so: undefined reference to `clang::EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext*)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocationBase::CompilerInvocationBase()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::setInvocation(std::shared_ptr<clang::CompilerInvocation>)'
> >
> > libgbe.so: undefined reference to `clang::CodeGenAction::takeModule()'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticIDs::DiagnosticIDs()'
> >
>
> are you linking this library with libclang ? secondly, also check that 
> its not emitting bunch of libraries which needs to then individually 
> linked
>
> >
> >
> > thanks,
> >
> > Steve
> >
> > 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] #yocto #sdk - meta-clang undefined references
       [not found]   ` <5f61f1b4.1c69fb81.6463d.72cfSMTPIN_ADDED_MISSING@mx.google.com>
@ 2020-09-16 16:32     ` Khem Raj
  2020-09-16 16:35       ` Monsees, Steven C (US)
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-09-16 16:32 UTC (permalink / raw)
  To: Monsees, Steven C (US); +Cc: yocto

that means your link step is not linking libclang properly into your
app, perhaps change the order so -lclang appears last

On Wed, Sep 16, 2020 at 4:06 AM Monsees, Steven C (US)
<steven.monsees@baesystems.com> wrote:
>
>
>
> It should be linking in libclang , I will validate...
>
> Note performing 'nm' on libclang appear to show the majority present...
>
> Question: if I needed to include a library, what/how would I modify a recipe under Yocto to be sure to include/link in the library ?
>
> Thanks,
> Steve
>
> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Tuesday, September 15, 2020 5:06 PM
> To: Monsees, Steven C (US) <steven.monsees@baesystems.com>
> Cc: yocto@lists.yoctoproject.org
> Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references
>
> *** WARNING ***
> EXTERNAL EMAIL -- This message originates from outside our organization.
>
>
> On Tue, Sep 15, 2020 at 12:56 PM Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
> >
> >
> >
> > I am building meta-clang (sumo based 6.0.1), with cmake (3.8.2), all
> > under a standard SDK “rocko based” (2.4.1)…
> >
> >
> >
> > Are the following routines accessible/supported under meta-clang ?
> >
> >
> >
> > libgbe.so: undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'
> >
> > libgbe.so: undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions*, bool)'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticsEngine::~DiagnosticsEngine()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocationBase::~CompilerInvocationBase()'
> >
> > libgbe.so: undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>, clang::DiagnosticOptions*, clang::DiagnosticConsumer*, bool)'
> >
> > libgbe.so: undefined reference to `clang::CodeGenOptions::CodeGenOptions()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::~CompilerInstance()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, clang::MemoryBufferCache*)'
> >
> > libgbe.so: undefined reference to `clang::EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext*)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)'
> >
> > libgbe.so: undefined reference to `clang::CompilerInvocationBase::CompilerInvocationBase()'
> >
> > libgbe.so: undefined reference to `clang::CompilerInstance::setInvocation(std::shared_ptr<clang::CompilerInvocation>)'
> >
> > libgbe.so: undefined reference to `clang::CodeGenAction::takeModule()'
> >
> > libgbe.so: undefined reference to `clang::DiagnosticIDs::DiagnosticIDs()'
> >
>
> are you linking this library with libclang ? secondly, also check that its not emitting bunch of libraries which needs to then individually linked
>
> >
> >
> > thanks,
> >
> > Steve
> >
> > 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] #yocto #sdk - meta-clang undefined references
  2020-09-15 21:05 ` [yocto] " Khem Raj
@ 2020-09-16 11:06   ` Monsees, Steven C (US)
       [not found]   ` <5f61f1b4.1c69fb81.6463d.72cfSMTPIN_ADDED_MISSING@mx.google.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Monsees, Steven C (US) @ 2020-09-16 11:06 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto



It should be linking in libclang , I will validate...

Note performing 'nm' on libclang appear to show the majority present...

Question: if I needed to include a library, what/how would I modify a recipe under Yocto to be sure to include/link in the library ?

Thanks,
Steve

-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com] 
Sent: Tuesday, September 15, 2020 5:06 PM
To: Monsees, Steven C (US) <steven.monsees@baesystems.com>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] #yocto #sdk - meta-clang undefined references

*** WARNING ***
EXTERNAL EMAIL -- This message originates from outside our organization.


On Tue, Sep 15, 2020 at 12:56 PM Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
>
>
>
> I am building meta-clang (sumo based 6.0.1), with cmake (3.8.2), all 
> under a standard SDK “rocko based” (2.4.1)…
>
>
>
> Are the following routines accessible/supported under meta-clang ?
>
>
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'
>
> libgbe.so: undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::~DiagnosticsEngine()'
>
> libgbe.so: undefined reference to `clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::~CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>, clang::DiagnosticOptions*, clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::CodeGenOptions::CodeGenOptions()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::~CompilerInstance()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, clang::MemoryBufferCache*)'
>
> libgbe.so: undefined reference to `clang::EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext*)'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::setInvocation(std::shared_ptr<clang::CompilerInvocation>)'
>
> libgbe.so: undefined reference to `clang::CodeGenAction::takeModule()'
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::DiagnosticIDs()'
>

are you linking this library with libclang ? secondly, also check that its not emitting bunch of libraries which needs to then individually linked

>
>
> thanks,
>
> Steve
>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] #yocto #sdk - meta-clang undefined references
  2020-09-15 19:56 Monsees, Steven C (US)
@ 2020-09-15 21:05 ` Khem Raj
  2020-09-16 11:06   ` Monsees, Steven C (US)
       [not found]   ` <5f61f1b4.1c69fb81.6463d.72cfSMTPIN_ADDED_MISSING@mx.google.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Khem Raj @ 2020-09-15 21:05 UTC (permalink / raw)
  To: Monsees, Steven C (US); +Cc: yocto

On Tue, Sep 15, 2020 at 12:56 PM Monsees, Steven C (US) via
lists.yoctoproject.org
<steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
>
>
>
> I am building meta-clang (sumo based 6.0.1), with cmake (3.8.2), all under a standard SDK “rocko based” (2.4.1)…
>
>
>
> Are the following routines accessible/supported under meta-clang ?
>
>
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'
>
> libgbe.so: undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::~DiagnosticsEngine()'
>
> libgbe.so: undefined reference to `clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::~CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>, clang::DiagnosticOptions*, clang::DiagnosticConsumer*, bool)'
>
> libgbe.so: undefined reference to `clang::CodeGenOptions::CodeGenOptions()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::~CompilerInstance()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, clang::MemoryBufferCache*)'
>
> libgbe.so: undefined reference to `clang::EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext*)'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)'
>
> libgbe.so: undefined reference to `clang::CompilerInvocationBase::CompilerInvocationBase()'
>
> libgbe.so: undefined reference to `clang::CompilerInstance::setInvocation(std::shared_ptr<clang::CompilerInvocation>)'
>
> libgbe.so: undefined reference to `clang::CodeGenAction::takeModule()'
>
> libgbe.so: undefined reference to `clang::DiagnosticIDs::DiagnosticIDs()'
>

are you linking this library with libclang ? secondly, also check that
its not emitting bunch of libraries which needs to then individually
linked

>
>
> thanks,
>
> Steve
>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-16 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 14:04 [yocto] #yocto #sdk - meta-clang undefined references Monsees, Steven C (US)
2020-09-16 15:37 ` Monsees, Steven C (US)
2020-09-16 16:29 ` Khem Raj
  -- strict thread matches above, loose matches on Subject: below --
2020-09-15 19:56 Monsees, Steven C (US)
2020-09-15 21:05 ` [yocto] " Khem Raj
2020-09-16 11:06   ` Monsees, Steven C (US)
     [not found]   ` <5f61f1b4.1c69fb81.6463d.72cfSMTPIN_ADDED_MISSING@mx.google.com>
2020-09-16 16:32     ` Khem Raj
2020-09-16 16:35       ` Monsees, Steven C (US)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.