Build Errors with new recipe for pjproject (autotools/pkgconfig)
I have been trying to formulate a new recipe for pjproject (pjsip) - there was one but it seems too old and isn't part of any layer now.
The library seems to require a fairly straightforward autotools/pkgconfig recipe but I get two errors, both of which I can see have come up before but haven't been answered satisfactorily.
The first is that the link stage fails with "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'".
I've found this answered as "tools being too old" but '-Wl,' is a gcc prefix to pass an option to the linker but the linker is being invoked directly and so this is really a configuration mismatch. I can fix this with "LD=$CXX" in do_configure_prepend() but I am puzzled as to why autotools would get confused this way in the first place? The second problem is possibly more recent: ERROR: pjproject-2.4.5-r0 do_populate_sysroot: QA Issue: libpjproject.pc failed sanity test (tmpdir) in path /home/chris/yocto/build/tmp/work/corei7-64-poky-linux/pjproject/2.4.5-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig]
I think this is benign other than leaking my dev environment but there was an oe gcc patch earlier this year that addressed this (http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116468.html).
Apparently there was QA change the broke a lot of recipes but it's not clear how to fix this recipe - from what I could tell the fix should have applied to all recipes. Adding '-gno-record-debug-prefix-map' should fix this but the compiler option is not recognised.
Any ideas on how to solve the QA error?
I am using the poky commit for 2.1_M4.rc1.
Thanks,Chris
Aside from the issues I mentioned previously, pjproject is detecting cross-compilation and this causes it to append '-x86_64-poky-linux-gnu' to all its library names.
This is then breaking autotools configuration in other recipes that are testing for the base name.
Is it common for a build process to differentiate cross compiled libraries like this? Is there a preferred way to deal with it?
I'm not confident about changing the pjproject build but I can link the base name to the extended name in do_install_append() so both names are present. pkgconfig picks up the extended names so these are also used in other recipes too (both forms of name in the same command line...). Regards,Chris
From: [email protected]
To: [email protected]
Date: Tue, 26 Apr 2016 10:15:34 +0100
Subject: [yocto] Build Errors with new recipe for pjproject (autotools/pkgconfig)
I have been trying to formulate a new recipe for pjproject (pjsip) - there was one but it seems too old and isn't part of any layer now.
The library seems to require a fairly straightforward autotools/pkgconfig recipe but I get two errors, both of which I can see have come up before but haven't been answered satisfactorily.
The first is that the link stage fails with "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'".
I've found this answered as "tools being too old" but '-Wl,' is a gcc prefix to pass an option to the linker but the linker is being invoked directly and so this is really a configuration mismatch. I can fix this with "LD=$CXX" in do_configure_prepend() but I am puzzled as to why autotools would get confused this way in the first place? The second problem is possibly more recent: ERROR: pjproject-2.4.5-r0 do_populate_sysroot: QA Issue: libpjproject.pc failed sanity test (tmpdir) in path /home/chris/yocto/build/tmp/work/corei7-64-poky-linux/pjproject/2.4.5-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig]
I think this is benign other than leaking my dev environment but there was an oe gcc patch earlier this year that addressed this (http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116468.html).
Apparently there was QA change the broke a lot of recipes but it's not clear how to fix this recipe - from what I could tell the fix should have applied to all recipes. Adding '-gno-record-debug-prefix-map' should fix this but the compiler option is not recognised.
Any ideas on how to solve the QA error?
I am using the poky commit for 2.1_M4.rc1.
Thanks,Chris
Signature · 4 lines
_______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
Quoted 10 lines · Chris Trobridge
Aside from the issues I mentioned previously, pjproject is detecting cross-compilation and this causes it to append '-x86_64-poky-linux-gnu' to all its library names.
This is then breaking autotools configuration in other recipes that are testing for the base name.
Is it common for a build process to differentiate cross compiled libraries like this? Is there a preferred way to deal with it?
No, that's rather unusual. Typically you'd just have a different libdir per architecture.
Ross
Thanks Ross,
I have added "EXTRA_OECONF += "--enable-shared", as asterisk needs shared libraries: these don't get the suffix and asterisk builds fine.
I am still getting a whole slew of host contamination warnings, eg "pjproject: /pjproject-staticdev/usr/lib/libpjsua-x86_64-poky-linux-gnu.a is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination". I can find some references to this happening in release tests but not how it was fixed. Can you shine any light on the "-fdebug-prefix-map" related fatal QA errors? (leaking host paths) I've found some discussion in openembedded that suggests this should be fixed in the compiler but again I am curious why this (very simple) recipe has this issue but others don't.
The only 'odd' thing I've need to do is add "do_configure_prepend() { LD=$CXX }
If I get these recipes (asterisk/pjproject) to an acceptable level I could propose them (back) into openembedded?
pjproject hasn't been touched for 6 years and has some custom steps I don't understand (https://github.com/openembedded/openembedded/tree/master/recipes/pjproject).
asterisk (https://github.com/openembedded/openembedded/tree/master/recipes/asterisk) is simarly out of date on openembedded, although there is also asterisk in meta-telephony (https://github.com/sysmocom/meta-telephony/tree/master/recipes-asterisk/asterisk) that is referenced.
'My' asterisk recipe is based on the one from meta-telephony so I should get in touch with the authors.
Regards,Chris
From: [email protected]
Date: Wed, 27 Apr 2016 08:41:14 +0100
Subject: Re: [yocto] Build Errors with new recipe for pjproject (autotools/pkgconfig)
To: [email protected]
CC: [email protected]
On 27 April 2016 at 07:27, Chris Trobridge <[email protected]> wrote:
Aside from the issues I mentioned previously, pjproject is detecting cross-compilation and this causes it to append '-x86_64-poky-linux-gnu' to all its library names. This is then breaking autotools configuration in other recipes that are testing for the base name.
Is it common for a build process to differentiate cross compiled libraries like this? Is there a preferred way to deal with it?
No, that's rather unusual. Typically you'd just have a different libdir per architecture.
Ross
Regarding:
"Can you shine any light on the "-fdebug-prefix-map" related fatal QA errors? (leaking host paths) I've found some discussion in openembedded that suggests this should be fixed in the compiler but again I am curious why this (very simple) recipe has this issue but others don't." So DEBUG_FLAGS was changed recently but setting back to "-g -feliminate-unused-debug-types" avoids this issue.
Regards,Chris
Quoted 5 lines · Chris Trobridge
pjproject hasn't been touched for 6 years and has some custom steps I don't understand (
https://github.com/openembedded/openembedded/tree/master/recipes/pjproject
).
Quoted 7 lines
asterisk (
https://github.com/openembedded/openembedded/tree/master/recipes/asterisk)
is simarly out of date on openembedded, although there is also asterisk in meta-telephony (
https://github.com/sysmocom/meta-telephony/tree/master/recipes-asterisk/asterisk)
that is referenced.
I'm about to go and have lunch but I'll quickly say that the OE tree you're linking to is unmaintained and has been for many years. The asterisk in meta-telephony is the one you should be looking at and ideally contributing too.
Ross