PKG_CONFIG_PATH has not been set when trying to configure Qt for Arm - linux

I am using this to set the PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/usr/local/dbus/lib/pkgconfig
after this I am trying to run the configure of qt using the following command
./configure -prefix /home/navani/Qt-4.6.3/qt-everywhere-opensource-src-4.6.3 \
-opensource -embedded arm -platform qws/linux-x86-g++ -confirm-license -release \
-no-rpath -no-fast -no-accessibility -no-sql-ibase -no-sql-mysql -no-sql-odbc \
-no-sql-psql -no-sql-sqlite2 -no-qt3support -no-mmx -no-3dnow -no-sse -no-sse2 \
-no-neon -no-optimized-qmake -no-nis -no-cups -pch -reduce-relocations \
-force-pkg-config -prefix /usr -no-armfpa -make libs -nomake docs -iconv \
-largefile -embedded arm -qt-decoration-styled -depths all \
-xplatform qws/linux-mx35pdk-g++ -make examples -make demos \
-examplesdir /usr/bin/qt4-examples -qt-gfx-directfb -qt-gfx-linuxfb \
-qt-gfx-transformed -no-gfx-qvfb -qt-gfx-vnc -qt-gfx-multiscreen -qt-kbd-tty \
-qt-kbd-linuxinput -no-kbd-qvfb -qt-mouse-pc -qt-mouse-linuxinput \
-no-mouse-linuxtp -no-mouse-qvfb -qt-libpng -no-libmng -no-libtiff -no-gif \
-no-libjpeg -qt-zlib -qt-freetype -little-endian -stl -no-glib -no-openssl \
-no-dbus -no-opengl -shared -xmlpatterns -exceptions -no-multimedia \
-no-audio-backend -no-phonon -no-phonon-backend -no-webkit -no-scripttools \
-no-sql-sqlite -nomake tools -svg -script
But I am getting an error saying
PKG_CONFIG_PATH has not been set. This could mean the host compiler's
.pc files will be used. This is probably not what you want.
Am I doing something wrong?? What should I do?

Related

How to provide custom Module.symvers for new Linux kernels?

Suppose
You have a module with several public functions exported to the kernel space by EXPORT_SYMBOL
Your other module depends on the abovesaid symbols
Before you would have made a custom Module.symvers containing information about the exported symbols from your first module. It was loaded in the build process and the modpost script worked correctly.
Since 5.6.?? linux kernels this practice changed and it quietly ignores Module.symvers placed in the build directory.
What is the new way to do this thing? I checked that if I add the symbols from my parent module to the system Module.symvers file the dependent module builds, but this is not a long term solution.
P.S.: As for the difference: compare (Linux 5.4.**)
MODPOST = scripts/mod/modpost \
$(if $(CONFIG_MODVERSIONS),-m) \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
->here is it-> $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
$(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
$(if $(KBUILD_MODPOST_WARN),-w) \
$(if $(filter nsdeps,$(MAKECMDGOALS)),-d)
To Linux 5.6.**
MODPOST = scripts/mod/modpost \
$(if $(CONFIG_MODVERSIONS),-m) \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
$(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
$(if $(KBUILD_MODPOST_WARN),-w)

Cross compile on Alpine Linux targeting debian : undefined reference to `__res_init'

I am trying to setup CI in GitLab.
Building OS: Alpine Linux Container, actually it is Docker-In-Docker
image. (see Dockerfile below)
Targeting OS: x86_64-unknown-linux-gnu
Building Tool: cross https://github.com/rust-embedded/cross
Error: undefined reference to `__res_init'
Full log : https://github.com/rust-embedded/cross/files/4894721/build.log
Here is Dockerfile of Alpine running cross
FROM docker:stable-dind
RUN apk add --no-cache ca-certificates gcc mingw-w64-gcc libc-dev musl-dev
# Copied from https://github.com/rust-lang/docker-rust/blob/6314c6bc3d54d5b9284458c6a9061ef5766c9607/1.44.1/alpine3.12/Dockerfile
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.44.1
RUN set -eux; \
url="https://static.rust-lang.org/rustup/archive/1.21.1/x86_64-unknown-linux-musl/rustup-init"; \
wget "$url"; \
echo "0c86d467982bdf5c4b8d844bf8c3f7fc602cc4ac30b29262b8941d6d8b363d7e *rustup-init" | sha256sum -c -; \
chmod +x rustup-init; \
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \
rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup --version; \
cargo --version; \
rustc --version;
RUN cargo install cross
RUN rustup target add x86_64-pc-windows-gnu
RUN rustup target add x86_64-unknown-linux-gnu
ENV CROSS_DOCKER_IN_DOCKER=true
RUN mkdir ~/.cargo/ && \
printf "\n[target.x86_64-pc-windows-gnu]" >> ~/.cargo/config && \
printf "\nlinker = \"/usr/bin/x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config

When I build x264 with android-ndk it not done

When I build x264 with android-ndk it not done.
Unknown option file/x264/android/armeabi, ignored
Unknown option --target-os=android, ignored
Unknown option --enable-cross-compile, ignored
Unknown option --arch=arm, ignored
Unknown option --cpu=armv5te, ignored
Unknown option --enable-armv5te, ignored
Unknown option --disable-stripping, ignored
No working C compiler found.
Makefile:3: config.mak: No such file or directory
./configure
platform: X86_64
byte order: little-endian
system: LINUX
cli: yes
libx264: internal
shared: no
static: no
asm: yes
interlaced: yes
avs: avxsynth
lavf: no
ffms: no
mp4: no
gpl: yes
thread: posix
opencl: yes
filters: crop select_every
lto: no
debug: no
gprof: no
strip: no
PIC: no
bit depth: all
chroma format: all
My build file
#!/bin/bash
TOOLCHAIN=/home/s/my_toolchains/arm
CROSS_PREFIX=$TOOLCHAIN/bin/arm-linux-androideabi-
rm -f $(pwd)/compat/strtod.o
function build_one
{
./configure --prefix=$PREFIX --enable-static --enable-pic --target-os=android --enable-cross- compile --cross-prefix=$CROSS_PREFIX --extra-cflags="-Os -fpic $ADDI_CFLAGS" --extra-ldflags="$ADDI_LDFLAGS" --sysroot=$TOOLCHAIN/sysroot $ADDITIONAL_CONFIG_FLAG
make clean
make
make install
}
CPU=armeabi
mkdir -p $(pwd)/android/$CPU
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -march=armv5te -mtune=arm9tdmi -msoft-float"
ADDI_LDFLAGS=""
ADDITIONAL_CONFIG_FLAG="--arch=arm --cpu=armv5te --enable-armv5te --disable-asm --disable-stripping"
build_one
How can I solve this?
why this is not done? I made the build file properly but this is not done?
I use ubuntu os to build this file.
It comes Unknown option --target-os=android, ignored.
I assume you use a deprecated version of x264, because i succeed compiled the latest version form here https://www.videolan.org/developers/x264.html using the following scripts:
armeabi-v7a
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle # your android ndk folder
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang # c compiler path
export CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang++ # c++ compiler path
function build_armeabi-v7a
{
./configure \
--prefix=./android/armeabi-v7a \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=arm-linux \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_armeabi-v7a
echo build_armeabi-v7a finished
arm64-v8a
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/aarch64-linux-android21-clang++
function build_arm64-v8a
{
./configure \
--prefix=./android/arm64-v8a \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=aarch64-linux \
--cross-prefix=$TOOLCHAIN/bin/aarch64-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_arm64-v8a
echo build_arm64-v8a finished
x86
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/i686-linux-android18-clang
export CXX=$TOOLCHAIN/bin/i686-linux-android18-clang++
function build_x86
{
./configure \
--prefix=./android/x86 \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=i686-linux \
--cross-prefix=$TOOLCHAIN/bin/i686-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_x86
echo build_x86 finished
x86_64
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/x86_64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/x86_64-linux-android21-clang++
function build_x86_64
{
./configure \
--prefix=./android/x86_64 \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=x86_64-linux \
--cross-prefix=$TOOLCHAIN/bin/x86_64-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_x86_64
echo build_x86_64 finished
And don't forget to change export variables that i described in armeabi-v7a script.

Cross compiling and CMake?

I'm building an embedded Linux system for ARM, and one of the applications is using CMake:
cmake \
-D CMAKE_C_COMPILER=/opt/arm-toolchain/bin/arm-linux-gnueabihf-gcc \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SYSTEM_NAME=Linux \
-D CMAKE_INSTALL_PREFIX=/mnt/system_rootfs ../app_src_dir
If CMake is executed like this, it searches the whole file system for libraries, header files etc.
How can I restrict CMake to ONLY search /opt/arm-toolchain and /mnt/system_rootfs for header files, libraries and programs?
Build system is Debian Wheezy and CMake version is 2.8.9
You can use CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH environment variable for searching header files, libraries.
cmake \
-D CMAKE_C_COMPILER=/opt/arm-toolchain/bin/arm-linux-gnueabihf-gcc \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SYSTEM_NAME=Linux \
-D CMAKE_INSTALL_PREFIX=/mnt/system_rootfs ../app_src_dir
-D CMAKE_INCLUDE_PATH=/include/path
-D CMAKE_LIBRARY_PATH=/lib/path/

GVim is slow at startup

When I check vim startup with gvim --startuptime gvim.log I see:
15076.886 14652.943: starting GUI
This was built from ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 on Ubuntu 12.04.
Dependencies installed with apt-get build-dep vim-gnome.
./configure --with-features=huge \
--enable-gui=gnome2 \
--enable-multibyte \
--enable-xim \
--with-x \
--enable-rubyinterp=yes \
--with-ruby-command=/usr/bin/ruby \
--enable-perlinterp \
--enable-pythoninterp=yes \
--enable-python3interp=yes \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-fontset \
--enable-cscope \
--enable-gtk2-check \
--enable-gnome-check
make
make install
Though vim and gvim -u NONE starts fast. Please help me troubleshooting this issue.

Resources