Skip to contentSkip to conversation

fix source-highlight and xcb-proto

PATCH In review Robert Yang 2 participants 6 messages Sep 29, 2016

lore
Share & tools
lore
#0 lore raw

cover fix source-highlight and xcb-proto

The following changes since commit cdaafc3729700778d95afc2413553d7b41c1317b:

oeqa/sstatetests: Ensure we cover deb packaging backend for sstate test (2016-09-28 10:15:55 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/2fixes
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/2fixes

Robert Yang (2):
xcb-proto: create blank .pyc files in xcbgen dir
source-highlight: use with-boost-libdir

 meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb              | 6 ++++++
 meta/recipes-support/source-highlight/source-highlight_3.1.8.bb | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.9.0
#1 lore raw

PATCH 1/2 xcb-proto: create blank .pyc files in xcbgen dir

The .pyc files will be generated when "bitbake libxcb", but they can't be removed when "bitabke xcb-proto -ccleansstate" since they are not tracked by manifest, create blank .pyc files can fix the problem.

When switch
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake world

The libdir is /usr/lib64 in this build

The
MACHINE = "qemux86-64"

$ bitbake world
Now libdir is /usr/lib, the previous /usr/lib64 can be removed totally
after this patch.
---
 meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb +6 -0
index 8bdca32..d33910b 100644
@@ -28,3 +28,9 @@ RDEPENDS_${PN}-dev = ""
 RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
 BBCLASSEXTEND = "native nativesdk"
+
+do_install_append() {
+    # Create blank .pyc files, so that they will be recorded in
+    # manifest, and can be cleaned correctly.
+    find ${D}${libdir}/xcb-proto/xcbgen -type f -maxdepth 1 -name '*.py' -exec touch {}c \;
+}
Signature · 1 line
2.9.0
#2 lore raw

Re: [PATCH 1/2] xcb-proto: create blank .pyc files in xcbgen dir

meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb RDEPENDS_${PN}-dev = "" · line 36

Quoted 7 lines · Robert Yang
meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb +5 -1
+do_install_append() {
+    # Create blank .pyc files, so that they will be recorded in
+    # manifest, and can be cleaned correctly.
+    find ${D}${libdir}/xcb-proto/xcbgen -type f -maxdepth 1 -name '*.py'
-exec touch {}c \;
+}

Why not compile them in do_install so the compiled form is in the sstate?

Ross

#3 lore raw

PATCH 2/2 source-highlight: use with-boost-libdir

In reply to Robert Yang

Without with-boost-libdir, it checks lib64 libx32 lib lib64 in sysroot/usr/ and set it as boost lib path if it exist, this is unreliable when build with multilib.

Fixed when switch baselib from lib64 to lib, for example, when we build qemux86-64 + multilib setting, the baselib is lib64, and when disable multilib, it would be lib, then we may see the error when do_configure since lib64 may exist during build source-highlight:

configure: error: Could not find a version of the Boost::Regex library!

Steps to reproduce:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake world

Then:
MACHINE = "qemux86-64"

$ bitbake source-highlight
---
 meta/recipes-support/source-highlight/source-highlight_3.1.8.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/source-highlight/source-highlight_3.1.8.bb +1 -1
index 37d2fa9..c6203df 100644
@@ -15,7 +15,7 @@ DEPENDS_append = " boost"
 
 DEPENDS_append_class-target = " source-highlight-native"
 
-EXTRA_OECONF = "--with-boost=${PKG_CONFIG_SYSROOT_DIR}/${prefix}"
+EXTRA_OECONF = "--with-boost=yes --with-boost-libdir=${PKG_CONFIG_SYSROOT_DIR}${libdir}"
 
 BBCLASSEXTEND = "native"
 
Signature · 1 line
2.9.0
#4 lore raw

Re: [PATCH 2/2] source-highlight: use with-boost-libdir

Quoted 4 lines · Robert Yang
(quoted diff) +1 -1
-EXTRA_OECONF = "--with-boost=${PKG_CONFIG_SYSROOT_DIR}/${prefix}"
+EXTRA_OECONF = "--with-boost=yes --with-boost-libdir=${PKG_

CONFIG_SYSROOT_DIR}${libdir}"

PKG_CONFIG_SYSROOT_DIR is the wrong variable to use here as that's explicitly for pkg-config to know what the current sysroot is. Use STAGING_DIR_TARGET explicitly.

Ross

#5 lore raw

Re: [PATCH 2/2] source-highlight: use with-boost-libdir

Quoted 4 lines · Ross

On 29 September 2016 at 10:02, Robert Yang <[email protected] <mailto:[email protected]>> wrote:

Quoted 8 lines
    -EXTRA_OECONF = "--with-boost=${PKG_CONFIG_SYSROOT_DIR}/${prefix}"
    +EXTRA_OECONF = "--with-boost=yes
    --with-boost-libdir=${PKG_CONFIG_SYSROOT_DIR}${libdir}"

PKG_CONFIG_SYSROOT_DIR is the wrong variable to use here as that's explicitly for pkg-config to know what the current sysroot is. Use STAGING_DIR_TARGET explicitly.

I derived it from the old code, thanks, will update xcb-proto, too.

Quoted 2 lines

Ross