Patchwork SV: C++ library when building SDK

login
register
mail settings
Submitter Christian Rasmussen
Date Jan. 31, 2013, 12:49 p.m.
Message ID <1AF0AD83BEC32F489C74B5B223C246C2257AD9A7@VMPREVAS1.prevas.se>
Download mbox | patch
Permalink /patch/217185/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

Christian Rasmussen - Jan. 31, 2013, 12:49 p.m.
The following changes to meta/core seems to fix the issue:
Esben Haabendal - Jan. 31, 2013, 5:16 p.m.
Christian Rasmussen <Christian.Rasmussen@prevas.dk> writes:


> When I build base-sdk for x86 from the oe-lite.org repositories, I get
> an sdk containing the g++ compiler and libstdc++, but the c++ header
> files are not included (specifically iostream).
>
> Is there an option to enable, or is this a problem in the recipes?

I experienced the same problem yesterday when trying to use a custom sdk
for building a Qt application.

> The following changes to meta/core seems to fix the issue:
>
> diff --git a/classes/sdk-image.oeclass b/classes/sdk-image.oeclass                                                                                  
> index 9925671..4ddec95 100644
> --- a/classes/sdk-image.oeclass
> +++ b/classes/sdk-image.oeclass
> @@ -54,7 +54,7 @@ CLASS_FLAGS += "sdk_cxx"
>  DEFAULT_USE_sdk_cxx = "1"
>  RDEPENDS_SDK += "${RDEPENDS_SDK_CXX}"
>  RDEPENDS_SDK_CXX = ""
> -RDEPENDS_SDK_CXX:USE_sdk_cxx = "gcc-g++ target:libstdc++"
> +RDEPENDS_SDK_CXX:USE_sdk_cxx = "gcc-g++ target:libstdc++-dev"
>  
>  CLASS_FLAGS += "sdk_gdb"
>  DEFAULT_USE_sdk_gdb = "1"

I guess this should rather be

RDEPENDS_SDK_CXX:USE_sdk_cxx = "gcc-g++ target:libstdc++-dev target:libstdc++"

Can you retest with that?


/Esben
Esben Haabendal - Feb. 27, 2013, 3:06 p.m.
Christian Rasmussen <Christian.Rasmussen@prevas.dk> writes:

> The following changes to meta/core seems to fix the issue:
>
> diff --git a/classes/sdk-image.oeclass b/classes/sdk-image.oeclass                                                                                  
> index 9925671..4ddec95 100644
> --- a/classes/sdk-image.oeclass
> +++ b/classes/sdk-image.oeclass
> @@ -54,7 +54,7 @@ CLASS_FLAGS += "sdk_cxx"
>  DEFAULT_USE_sdk_cxx = "1"
>  RDEPENDS_SDK += "${RDEPENDS_SDK_CXX}"
>  RDEPENDS_SDK_CXX = ""
> -RDEPENDS_SDK_CXX:USE_sdk_cxx = "gcc-g++ target:libstdc++"
> +RDEPENDS_SDK_CXX:USE_sdk_cxx = "gcc-g++ target:libstdc++-dev"
>  
>  CLASS_FLAGS += "sdk_gdb"
>  DEFAULT_USE_sdk_gdb = "1"
> diff --git a/recipes/crosstool-ng/gcc-package.inc b/recipes/crosstool-ng/gcc-package.inc
> index e3e40d8..7cc6599 100644
> --- a/recipes/crosstool-ng/gcc-package.inc
> +++ b/recipes/crosstool-ng/gcc-package.inc
> @@ -42,6 +42,7 @@ DEPENDS_${PN}-sysroot-librt-dev               = "${PN}-sysroot-libpthread-dev"
>  DEPENDS_${PN}-sysroot-librt            = "${PN}-sysroot-libpthread"
>  RDEPENDS_${PN}-sysroot-librt           = "${PN}-sysroot-libpthread"
>  DEPENDS_${PN}-sysroot-libstdc++-dev    = "${PN}-sysroot-libgcc-dev ${PN}-sysroot-libm-dev"
> +RDEPENDS_${PN}-sysroot-libstdc++-dev   = "${PN}-sysroot-libgcc-dev ${PN}-sysroot-libm-dev ${PN}-sysroot-c++-dev"
>  DEPENDS_${PN}-sysroot-libstdc++                = "${PN}-sysroot-libgcc ${PN}-sysroot-libm ${PN}-sysroot-c++-dev"
>  RDEPENDS_${PN}-sysroot-libstdc++       = "${PN}-sysroot-libgcc ${PN}-sysroot-libm"
>  RDEPENDS_${PN}-sysroot-libdl           += "${PN}-sysroot-libc"

Merged as two separate commits, thanks.

/Esben

Patch

diff --git a/classes/sdk-image.oeclass b/classes/sdk-image.oeclass                                                                                  
index 9925671..4ddec95 100644
--- a/classes/sdk-image.oeclass
+++ b/classes/sdk-image.oeclass
@@ -54,7 +54,7 @@  CLASS_FLAGS += "sdk_cxx"
 DEFAULT_USE_sdk_cxx = "1"
 RDEPENDS_SDK += "${RDEPENDS_SDK_CXX}"
 RDEPENDS_SDK_CXX = ""
-RDEPENDS_SDK_CXX:USE_sdk_cxx = "gcc-g++ target:libstdc++"
+RDEPENDS_SDK_CXX:USE_sdk_cxx = "gcc-g++ target:libstdc++-dev"
 
 CLASS_FLAGS += "sdk_gdb"
 DEFAULT_USE_sdk_gdb = "1"
diff --git a/recipes/crosstool-ng/gcc-package.inc b/recipes/crosstool-ng/gcc-package.inc
index e3e40d8..7cc6599 100644
--- a/recipes/crosstool-ng/gcc-package.inc
+++ b/recipes/crosstool-ng/gcc-package.inc
@@ -42,6 +42,7 @@  DEPENDS_${PN}-sysroot-librt-dev               = "${PN}-sysroot-libpthread-dev"
 DEPENDS_${PN}-sysroot-librt            = "${PN}-sysroot-libpthread"
 RDEPENDS_${PN}-sysroot-librt           = "${PN}-sysroot-libpthread"
 DEPENDS_${PN}-sysroot-libstdc++-dev    = "${PN}-sysroot-libgcc-dev ${PN}-sysroot-libm-dev"
+RDEPENDS_${PN}-sysroot-libstdc++-dev   = "${PN}-sysroot-libgcc-dev ${PN}-sysroot-libm-dev ${PN}-sysroot-c++-dev"
 DEPENDS_${PN}-sysroot-libstdc++                = "${PN}-sysroot-libgcc ${PN}-sysroot-libm ${PN}-sysroot-c++-dev"
 RDEPENDS_${PN}-sysroot-libstdc++       = "${PN}-sysroot-libgcc ${PN}-sysroot-libm"
 RDEPENDS_${PN}-sysroot-libdl           += "${PN}-sysroot-libc"