All of lore.kernel.org
 help / color / mirror / Atom feed
* Including Static Libraries from sysroot in an autotools based package
@ 2015-03-19  9:04 Priya Agarwal
  2015-03-19  9:07 ` Priya Agarwal
  0 siblings, 1 reply; 12+ messages in thread
From: Priya Agarwal @ 2015-03-19  9:04 UTC (permalink / raw)
  To: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Hi,

I need to link some libraries which are in sysroot into my source code.
These are usdpaa libraries.

I added DEPENDS += "usdpaa" in .bb file.
Apart from that also changed the Makefile.am of my source to include the
following:
area_LDADD = -lusdpaa_of
Then I ran aclocal, autoconf, automake --add-missing and retarred my
package.

When the package is being built from recipe, do_compile fails.
So this means that libraries are not getting linked by just doing the above
changes. What else I need to change?

I think this problem is specific to autotools based projects as when I
include the libraries during the gcc command they are easily included.

do_compile() {
    ${CC} check.c -o check -lusdpaa_of
}
link to area.bb
http://pastebin.com/Bef2C7nX

[-- Attachment #2: Type: text/html, Size: 1078 bytes --]

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

* Re: Including Static Libraries from sysroot in an autotools based package
  2015-03-19  9:04 Including Static Libraries from sysroot in an autotools based package Priya Agarwal
@ 2015-03-19  9:07 ` Priya Agarwal
  2015-03-20  2:56     ` zhenhua.luo
  2015-03-20  3:13     ` [yocto] " Khem Raj
  0 siblings, 2 replies; 12+ messages in thread
From: Priya Agarwal @ 2015-03-19  9:07 UTC (permalink / raw)
  To: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

Hi,

I need to link some libraries which are in sysroot into my source code.
These are usdpaa libraries.

I added DEPENDS += "usdpaa" in .bb file.
Apart from that also changed the Makefile.am of my source to include the
following:
area_LDADD = -lusdpaa_of
Then I ran aclocal, autoconf, automake --add-missing and retarred my
package.

When the package is being built from recipe, do_compile fails. It shows
"undefined reference to" error.
So this means that libraries are not getting linked by just doing the above
changes. What else I need to change?

I think this problem is specific to autotools based projects as when I
include the libraries during the gcc command they are easily included.

do_compile() {
    ${CC} check.c -o check -lusdpaa_of
}
link to area.bb
http://pastebin.com/Bef2C7nX

[-- Attachment #2: Type: text/html, Size: 1131 bytes --]

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

* Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package
  2015-03-19  9:07 ` Priya Agarwal
@ 2015-03-20  2:56     ` zhenhua.luo
  2015-03-20  3:13     ` [yocto] " Khem Raj
  1 sibling, 0 replies; 12+ messages in thread
From: zhenhua.luo @ 2015-03-20  2:56 UTC (permalink / raw)
  To: Priya Agarwal, meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

The following article would be helpful for you.

http://stackoverflow.com/questions/2057472/howto-add-a-link-to-a-library-in-autoconf-configure-script-makefile


Best Regards,

Zhenhua

From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-bounces@yoctoproject.org] On Behalf Of Priya Agarwal
Sent: Thursday, March 19, 2015 5:07 PM
To: meta-freescale@yoctoproject.org; yocto-builds@yoctoproject.org; yocto@yoctoproject.org
Subject: Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package

Hi,
I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.
I added DEPENDS += "usdpaa" in .bb file.
Apart from that also changed the Makefile.am of my source to include the following:
area_LDADD = -lusdpaa_of
Then I ran aclocal, autoconf, automake --add-missing and retarred my package.
When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.
So this means that libraries are not getting linked by just doing the above changes. What else I need to change?

I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.

do_compile() {
    ${CC} check.c -o check -lusdpaa_of
}
link to area.bb<http://area.bb>
http://pastebin.com/Bef2C7nX

[-- Attachment #2: Type: text/html, Size: 5688 bytes --]

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

* Re: Including Static Libraries from sysroot in an autotools based package
@ 2015-03-20  2:56     ` zhenhua.luo
  0 siblings, 0 replies; 12+ messages in thread
From: zhenhua.luo @ 2015-03-20  2:56 UTC (permalink / raw)
  To: Priya Agarwal, meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

The following article would be helpful for you.

http://stackoverflow.com/questions/2057472/howto-add-a-link-to-a-library-in-autoconf-configure-script-makefile


Best Regards,

Zhenhua

From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-bounces@yoctoproject.org] On Behalf Of Priya Agarwal
Sent: Thursday, March 19, 2015 5:07 PM
To: meta-freescale@yoctoproject.org; yocto-builds@yoctoproject.org; yocto@yoctoproject.org
Subject: Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package

Hi,
I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.
I added DEPENDS += "usdpaa" in .bb file.
Apart from that also changed the Makefile.am of my source to include the following:
area_LDADD = -lusdpaa_of
Then I ran aclocal, autoconf, automake --add-missing and retarred my package.
When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.
So this means that libraries are not getting linked by just doing the above changes. What else I need to change?

I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.

do_compile() {
    ${CC} check.c -o check -lusdpaa_of
}
link to area.bb<http://area.bb>
http://pastebin.com/Bef2C7nX

[-- Attachment #2: Type: text/html, Size: 5688 bytes --]

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

* Re: Including Static Libraries from sysroot in an autotools based package
  2015-03-19  9:07 ` Priya Agarwal
@ 2015-03-20  3:13     ` Khem Raj
  2015-03-20  3:13     ` [yocto] " Khem Raj
  1 sibling, 0 replies; 12+ messages in thread
From: Khem Raj @ 2015-03-20  3:13 UTC (permalink / raw)
  To: Priya Agarwal; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]


> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in> wrote:
> 
> Hi,
> 
> I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.
> 
> I added DEPENDS += "usdpaa" in .bb file.
> Apart from that also changed the Makefile.am of my source to include the following:
> area_LDADD = -lusdpaa_of
> Then I ran aclocal, autoconf, automake --add-missing and retarred my package.
> 
> When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.
> So this means that libraries are not getting linked by just doing the above changes. What else I need to change?

I think you need to specify them in Makefile.am using LDADD since it is using auto tools. Please take a look at Automake documentation
http://www.gnu.org/software/automake/manual/html_node/Linking.html <http://www.gnu.org/software/automake/manual/html_node/Linking.html>
might be helpful.

> 
> I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.
> 
> do_compile() {
>     ${CC} check.c -o check -lusdpaa_of
> }
> link to area.bb <http://area.bb/>
> http://pastebin.com/Bef2C7nX <http://pastebin.com/Bef2C7nX>-- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


[-- Attachment #2: Type: text/html, Size: 2639 bytes --]

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

* Re: [yocto] Including Static Libraries from sysroot in an autotools based package
@ 2015-03-20  3:13     ` Khem Raj
  0 siblings, 0 replies; 12+ messages in thread
From: Khem Raj @ 2015-03-20  3:13 UTC (permalink / raw)
  To: Priya Agarwal; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]


> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in> wrote:
> 
> Hi,
> 
> I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.
> 
> I added DEPENDS += "usdpaa" in .bb file.
> Apart from that also changed the Makefile.am of my source to include the following:
> area_LDADD = -lusdpaa_of
> Then I ran aclocal, autoconf, automake --add-missing and retarred my package.
> 
> When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.
> So this means that libraries are not getting linked by just doing the above changes. What else I need to change?

I think you need to specify them in Makefile.am using LDADD since it is using auto tools. Please take a look at Automake documentation
http://www.gnu.org/software/automake/manual/html_node/Linking.html <http://www.gnu.org/software/automake/manual/html_node/Linking.html>
might be helpful.

> 
> I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.
> 
> do_compile() {
>     ${CC} check.c -o check -lusdpaa_of
> }
> link to area.bb <http://area.bb/>
> http://pastebin.com/Bef2C7nX <http://pastebin.com/Bef2C7nX>-- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


[-- Attachment #2: Type: text/html, Size: 2639 bytes --]

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

* Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package
  2015-03-20  3:13     ` [yocto] " Khem Raj
@ 2015-03-20  3:37       ` Priya Agarwal
  -1 siblings, 0 replies; 12+ messages in thread
From: Priya Agarwal @ 2015-03-20  3:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 2196 bytes --]

I have edited the Makefile.am as well in this way:

squid_LDADD += -lusdpaa_of

Then I just retarred squid code and build it again.

And The libraries are shown in the compile command as well, when I see the
log.do_compile generated during the build.
Check Line number 403 in this pastebin link. (ctrl+F 'usdpaa_of' could show
where all it occurs). http://pastebin.com/LpaymTQa
So how is it possible they are not actually linked.
I even checked the OVERRIDE variable in bitbake.conf which is set
correctly.
I really need to link this library. :/

On Fri, Mar 20, 2015 at 8:43 AM, Khem Raj <raj.khem@gmail.com> wrote:

>
> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <
> priya_agarwal@students.iitmandi.ac.in> wrote:
>
> Hi,
>
> I need to link some libraries which are in sysroot into my source code.
> These are usdpaa libraries.
>
> I added DEPENDS += "usdpaa" in .bb file.
> Apart from that also changed the Makefile.am of my source to include the
> following:
> area_LDADD = -lusdpaa_of
> Then I ran aclocal, autoconf, automake --add-missing and retarred my
> package.
>
> When the package is being built from recipe, do_compile fails. It shows
> "undefined reference to" error.
> So this means that libraries are not getting linked by just doing the
> above changes. What else I need to change?
>
>
> I think you need to specify them in Makefile.am using LDADD since it is
> using auto tools. Please take a look at Automake documentation
> http://www.gnu.org/software/automake/manual/html_node/Linking.html
> might be helpful.
>
>
> I think this problem is specific to autotools based projects as when I
> include the libraries during the gcc command they are easily included.
>
> do_compile() {
>     ${CC} check.c -o check -lusdpaa_of
> }
> link to area.bb
> http://pastebin.com/Bef2C7nX
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>
>

[-- Attachment #2: Type: text/html, Size: 3662 bytes --]

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

* Re: [yocto] Including Static Libraries from sysroot in an autotools based package
@ 2015-03-20  3:37       ` Priya Agarwal
  0 siblings, 0 replies; 12+ messages in thread
From: Priya Agarwal @ 2015-03-20  3:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 2196 bytes --]

I have edited the Makefile.am as well in this way:

squid_LDADD += -lusdpaa_of

Then I just retarred squid code and build it again.

And The libraries are shown in the compile command as well, when I see the
log.do_compile generated during the build.
Check Line number 403 in this pastebin link. (ctrl+F 'usdpaa_of' could show
where all it occurs). http://pastebin.com/LpaymTQa
So how is it possible they are not actually linked.
I even checked the OVERRIDE variable in bitbake.conf which is set
correctly.
I really need to link this library. :/

On Fri, Mar 20, 2015 at 8:43 AM, Khem Raj <raj.khem@gmail.com> wrote:

>
> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <
> priya_agarwal@students.iitmandi.ac.in> wrote:
>
> Hi,
>
> I need to link some libraries which are in sysroot into my source code.
> These are usdpaa libraries.
>
> I added DEPENDS += "usdpaa" in .bb file.
> Apart from that also changed the Makefile.am of my source to include the
> following:
> area_LDADD = -lusdpaa_of
> Then I ran aclocal, autoconf, automake --add-missing and retarred my
> package.
>
> When the package is being built from recipe, do_compile fails. It shows
> "undefined reference to" error.
> So this means that libraries are not getting linked by just doing the
> above changes. What else I need to change?
>
>
> I think you need to specify them in Makefile.am using LDADD since it is
> using auto tools. Please take a look at Automake documentation
> http://www.gnu.org/software/automake/manual/html_node/Linking.html
> might be helpful.
>
>
> I think this problem is specific to autotools based projects as when I
> include the libraries during the gcc command they are easily included.
>
> do_compile() {
>     ${CC} check.c -o check -lusdpaa_of
> }
> link to area.bb
> http://pastebin.com/Bef2C7nX
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>
>

[-- Attachment #2: Type: text/html, Size: 3662 bytes --]

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

* Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package
  2015-03-20  3:37       ` [yocto] " Priya Agarwal
@ 2015-03-20  8:09         ` Priya Agarwal
  -1 siblings, 0 replies; 12+ messages in thread
From: Priya Agarwal @ 2015-03-20  8:09 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 2551 bytes --]

Hello,

Sorry to ask this question but I am unable to find any answer in reference
manuals.
${CC} is a c compiler. For c++ is it ${CXX} or something else.

Thanks.

On Fri, Mar 20, 2015 at 9:07 AM, Priya Agarwal <
priya_agarwal@students.iitmandi.ac.in> wrote:

> I have edited the Makefile.am as well in this way:
>
> squid_LDADD += -lusdpaa_of
>
> Then I just retarred squid code and build it again.
>
> And The libraries are shown in the compile command as well, when I see the
> log.do_compile generated during the build.
> Check Line number 403 in this pastebin link. (ctrl+F 'usdpaa_of' could
> show where all it occurs). http://pastebin.com/LpaymTQa
> So how is it possible they are not actually linked.
> I even checked the OVERRIDE variable in bitbake.conf which is set
> correctly.
> I really need to link this library. :/
>
> On Fri, Mar 20, 2015 at 8:43 AM, Khem Raj <raj.khem@gmail.com> wrote:
>
>>
>> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <
>> priya_agarwal@students.iitmandi.ac.in> wrote:
>>
>> Hi,
>>
>> I need to link some libraries which are in sysroot into my source code.
>> These are usdpaa libraries.
>>
>> I added DEPENDS += "usdpaa" in .bb file.
>> Apart from that also changed the Makefile.am of my source to include the
>> following:
>> area_LDADD = -lusdpaa_of
>> Then I ran aclocal, autoconf, automake --add-missing and retarred my
>> package.
>>
>> When the package is being built from recipe, do_compile fails. It shows
>> "undefined reference to" error.
>> So this means that libraries are not getting linked by just doing the
>> above changes. What else I need to change?
>>
>>
>> I think you need to specify them in Makefile.am using LDADD since it is
>> using auto tools. Please take a look at Automake documentation
>> http://www.gnu.org/software/automake/manual/html_node/Linking.html
>> might be helpful.
>>
>>
>> I think this problem is specific to autotools based projects as when I
>> include the libraries during the gcc command they are easily included.
>>
>> do_compile() {
>>     ${CC} check.c -o check -lusdpaa_of
>> }
>> link to area.bb
>> http://pastebin.com/Bef2C7nX
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>>
>> --
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 4404 bytes --]

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

* Re: [yocto] Including Static Libraries from sysroot in an autotools based package
@ 2015-03-20  8:09         ` Priya Agarwal
  0 siblings, 0 replies; 12+ messages in thread
From: Priya Agarwal @ 2015-03-20  8:09 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 2551 bytes --]

Hello,

Sorry to ask this question but I am unable to find any answer in reference
manuals.
${CC} is a c compiler. For c++ is it ${CXX} or something else.

Thanks.

On Fri, Mar 20, 2015 at 9:07 AM, Priya Agarwal <
priya_agarwal@students.iitmandi.ac.in> wrote:

> I have edited the Makefile.am as well in this way:
>
> squid_LDADD += -lusdpaa_of
>
> Then I just retarred squid code and build it again.
>
> And The libraries are shown in the compile command as well, when I see the
> log.do_compile generated during the build.
> Check Line number 403 in this pastebin link. (ctrl+F 'usdpaa_of' could
> show where all it occurs). http://pastebin.com/LpaymTQa
> So how is it possible they are not actually linked.
> I even checked the OVERRIDE variable in bitbake.conf which is set
> correctly.
> I really need to link this library. :/
>
> On Fri, Mar 20, 2015 at 8:43 AM, Khem Raj <raj.khem@gmail.com> wrote:
>
>>
>> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <
>> priya_agarwal@students.iitmandi.ac.in> wrote:
>>
>> Hi,
>>
>> I need to link some libraries which are in sysroot into my source code.
>> These are usdpaa libraries.
>>
>> I added DEPENDS += "usdpaa" in .bb file.
>> Apart from that also changed the Makefile.am of my source to include the
>> following:
>> area_LDADD = -lusdpaa_of
>> Then I ran aclocal, autoconf, automake --add-missing and retarred my
>> package.
>>
>> When the package is being built from recipe, do_compile fails. It shows
>> "undefined reference to" error.
>> So this means that libraries are not getting linked by just doing the
>> above changes. What else I need to change?
>>
>>
>> I think you need to specify them in Makefile.am using LDADD since it is
>> using auto tools. Please take a look at Automake documentation
>> http://www.gnu.org/software/automake/manual/html_node/Linking.html
>> might be helpful.
>>
>>
>> I think this problem is specific to autotools based projects as when I
>> include the libraries during the gcc command they are easily included.
>>
>> do_compile() {
>>     ${CC} check.c -o check -lusdpaa_of
>> }
>> link to area.bb
>> http://pastebin.com/Bef2C7nX
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>>
>> --
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 4404 bytes --]

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

* Re: [meta-freescale] Including Static Libraries from sysroot in an autotools based package
  2015-03-20  8:09         ` [yocto] " Priya Agarwal
@ 2015-03-20  8:24           ` Khem Raj
  -1 siblings, 0 replies; 12+ messages in thread
From: Khem Raj @ 2015-03-20  8:24 UTC (permalink / raw)
  To: Priya Agarwal; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 3195 bytes --]


> On Mar 20, 2015, at 1:09 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in> wrote:
> 
> Hello,
> 
> Sorry to ask this question but I am unable to find any answer in reference manuals.
> ${CC} is a c compiler. For c++ is it ${CXX} or something else.

Yes, you can always do bitbake -e <somepackage>  | grep -e “^CXX=“
and figure out various variables that you want to evaluate

> 
> Thanks.
> 
> On Fri, Mar 20, 2015 at 9:07 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in <mailto:priya_agarwal@students.iitmandi.ac.in>> wrote:
> I have edited the Makefile.am as well in this way:
> 
> squid_LDADD += -lusdpaa_of
> 
> Then I just retarred squid code and build it again.
> 
> And The libraries are shown in the compile command as well, when I see the log.do_compile generated during the build.
> Check Line number 403 in this pastebin link. (ctrl+F 'usdpaa_of' could show where all it occurs). http://pastebin.com/LpaymTQa <http://pastebin.com/LpaymTQa>
> So how is it possible they are not actually linked.
> I even checked the OVERRIDE variable in bitbake.conf which is set correctly. 
> I really need to link this library. :/
> 
> On Fri, Mar 20, 2015 at 8:43 AM, Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>> wrote:
> 
>> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in <mailto:priya_agarwal@students.iitmandi.ac.in>> wrote:
>> 
>> Hi,
>> 
>> I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.
>> 
>> I added DEPENDS += "usdpaa" in .bb file.
>> Apart from that also changed the Makefile.am of my source to include the following:
>> area_LDADD = -lusdpaa_of
>> Then I ran aclocal, autoconf, automake --add-missing and retarred my package.
>> 
>> When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.
>> So this means that libraries are not getting linked by just doing the above changes. What else I need to change?
> 
> I think you need to specify them in Makefile.am using LDADD since it is using auto tools. Please take a look at Automake documentation
> http://www.gnu.org/software/automake/manual/html_node/Linking.html <http://www.gnu.org/software/automake/manual/html_node/Linking.html>
> might be helpful.
> 
>> 
>> I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.
>> 
>> do_compile() {
>>     ${CC} check.c -o check -lusdpaa_of
>> }
>> link to area.bb <http://area.bb/>
>> http://pastebin.com/Bef2C7nX <http://pastebin.com/Bef2C7nX>-- 
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
>> https://lists.yoctoproject.org/listinfo/yocto <https://lists.yoctoproject.org/listinfo/yocto>
> 
> 
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org <mailto:meta-freescale@yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/meta-freescale <https://lists.yoctoproject.org/listinfo/meta-freescale>
> 
> 
> 


[-- Attachment #2: Type: text/html, Size: 6217 bytes --]

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

* Re: [yocto] Including Static Libraries from sysroot in an autotools based package
@ 2015-03-20  8:24           ` Khem Raj
  0 siblings, 0 replies; 12+ messages in thread
From: Khem Raj @ 2015-03-20  8:24 UTC (permalink / raw)
  To: Priya Agarwal; +Cc: meta-freescale, yocto-builds, yocto

[-- Attachment #1: Type: text/plain, Size: 3195 bytes --]


> On Mar 20, 2015, at 1:09 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in> wrote:
> 
> Hello,
> 
> Sorry to ask this question but I am unable to find any answer in reference manuals.
> ${CC} is a c compiler. For c++ is it ${CXX} or something else.

Yes, you can always do bitbake -e <somepackage>  | grep -e “^CXX=“
and figure out various variables that you want to evaluate

> 
> Thanks.
> 
> On Fri, Mar 20, 2015 at 9:07 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in <mailto:priya_agarwal@students.iitmandi.ac.in>> wrote:
> I have edited the Makefile.am as well in this way:
> 
> squid_LDADD += -lusdpaa_of
> 
> Then I just retarred squid code and build it again.
> 
> And The libraries are shown in the compile command as well, when I see the log.do_compile generated during the build.
> Check Line number 403 in this pastebin link. (ctrl+F 'usdpaa_of' could show where all it occurs). http://pastebin.com/LpaymTQa <http://pastebin.com/LpaymTQa>
> So how is it possible they are not actually linked.
> I even checked the OVERRIDE variable in bitbake.conf which is set correctly. 
> I really need to link this library. :/
> 
> On Fri, Mar 20, 2015 at 8:43 AM, Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>> wrote:
> 
>> On Mar 19, 2015, at 2:07 AM, Priya Agarwal <priya_agarwal@students.iitmandi.ac.in <mailto:priya_agarwal@students.iitmandi.ac.in>> wrote:
>> 
>> Hi,
>> 
>> I need to link some libraries which are in sysroot into my source code. These are usdpaa libraries.
>> 
>> I added DEPENDS += "usdpaa" in .bb file.
>> Apart from that also changed the Makefile.am of my source to include the following:
>> area_LDADD = -lusdpaa_of
>> Then I ran aclocal, autoconf, automake --add-missing and retarred my package.
>> 
>> When the package is being built from recipe, do_compile fails. It shows "undefined reference to" error.
>> So this means that libraries are not getting linked by just doing the above changes. What else I need to change?
> 
> I think you need to specify them in Makefile.am using LDADD since it is using auto tools. Please take a look at Automake documentation
> http://www.gnu.org/software/automake/manual/html_node/Linking.html <http://www.gnu.org/software/automake/manual/html_node/Linking.html>
> might be helpful.
> 
>> 
>> I think this problem is specific to autotools based projects as when I include the libraries during the gcc command they are easily included.
>> 
>> do_compile() {
>>     ${CC} check.c -o check -lusdpaa_of
>> }
>> link to area.bb <http://area.bb/>
>> http://pastebin.com/Bef2C7nX <http://pastebin.com/Bef2C7nX>-- 
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
>> https://lists.yoctoproject.org/listinfo/yocto <https://lists.yoctoproject.org/listinfo/yocto>
> 
> 
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org <mailto:meta-freescale@yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/meta-freescale <https://lists.yoctoproject.org/listinfo/meta-freescale>
> 
> 
> 


[-- Attachment #2: Type: text/html, Size: 6217 bytes --]

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

end of thread, other threads:[~2015-03-20  8:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19  9:04 Including Static Libraries from sysroot in an autotools based package Priya Agarwal
2015-03-19  9:07 ` Priya Agarwal
2015-03-20  2:56   ` [meta-freescale] " zhenhua.luo
2015-03-20  2:56     ` zhenhua.luo
2015-03-20  3:13   ` Khem Raj
2015-03-20  3:13     ` [yocto] " Khem Raj
2015-03-20  3:37     ` [meta-freescale] " Priya Agarwal
2015-03-20  3:37       ` [yocto] " Priya Agarwal
2015-03-20  8:09       ` [meta-freescale] " Priya Agarwal
2015-03-20  8:09         ` [yocto] " Priya Agarwal
2015-03-20  8:24         ` [meta-freescale] " Khem Raj
2015-03-20  8:24           ` [yocto] " Khem Raj

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.