All of lore.kernel.org
 help / color / mirror / Atom feed
* external-toolchain-csl and libtool 2.4
@ 2010-10-21 23:02 Pierluigi Passaro
  2010-10-22 20:49 ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Pierluigi Passaro @ 2010-10-21 23:02 UTC (permalink / raw)
  To: openembedded-devel

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

Hi all,
LIBTOOL_HAS_SYSROOT feature has been recently enabled on Angstom 2010.x 
distro.

However, using CodeSourcery toolchain, this feature lead to use CSL 
sysroot as search path, that is generally different from 
${STAGING_DIR_TARGET}${libdir} folder used for packages.

At present I worked around the problem with the attached patch, but I 
was wondering if this could be a misconfiguration or a bug.

Any suggestion will be appreciated.

Regards
Gigi

-- 
Ing. Pierluigi Passaro
Viale Don Luigi Sturzo 34
30174 Venezia Mestre
Cel: +39 348 355 4119
Tel: +39 041 862 3373
Fax: +39 041 862 3173
Web: www.phoenixsoftware.it
P.IVA 03884060272


[-- Attachment #2: csl-do-not-use-sysroot.patch --]
[-- Type: text/x-patch, Size: 2108 bytes --]

diff --git a/conf/distro/include/toolchain-external.inc b/conf/distro/include/toolchain-external.inc
index 59b6470..cf8b79a 100644
--- a/conf/distro/include/toolchain-external.inc
+++ b/conf/distro/include/toolchain-external.inc
@@ -8,3 +8,5 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "external-toolchain-${TOOLCHAIN
 
 TOOLCHAIN_VENDOR ?= "${TARGET_VENDOR}"
 TARGET_VENDOR := "${TOOLCHAIN_VENDOR}"
+
+LIBTOOL_HAS_SYSROOT = "no"
diff --git a/recipes/libtool/libtool.inc b/recipes/libtool/libtool.inc
index 97fdb30..71bd243 100644
--- a/recipes/libtool/libtool.inc
+++ b/recipes/libtool/libtool.inc
@@ -18,7 +18,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
            file://trailingslash.patch \
           file://prefix-manpage-fix.patch \
           file://resolve-sysroot.patch \
-          file://use-sysroot-in-libpath.patch \
+          ${@['file://do-not-use-sysroot-in-libpath.patch','file://use-sysroot-in-libpath.patch'][bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == 'yes']} \
           "
 do_configure_prepend () {
        if ${@['true', 'false'][bb.data.inherits_class('native', d) or bb.data.inherits_class('sdk', d) or (bb.data.getVar('PN', d, 1) == 'libtool-cross')]}
--- /dev/null
+++ b/recipes/libtool/libtool-2.4/do-not-use-sysroot-in-libpath.patch
@@ -0,0 +1,18 @@
+When using sysroot we should append it to libdir which is helpful in cross builds
+as the system is staged in the sysroot. For normal build i.e. when lt_sysroot is not
+set it will still behave same and add -L/usr/lib to relink command
+
+-Khem
+
+Index: libtool-2.4/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.4.orig/libltdl/config/ltmain.m4sh
++++ libtool-2.4/libltdl/config/ltmain.m4sh
+@@ -6122,7 +6122,6 @@ func_mode_link ()
+ 	      fi
+ 	    else
+ 	      # We cannot seem to hardcode it, guess we'll fake it.
+-	      add_dir="-L$libdir"
+ 	      # Try looking first in the location we're being installed to.
+ 	      if test -n "$inst_prefix_dir"; then
+ 		case $libdir in


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

* Re: external-toolchain-csl and libtool 2.4
  2010-10-21 23:02 external-toolchain-csl and libtool 2.4 Pierluigi Passaro
@ 2010-10-22 20:49 ` Khem Raj
  2010-10-22 21:31   ` Pierluigi Passaro
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2010-10-22 20:49 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Oct 21, 2010 at 4:02 PM, Pierluigi Passaro
<pierluigi.passaro@phoenixsoftware.it> wrote:
> Hi all,
> LIBTOOL_HAS_SYSROOT feature has been recently enabled on Angstom 2010.x
> distro.
>
> However, using CodeSourcery toolchain, this feature lead to use CSL sysroot
> as search path, that is generally different from
> ${STAGING_DIR_TARGET}${libdir} folder used for packages.

hmmm yes I see the problem. Right now its left upto the compile to provide
the sysroot which works well with internal toolchain but will not work with
external toolchains or the compilers which dont support --print-sysroot option

I will come up with a patch so specify the sysroot for libtool so that it
does not rely upon the compiler to compute it.

>
> At present I worked around the problem with the attached patch, but I was
> wondering if this could be a misconfiguration or a bug.
>
> Any suggestion will be appreciated.
>

With libtool 2.4 I dont see a reason to disable sysroot. The variable is only
provided to keep libtool 2.2.6 functional as same time. So when using 2.4 please
do not disable the sysroot feature.

> Regards
> Gigi
>
> --
> Ing. Pierluigi Passaro
> Viale Don Luigi Sturzo 34
> 30174 Venezia Mestre
> Cel: +39 348 355 4119
> Tel: +39 041 862 3373
> Fax: +39 041 862 3173
> Web: www.phoenixsoftware.it
> P.IVA 03884060272
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
>



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

* Re: external-toolchain-csl and libtool 2.4
  2010-10-22 20:49 ` Khem Raj
@ 2010-10-22 21:31   ` Pierluigi Passaro
  2010-10-23  5:04     ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Pierluigi Passaro @ 2010-10-22 21:31 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> On Thu, Oct 21, 2010 at 4:02 PM, Pierluigi Passaro
> <pierluigi.passaro@phoenixsoftware.it> wrote:
>   
>> Hi all,
>> LIBTOOL_HAS_SYSROOT feature has been recently enabled on Angstom 2010.x
>> distro.
>>
>> However, using CodeSourcery toolchain, this feature lead to use CSL sysroot
>> as search path, that is generally different from
>> ${STAGING_DIR_TARGET}${libdir} folder used for packages.
>>     
>
> hmmm yes I see the problem. Right now its left upto the compile to provide
> the sysroot which works well with internal toolchain but will not work with
> external toolchains or the compilers which dont support --print-sysroot option
>
> I will come up with a patch so specify the sysroot for libtool so that it
> does not rely upon the compiler to compute it.
>
>   
I'm not expert of libtool mechanisms but please let me know I can 
provide any support.
>> At present I worked around the problem with the attached patch, but I was
>> wondering if this could be a misconfiguration or a bug.
>>
>> Any suggestion will be appreciated.
>>
>>     
>
> With libtool 2.4 I dont see a reason to disable sysroot. The variable is only
> provided to keep libtool 2.2.6 functional as same time. So when using 2.4 please
> do not disable the sysroot feature.
>
>   
I agree with you, I will just keep the patch for personal use, until 
libtool will not rely on CSL compiler to compute sysroot.
>> Regards
>> Gigi
>>
>> --
>> Ing. Pierluigi Passaro
>> Viale Don Luigi Sturzo 34
>> 30174 Venezia Mestre
>> Cel: +39 348 355 4119
>> Tel: +39 041 862 3373
>> Fax: +39 041 862 3173
>> Web: www.phoenixsoftware.it
>> P.IVA 03884060272
>>
>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>     
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>   



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

* Re: external-toolchain-csl and libtool 2.4
  2010-10-22 21:31   ` Pierluigi Passaro
@ 2010-10-23  5:04     ` Khem Raj
  2010-10-29  9:29       ` Pierluigi Passaro
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2010-10-23  5:04 UTC (permalink / raw)
  To: openembedded-devel

I have posted a patch to address this issue please try that out

On 10/22/10, Pierluigi Passaro <pierluigi.passaro@phoenixsoftware.it> wrote:
> Khem Raj wrote:
>> On Thu, Oct 21, 2010 at 4:02 PM, Pierluigi Passaro
>> <pierluigi.passaro@phoenixsoftware.it> wrote:
>>
>>> Hi all,
>>> LIBTOOL_HAS_SYSROOT feature has been recently enabled on Angstom 2010.x
>>> distro.
>>>
>>> However, using CodeSourcery toolchain, this feature lead to use CSL
>>> sysroot
>>> as search path, that is generally different from
>>> ${STAGING_DIR_TARGET}${libdir} folder used for packages.
>>>
>>
>> hmmm yes I see the problem. Right now its left upto the compile to provide
>> the sysroot which works well with internal toolchain but will not work
>> with
>> external toolchains or the compilers which dont support --print-sysroot
>> option
>>
>> I will come up with a patch so specify the sysroot for libtool so that it
>> does not rely upon the compiler to compute it.
>>
>>
> I'm not expert of libtool mechanisms but please let me know I can
> provide any support.
>>> At present I worked around the problem with the attached patch, but I was
>>> wondering if this could be a misconfiguration or a bug.
>>>
>>> Any suggestion will be appreciated.
>>>
>>>
>>
>> With libtool 2.4 I dont see a reason to disable sysroot. The variable is
>> only
>> provided to keep libtool 2.2.6 functional as same time. So when using 2.4
>> please
>> do not disable the sysroot feature.
>>
>>
> I agree with you, I will just keep the patch for personal use, until
> libtool will not rely on CSL compiler to compute sysroot.
>>> Regards
>>> Gigi
>>>
>>> --
>>> Ing. Pierluigi Passaro
>>> Viale Don Luigi Sturzo 34
>>> 30174 Venezia Mestre
>>> Cel: +39 348 355 4119
>>> Tel: +39 041 862 3373
>>> Fax: +39 041 862 3173
>>> Web: www.phoenixsoftware.it
>>> P.IVA 03884060272
>>>
>>>
>>> _______________________________________________
>>> Openembedded-devel mailing list
>>> Openembedded-devel@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

-- 
Sent from my mobile device

-Khem



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

* Re: external-toolchain-csl and libtool 2.4
  2010-10-23  5:04     ` Khem Raj
@ 2010-10-29  9:29       ` Pierluigi Passaro
  0 siblings, 0 replies; 5+ messages in thread
From: Pierluigi Passaro @ 2010-10-29  9:29 UTC (permalink / raw)
  To: openembedded-devel

Thanks for your patches, however the problem is still reproducible 
building libusb-compat with codesourcery toolchain: for some reason, the 
rpath flag is pointing to /usr/lib instead of $lt_sysroot/usr/lib.

The rpath flag, usually not present, is introduced cause generating a 
".lo" file.

Any suggestion?

Following the final part of the log

| /bin/sh ../arm-none-linux-gnueabi-libtool --tag=CC   --mode=link 
arm-none-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon 
-mfloat-abi=softfp -mthumb-interwork -mno-thumb -fvisibility=hidden 
-std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes 
-Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow 
-I/home/gigi/code/tmp/sysroots/armv7a-none-linux-gnueabi/usr/include/libusb-1.0   
-isystem/home/gigi/code/tmp/sysroots/armv7a-none-linux-gnueabi/usr/include 
-fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 
-ggdb2 -version-info 8:4:4 -release 0.1 -Wl,-O1 -Wl,--hash-style=gnu -o 
libusb.la -rpath /usr/lib libusb_la-core.lo -lusb-1.0
| arm-none-linux-gnueabi-libtool: link: arm-none-linux-gnueabi-gcc 
-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp 
-mthumb-interwork -mno-thumb -shared  -fPIC -DPIC  
.libs/libusb_la-core.o   -lusb-1.0  -march=armv7-a -mtune=cortex-a8 
-mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb -O2 -Wl,-O1 
-Wl,--hash-style=gnu   -Wl,-soname -Wl,libusb-0.1.so.4 -o 
.libs/libusb-0.1.so.4.4.4
| 
/opt/codesourcery/arm-2010q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: 
cannot find -lusb-1.0
| collect2: ld returned 1 exit status
| make[2]: *** [libusb.la] Error 1
| make[2]: Leaving directory 
`/home/gigi/code/tmp/work/armv7a-none-linux-gnueabi/libusb-compat-1_0.1.3-r0/libusb-compat-0.1.3/libusb'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory 
`/home/gigi/code/tmp/work/armv7a-none-linux-gnueabi/libusb-compat-1_0.1.3-r0/libusb-compat-0.1.3'
| make: *** [all] Error 2
| FATAL: oe_runmake failed
| ERROR: Function do_compile failed
NOTE: package libusb-compat-1_0.1.3-r0: task do_compile: Failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of 
/home/gigi/code/import/openembedded/recipes/libusb/libusb-compat_0.1.3.bb 
do_compile failed
ERROR: Task 1885 
(/home/gigi/code/import/openembedded/recipes/libusb/libusb-compat_0.1.3.bb, 
do_compile) failed with 256
Waiting for 1 active tasks to finish:
1: gettext-native-0.18-r3 do_configure (pid 2450)
ERROR: 
'/home/gigi/code/import/openembedded/recipes/libusb/libusb-compat_0.1.3.bb' 
failed
NOTE: package gettext-native-0.18-r3: task do_configure: Succeeded
ERROR: 
'/home/gigi/code/import/openembedded/recipes/libusb/libusb-compat_0.1.3.bb' 
failed
ERROR: 
'/home/gigi/code/import/openembedded/recipes/libusb/libusb-compat_0.1.3.bb' 
failed





Khem Raj wrote:
> I have posted a patch to address this issue please try that out
>
> On 10/22/10, Pierluigi Passaro <pierluigi.passaro@phoenixsoftware.it> wrote:
>   
>> Khem Raj wrote:
>>     
>>> On Thu, Oct 21, 2010 at 4:02 PM, Pierluigi Passaro
>>> <pierluigi.passaro@phoenixsoftware.it> wrote:
>>>
>>>       
>>>> Hi all,
>>>> LIBTOOL_HAS_SYSROOT feature has been recently enabled on Angstom 2010.x
>>>> distro.
>>>>
>>>> However, using CodeSourcery toolchain, this feature lead to use CSL
>>>> sysroot
>>>> as search path, that is generally different from
>>>> ${STAGING_DIR_TARGET}${libdir} folder used for packages.
>>>>
>>>>         
>>> hmmm yes I see the problem. Right now its left upto the compile to provide
>>> the sysroot which works well with internal toolchain but will not work
>>> with
>>> external toolchains or the compilers which dont support --print-sysroot
>>> option
>>>
>>> I will come up with a patch so specify the sysroot for libtool so that it
>>> does not rely upon the compiler to compute it.
>>>
>>>
>>>       
>> I'm not expert of libtool mechanisms but please let me know I can
>> provide any support.
>>     
>>>> At present I worked around the problem with the attached patch, but I was
>>>> wondering if this could be a misconfiguration or a bug.
>>>>
>>>> Any suggestion will be appreciated.
>>>>
>>>>
>>>>         
>>> With libtool 2.4 I dont see a reason to disable sysroot. The variable is
>>> only
>>> provided to keep libtool 2.2.6 functional as same time. So when using 2.4
>>> please
>>> do not disable the sysroot feature.
>>>
>>>
>>>       
>> I agree with you, I will just keep the patch for personal use, until
>> libtool will not rely on CSL compiler to compute sysroot.
>>     
>>>> Regards
>>>> Gigi
>>>>
>>>> --
>>>> Ing. Pierluigi Passaro
>>>> Viale Don Luigi Sturzo 34
>>>> 30174 Venezia Mestre
>>>> Cel: +39 348 355 4119
>>>> Tel: +39 041 862 3373
>>>> Fax: +39 041 862 3173
>>>> Web: www.phoenixsoftware.it
>>>> P.IVA 03884060272
>>>>
>>>>
>>>> _______________________________________________
>>>> Openembedded-devel mailing list
>>>> Openembedded-devel@lists.openembedded.org
>>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>>>         
>>> _______________________________________________
>>> Openembedded-devel mailing list
>>> Openembedded-devel@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>>       
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>     



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

end of thread, other threads:[~2010-10-29 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 23:02 external-toolchain-csl and libtool 2.4 Pierluigi Passaro
2010-10-22 20:49 ` Khem Raj
2010-10-22 21:31   ` Pierluigi Passaro
2010-10-23  5:04     ` Khem Raj
2010-10-29  9:29       ` Pierluigi Passaro

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.