Meson version in Yocto - linux

Earlier I compiled project i.MX Linux Yocto Project BSP 4.14.78_1.0.0 Release version and it was OK. I didn't update the project and all enviroment is installed on linux build computer. But now I have error like below.
Log data follows:
| DEBUG: Executing shell function do_configure
| The Meson build system
| Version: 0.44.1
| Source dir: /home/local/user/imx-yocto-bsp1/build-wayland-imx8qmmek/tmp/work/aarch64-poky-linux/vkmark/1.0-r0/git
| Build dir: /home/local/user/imx-yocto-bsp1/build-wayland-imx8qmmek/tmp/work/aarch64-poky-linux/vkmark/1.0-r0/build
| Build type: cross build
|
| Meson encountered an error in file meson.build, line 1, column 0:
| Meson version is 0.44.1 but project requires >=0.45.
|
Is it meson from toolchain or from build OS?

According to https://layers.openembedded.org/layerindex/recipe/72132/ you're most likely using the Sumo release of Yocto. Thud onwards have 0.45. Considering Sumo isn't supported anymore I'd considering upgrading your Yocto/BSP.

It's the toolchain meson: You don't mention the Yocto/oe-core version but based on the meson version it seems a couple of years old. If you managed to build a version of 'vkmark' before then it almost certainly means that the version you built did not require this meson version but the version you are building now does.

Related

maven and jdk8 on Alpine Linux image

This is my first time working with an Alpine linux image. Its part of a Jenkins build pipeline.
When I try to compile my maven build (which requires Java 1.8) ... it gives an error suggested there is no compiler installed.
However, I confirmed its installed ... multiple ways;
Echo the JAVA_HOME variable which returns
/usr/lib/jvm/java-1.8-openjdk
Tested to confirm the compiler is there;
by running "${JAVA_HOME}/javac -version" ... which returns;
/usr/lib/jvm/java-1.8-openjdk/bin/javac -version
javac 1.8.0_222
However, maven still points to the JRE ...
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z)
Maven home: /usr/share/java/maven-3
Java version: 1.8.0_222, vendor: IcedTea
Java home: /usr/lib/jvm/java-1.8-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.19.84-coreos", arch: "amd64", family: "unix"
I tried manually installed the JDK ... but doesn't seem to help;
apk update
apk add openjdk8
apk add maven
Any suggestions? I need Java 8 to compile this app ... and currently every attempt to do a "mvn clean install" results in a failure, as below;
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
Tried many different ideas and then eventually thought about setting the path to the compiler and amazingly, now it works!
export PATH=${PATH}:${JAVA_HOME}/bin
mvn clean install

How to Build Skia in Mac OS

I'm beginner to Skia. So Just tried to build Skia in my machine ( macOS High Sierra 10.13.6 ).
I just followed the instructions Build.
Downloaded depot_tools
Downloaded Skia from git
bin/gn gen out/Static --args='is_official_build=false'
python2 tools/git-sync-deps
ninja -C out/Static
i did these instructions. But my xcode (version 9.2) doesnt support -std=c++17 so i replaced with -std=c++1z in all places.
But it throws error
Error
Please help to build skia for mac, and how to xcode project from this?
Skia makes use of C++17 language features (compiles with -std=c++17 flag) and thus requires a C++17 compatible compiler.
You'd better to update your xcode version.
Mac users may want to pass --ide=xcode to bin/gn gen to generate an Xcode project
You can check this.How to build skia

Cross-compile C++ project for ARM64 with bazel

I'm trying to cross-compile hello-world C++ project with bezel for ARM64 device. I work with Linux/Ubuntu x86_64 as a built-host-PC. I'm following the Building a C++ Project.
I can build the project for host-PC.
bazel build //main:hello-world
Now I'm trying to cross-compile this project for ARM64 device as
bazel build --cpu=aarch64 //main:hello-world
I used different configuration for --cpu=arm64, --cpu=aarch64, --cpu=arm64-v8a and it does not wrok.
I'd model the environment as a platform to automatically select the appropriate toolchain installed via "crossbuild-essential-arm64" package for build action.
The cross-compilation build is done on PC-host - host platform - and executed there - execution platform - so the platforms are the same, but the - target platform - is different where the hello-world C++ project will run.
How to cross-compile the C++ project for arm64 target with bazel using --platforms properly?

cross-compiling x264 for ARM

I'm novice in cross-compiling and just started to cross-compile packages on my linux machine (amd64) for host (NAS) with ARMv5 (linux kernel 2.6.31.8). I installed crosstool-ng and with it created toolchain for compilation for ARM. According to some tutorials online I succeeded to compile x264 package. But now when I try to run it, I was given the following error message
./x264: /lib/libm.so.6: version 'GLIBC_2.15' not found (required by ./x264)
Ok now I see that I need libm library but what it is and how to compile x264 with it?
From the error message: the version of x264 you built requires version of glibc 2.15. The Glibc is built as part of your cross compilation toolchain (through crosstool-ng).
You need to build a new toolchain with the same version of glibc found on your NAS root filesystem (or compatible).
(edited after #NotLikeThat comment)

Optimal way to install clang locally when GCC is outdated

I need to use tools that depend on clang on a Unix machine I remote onto at work. Anything I install is locally installed onto ~/local. I do not have root permissions.
/usr is pretty outdated, with gcc being at version 4.4.7. clang requires gcc 4.7+
I read on linux from scratch that a gcc 6.1 installation requires 8.4 gb. This is not something I can do, because that's huge.
Can someone advise me on the best workaround to install up to date clang on my ~/local?
Please and thanks.
Edit:
Courtesy of Nishant, here is the short answer:
Set up a personal machine running the same linux distro and cross compile using gcc to your specific architecture. For me, I will run a Redhat 6.5 VM and compile using gcc an arm x64 binary. Thanks Nishant!
You can get pre-build binaries for Unix system from LLVM's release website: http://llvm.org/releases/
You can then put the binaries in any local folder you want and source it using the PATH variable, which can be done by modifying your ~/.bashrc file by appending:
export PATH=$PATH:<clang-binary-directory>
Now you will able to use clang from the command line terminal as if it was installed.
If you want to build from source only, you can get older source code of clang which will use gcc 4.4.7 and build it and then use clang to build clang. Or get the latest clang binary and use it to build latest clang.

Resources