How to fix yocto package compilation issue Binutils 2.34 - yocto

I am building yocto for begalbone black in linux mint.
I have tried bitbake -c cleansstate binutils then bitbake binutils but didn't fix the issue.
[Text] (https://drive.google.com/file/d/1Ok6_AE_AY1j5wfasSBPA1nFj9ZZftSRx/view?usp=sharing)

I have include following flag in local.conf to protect from stack overflow and updated to latest dunfell branch.
TARGET_CPPFLAGS += "-fstack-protector -D_FORTIFY_SOURCE=1"

Related

Pulse Audio: Meson build failing

First step I cloned the pulseaudio source from git [ git clone https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git ]. Secondly went inside the pulseaudio directory and executed meson build command in order to move to the build directory as stated in README file. But i'm getting this error while excecuting this meson build command.
androidbuild#androidbuild-PC:~/pulse/pulseaudio$ (master) meson build
The Meson build system
Version: 0.45.1
Source dir: /home/androidbuild/pulse/pulseaudio
Build dir: /home/androidbuild/pulse/pulseaudio/build
Build type: native build
meson.build:345:61: ERROR: Expecting eol got eol_cont.
if cc.has_header_symbol('sys/syscall.h', 'SYS_memfd_create') \
^
A full log can be found at /home/androidbuild/pulse/pulseaudio/build/meson-logs/meson-log.txt
Likely Meson began silently supporting using \ escaped newlines sometime after meson 0.45.1 (the version you have installed). Looking at the gitlab, pulse audio requires meson >= 0.50 anyway, so this should have failed already. Since you have 0.45 I'm assuming your on an LTS of some kind (since 0.58 is the latest release), I think Ubuntu 20.04 had 0.45?.
This issue will likely be resolved by updating to a newer meson. You can use pip for this, pip install --user meson, or you can probably use a backport repo for your distro (Debian and Ubuntu both provide these in easy to use forms, but all LTS distros have them as some of the dependencies they need will rely on newer build tools)

Installing PJSIP python lib with YOCTO

I am trying to install PJSIP on Yocto but I have some problems...
This is my recipe.
And the problems I have are :
Sometimes Yocto seems to compile without taking note of my layer and sometimes yes... I do have added my layer in the bblayers file because sometimes the changes I do in my recipe are in my image but most of the time not...
For installing the python library of PJSIP we have to do make or
python setup.py install in the pjsip-apps/src/python/ folder.
Why this in the recip:
cd ${S}/pjsip-apps/src/python
oe_runmake
It's not working? (I say so because if I do python --> import pjsua
on the target it's not working) How can I install it without doing
it by hand after : cp -r ${S}/pjsip-apps/src/python/* ${D}/usr/pjsip-python --no-preserve=ownership in the recip ?
Thank you for your help !

Specify the gcc version for bitbake meta-toolchain

I'm just starting to learn Yocto 1.8.
The bitbake meta-toolchain ran fine as described in the documentation and generated the appropriate installation script. However, bitbake picked a version of GCC that I don't want.
What is the recommended way to tell bitbake which version of GCC to pick for the bitbake meta-toolchain build?
Just to keep the record complete.
The exact GCC version is specified in the machine/.conf file as:
# This version is Yocto-branch dependent
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "5.2%"

GLib compile error (ffi.h), but libffi is installed

After a succesful configure, make exits with snipped
gclosure.c:29:17: fatal error: ffi.h: No such file or directory
compilation terminated.
I have libffi installed, and locate ffi.h gives:
/home/luca/gcc4.6/gcc-4.6.0/libffi/include/ffi.h.in
/usr/include/x86_64-linux-gnu/ffi.h
/usr/share/doc/ghc-doc/html/users_guide/ffi.html
/usr/share/doc/libffi5/html/Using-libffi.html
If you have a Debian-based Linux OS with apt-get:
sudo apt-get install libffi-dev
With a Redhat-base OS:
yum install libffi-devel
With Alpine Linux:
apk add libffi-dev
When compling libffi 3.0.9 from source code, the include/Makefile.in installs the includes in the ${PREFIX}/lib/libffi-3.0.9/include directory. I'm sure there's a WONDERFUL reason for that, but I'm annoyed by it.
This line fixes it, when compiling libffi:
/bin/perl -pe 's#^includesdir = .*#includesdir = \#includedir\##' -i include/Makefile.in
The includes will now be installed in ${PREFIX}/include, which is /usr/local/include for me.
My full recipe is:
cd /var/tmp
rm -rf libffi-3.0.9
untgz /usr/local/src/utils/libffi-3.0.9.tar.gz
cd libffi-3.0.9
/bin/perl -pe 's#^AM_CFLAGS = .*#AM_CFLAGS = -g#' -i Makefile.in
/bin/perl -pe 's#^includesdir = .*#includesdir = \#includedir\##' -i include/Makefile.in
./configure --prefix=/usr/local \
--includedir=/usr/local/include
gmake
gmake install
Resolved by manually setting LIBFFI_CFLAGS for location of ffi.h in configure
Check your GCC version and note this entry in the Debian Bug Archive: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523869
It was the final solution to my particular issue (it looked exactly like what you report, but couldn't be solved with the solution above)... my problem had nothing to do with LIBFFI at all.
An old thread, but anyway...
After putting the required files in a location where they could be found, I got it working:
cp /usr/include/x86_64-linux-gnu/ffi* /usr/local/include/
cp /usr/lib/libffi.so /usr/local/lib/

Compiling MongoDB r2.0.2 on ubuntu 10.04 resulted in error

I am compiling MongoDB from source with instructions from http://www.mongodb.org/display/DOCS/Building+for+Linux
I ran into this error after ran "scons all":
rty/js-1.7/jsscan.c
third_party/js-1.7/jsscan.c:112:22: error: jsautokw.h: No such file or directory
third_party/js-1.7/jsscan.c: In function 'FindKeyword':
third_party/js-1.7/jsscan.c:122: warning: label 'test_guess' defined but not used
third_party/js-1.7/jsscan.c:119: warning: label 'got_match' defined but not used
scons: *** [third_party/js-1.7/jsscan.o] Error 1
scons: building terminated because of errors
I am on a 64 bit ubuntu 10.04. gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), scons version is:
script: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
engine: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
Does anyone have the same problem? There are similar errors reported for this jsscan file in earlier versions, but has been fixed since.
Dude it worked! Do this:
sudo apt-get remove xulrunner-1.9.2-dev xulrunner-1.9.2
curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
tar zxvf js-1.7.0.tar.gz
cd js/src
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
sudo JS_DIST=/usr make -f Makefile.ref export
Then run scons all again
There is no need to uninstall "xulrunner-1.9.2-dev" and "xulrunner-1.9.2" as it's also uninstalls other packages you may need later.
Just install the newer version of scons package (I used for it scons-2.1.0).
Download scons-2.1.0.tar.gz
Install it and use the installed one instead of the scons v1.2.0 repository package for Ubuntu 10.04.
It worked for me without any additional tricks.