It seems there is some problem to get compiled fortran for Yocto,
I configured my local.conf:
FORTRAN_forcevariable = ",fortran"
RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath libgfortran"
IMAGE_INSTALL_append = " gfortran gfortran-symlinks libgfortran libgfortran-dev"
And during compilation I got errors:
| make: *** [all] Error 2
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /tmp/work/cortexa9hf-neon-poky-linux-gnueabi/gcc-runtime/6.2.0-r0/temp/log.do_compile.24985)
ERROR: Task (/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3636 tasks of which 3570 didn't need to be rerun and 1 failed.
Any idea how to fix it?
I got a similar error in rocko. In my case I needed fortran compiler on an imx6 target, so I found this patch for libgfortran.inc, though in my case I override the functions do_configure and do_compile through a libgfortran_7.3.bbappend recipe.
My configuration added in local.conf:
# Enable fortran
IMAGE_FEATURES += "tools-sdk"
FORTRAN_forcevariable = ",fortran"
Configuration added to my image recipe:
FORTRAN_TOOLS = " \
gfortran \
gfortran-symlinks \
libgfortran \
libgfortran-dev \
"
IMAGE_INSTALL += "${FORTRAN_TOOLS}"
After building the image and booting the target, I successfully compiled Fortran code in my target imx6 board.
Related
While compiling the minimal.cpp example of TensorFlow Lite with cmake on Yocto platform, we are having error as follows:
Log data follows:
| DEBUG: Executing shell function do_install
| NOTE: make -j 4 DESTDIR=/home/student/fsl-release-bsp/build-analytics-tflite/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/minimal/1.0-r0/image install
| ERROR: oe_runmake failed
| make: *** No rule to make target 'install'. Stop.
| ERROR: Function failed: do_install (log file is located at /home/student/fsl-release-bsp/build-analytics-tflite/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/minimal/1.0-r0/temp/log.do_install.2654)
ERROR: Task (/home/student/fsl-release-bsp/sources/meta-analytics-tflite/recipes-hello/patch/minimal.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1787 tasks of which 1786 didn't need to be rerun and 1 failed.
On the install line of our CMakeLists.txt file the idea is not clear in our mind about "TARGETS". If you brighten up our mind it would be perfect.
The CMakeLists.txt file is as follows:
cmake_minimum_required(VERSION 3.6)
project(patch)
add_executable(minimal minimal.cc)
target_include_directories(minimal PUBLIC /home/student/fsl-release-bsp/build-analytics-tflite/tmp/sysroots/analytics/usr/include/tensorflow/contrib/lite/tools/make/downloads/flatbuffers/include)
target_link_libraries(minimal tensorflow-lite pthread ${CMAKE_DL_LIBS})
install(TARGETS patch DESTINATION git)
Your guidance and clarifications are important for us.
Thank you in advance !
I am trying to build Debian package evince, on Debian Buster, using the Debian build process:
apt-get source evince
and then
cd evince-3.30.2/
dpkg-buildpackage --build=binary --no-sign
The build process is successful when I build the package with dbus (default setting).
When I change the configuration and add --disable-dbus, the build process fails with following error:
ev-application.c: In function ‘ev_application_new’:
ev-application.c:106:42: error: ‘APPLICATION_NAME’ undeclared (first use in this function); did you mean ‘G_APPLICATION_CLASS’?
"application-id", APPLICATION_NAME,
^~~~~~~~~~~~~~~~
G_APPLICATION_CLASS
ev-application.c:106:42: note: each undeclared identifier is reported only once for each function it appears in
ev-application.c:109:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
Bellow is snippet from the debian/rules file that works:
override_dh_auto_configure:
dh_auto_configure -- \
--libexecdir=/usr/lib/evince \
--enable-djvu \
--enable-dvi \
--enable-ps \
--enable-introspection \
--enable-gtk-doc \
--disable-libgnome-desktop \
--disable-multimedia \
--disable-nautilus \
--disable-browser-plugin \
--without-keyring
and here is the the one that does not (the only change is added --disable-dbus):
override_dh_auto_configure:
dh_auto_configure -- \
--libexecdir=/usr/lib/evince \
--enable-djvu \
--enable-dvi \
--enable-ps \
--enable-introspection \
--enable-gtk-doc \
--disable-dbus \
--disable-libgnome-desktop \
--disable-multimedia \
--disable-nautilus \
--disable-browser-plugin \
--without-keyring
What does the error mean, and how can I fix it ?
UPDATE 2021-09-01
I have fixed the APPLICATION_NAME as suggested by #cody.
I have also removed one-line reference to dbus in debian/evince.install
But building with --disable-dbus now ends with another error:
/usr/bin/ld: .libs/evince-scan.o: in function `get_object_types':
./help/reference/shell/evince-scan.c:43: undefined reference to `ev_media_player_keys_get_type'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:867: scan-build.stamp] Error 1
make[4]: *** [Makefile:506: all-recursive] Error 1
make[3]: *** [Makefile:591: all-recursive] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:730: all-recursive] Error 1
make[1]: *** [Makefile:595: all] Error 2
dh_auto_build: make -j4 returned exit code 2
make: *** [debian/rules:11: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
It looks like this is a bug in that version of the evince source code. If you look at the most recent version of ev-application.c, you will note that APPLICATION_NAME is defined outside of the adjacent #ifdef ENABLE_DBUS:
#define APPLICATION_NAME "org.gnome.Evince"
#ifdef ENABLE_DBUS
#define APPLICATION_DBUS_OBJECT_PATH "/org/gnome/evince/Evince"
#define APPLICATION_DBUS_INTERFACE "org.gnome.evince.Application"
...
#endif
But if you then look at the version in Debian Buster, you will note that it is defined INSIDE that #ifdef:
#ifdef ENABLE_DBUS
#define APPLICATION_NAME "org.gnome.Evince"
#define APPLICATION_DBUS_OBJECT_PATH "/org/gnome/evince/Evince"
#define APPLICATION_DBUS_INTERFACE "org.gnome.evince.Application"
...
#endif
So in the Debian version, if dbus is disabled, APPLICATION_NAME will not be defined. I believe all you would need to do is alter ev-application.c to move that definition of APPLICATION_NAME outside of the #ifdef ENABLE_DBUS, and it should compile.
This appears to have been fixed in the Debian repo as well.
In addition to moving the APPLICATION_NAME definition, a few more changes are required to build the package with --disable-dbus:
in help/reference/shell/evince.types, the ev_media_player_keys_get_type line needs to be removed;
in debian/evince.install, the components which aren’t built when D-Bus support is disabled need to be removed:
usr/lib/evince/evinced
usr/lib/systemd/user/
usr/share/dbus-1
I’ve encapsulated the complete set of changes in evince-3.30.2-3+deb10u1+400cat1-nmu.diff; to build the package:
apt source evince/buster
cd evince-3.30.2
patch -p1 < /path/to/evince-3.30.2-3+deb10u1+400cat1-nmu.diff
dpkg-buildpackage -us -uc
(installing the required build-dependencies as necessary). The last step can be replaced with pdebuild or any other build tool you have set up.
How to cross compile pyinstaller-3.5 boot loader for arm soft float 32bit.
I tried to cross compile it:
getting error dl not found.
python2.7 ./waf CC=arm-linux-gnueabi-gcc all
'all' finished successfully (0.000s)
'distclean' finished successfully (0.000s)
Setting top to : /home/arjuncr/Downloads/PyInstaller-3.5/bootloader
Setting out to : /home/arjuncr/Downloads/PyInstaller-3.5/bootloader/build
Python Version : 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 7.4.0]
Checking for 'gcc' (C compiler) : arm-linux-gnueabi-gcc
Checking size of pointer : 4
Platform : Linux-32bit detected based on compiler
Checking for flags -m32 : yes
Checking for program 'arm-linux-gnueabi-strip' : /usr/bin/arm-linux-gnueabi-strip
Checking for program 'strip' : /usr/bin/arm-linux-gnueabi-strip
Checking for library dl : not found
The configuration failed
(complete log in /home/arjuncr/Downloads/PyInstaller-3.5/bootloader/build/config.log)
log:
[1/2] Compiling build/.conf_check_c80cac29ed913c100609f182ebb9efef/test.c
['arm-linux-gnueabi-gcc', '-m32', '-O2', '-Wdeclaration-after-statement', '-Wimplicit-function-declaration', '-Werror', '-U_FORTIFY_SOURCE', '-D_REENTRANT', '-D_BSD_SOURCE', '-D_DEFAULT_SOURCE', '-D_FORTIFY_SOURCE=2', '../test.c', '-c', '-o/home/arjuncr/Downloads/PyInstaller-3.5/bootloader/build/.conf_check_c80cac29ed913c100609f182ebb9efef/testbuild/test.c.1.o']
err: arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-m32’
from /home/arjuncr/Downloads/PyInstaller-3.5/bootloader: Test does not build: Traceback (most recent call last):
File "/home/arjuncr/Downloads/PyInstaller-3.5/bootloader/.waf-2.0.9-6b5f17f340ec613b295ffa3dedcecc80/waflib/Configure.py", line 324, in run_build
bld.compile()
File "/home/arjuncr/Downloads/PyInstaller-3.5/bootloader/.waf-2.0.9-6b5f17f340ec613b295ffa3dedcecc80/waflib/Build.py", line 176, in compile
raise Errors.BuildError(self.producer.error)
BuildError: Build failed
-> task in 'testprog' failed with exit status 1 (run with -v to display more information)
not found
from /home/arjuncr/Downloads/PyInstaller-3.5/bootloader: The configuration failed
Also I used crosss compiled version of python 2.7.17
./configure --enable-shared \
--with-system-expat \
--with-ensurepip=yes \
--enable-unicode=ucs4 \
--build=x86_64-pc-linux-gnu\
--host=i686-pc-linux-gnu \
--enable-ipv6 \
ac_cv_file__dev_ptmx=no \
ac_cv_file__dev_ptc=no &&
make
Used cross compiled version of zlib
CC=arm-linux-gnueabi-gcc ./configure && make
and copied the lib to /usr/lib/gcc-cross/arm-linux-gnueabi/7/../../../../arm-linux-gnueabi/lib/
Editing the wsscript
<pre>
--- wscript 2019-07-10 00:44:04.000000000 +0530
+++ ../../../PyInstaller-3.5/bootloader/wscript 2020-01-04 23:05:17.877519450 +0530
## -366,9 +366,9 ##
# on 32-bit arm Linux. So skip the -m32 flag.
pass
else:
- ctx.check_cc(ccflags='-m32', msg='Checking for flags -m32')
- ctx.env.append_value('CFLAGS', '-m32')
- ctx.env.append_value('LINKFLAGS', '-m32')
+ ctx.check_cc(ccflags='', msg='Checking for flags -m32')
+ ctx.env.append_value('CFLAGS', '')
+ ctx.env.append_value('LINKFLAGS', '')
# Set LARGE_ADDRESS_AWARE_FLAG to True.
# On Windows this allows 32bit apps to use 4GB of memory and
# not only 2GB.
</pre>
I tried to install lammps on my department machine with a newer version of 11Aug17. However, mpicxx gives error to the following lines:
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/home/shixx597/codes/kim-api-v1.7.3/lib/kim-api-v1/include -c ../pair_list.cpp
../pair_list.cpp(88): error: expected a ";"
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
^
../pair_list.cpp(89): error: "restrict" has already been declared in the current scope
dbl3_t * _noalias const f = (dbl3_t *) atom->f[0];
^
../pair_list.cpp(89): error: expected a ";"
dbl3_t * _noalias const f = (dbl3_t *) atom->f[0];
^
../pair_list.cpp(114): error: identifier "x" is undefined
const double dx = x[i].x - x[j].x;
^
../pair_list.cpp(160): error: identifier "f" is undefined
f[i].x += dx*fpair;
^
../pair_list.cpp(166): error: identifier "f" is undefined
f[j].x -= dx*fpair;
^
compilation aborted for ../pair_list.cpp (code 2)
make[1]: *** [pair_list.o] Error 2
make[1]: Leaving directory `/home/shixx597/codes/lammps-11Aug17/src/Obj_mpi'
make: *** [mpi] Error 2
My colleagues told me that it is the problem of openmpi. So I tried to install a new openmpi for me. However, I get the following error told me that automake is not installed like this:
cd . && /bin/sh /home/shixx597/codes/openmpi-3.0.0/config/missing automake-1.15 --foreign
/home/shixx597/codes/openmpi-3.0.0/config/missing: line 81: automake-1.15: command not found
WARNING: 'automake-1.15' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [Makefile.in] Error 1
When I tried to install automake-1.15, I get the following error:
CDPATH="${ZSH_VERSION+.}:" && cd . && "/home/shixx597/codes/automake-1.15/t/wrap/aclocal-1.15"
Can't locate /home/shixx597/codes/automake-1.15/bin/aclocal in #INC (#INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /home/shixx597/codes/automake-1.15/t/wrap/aclocal-1.15 line 29.
make: *** [aclocal.m4] Error 2
I do not have any sudo privilege to do anything on this weird department machine.
Even I tried to finish installing lammps on the departmental machine, I am wondering if I could finish the run of a large bonded force field model.
Actually, this a fairly well-known issue, and there are three solutions.
Use GCC rather than an Intel compiler (possibly not desirable).
Use the -restrict flag while compiling (I'm assuming by appending it when running make, like make CXX_FLAGS=-restrict
Just remove those two files from the build.
If you really want to try, you could also try to remove the _noalias keyword using sed or awk from the two offending files: pair_list.h and pair_list.cpp, or just define _noalias to be an empty keyword, as suggested by jww in the comments.
So I have an AWS instance (the free tier one) running with Ubuntu 16.04. There I have installed nacl_sdk (which is working and has allowed me to access their sample sites with success) and naclports which I used to port opencv with which I had trouble with at first due to errors with zlib but got it working after I added i386 architecture and did sudo apt-get update on the system and installed necessary i386 programs.
Note I have depot_tools installed as well.
Now I am trying to install the eigen3 library for pnacl as well but I am getting an error and I am not sure how to understand it nor how exactly it gets built to fix it.
The command that I ported opencv with was
$ NACL_ARCH=pnacl make opencv
And I tried these two commands for building eigen3 with the same results (shown below)
$ NACL_ARCH=pnacl make eigen3
$ bin/webports install eigen3
This is the very end of terminal output (the entire message is very long):
######################################################################
Building eigen3
######################################################################
chdir /home/ubuntu/Work/ExternCode/naclports/src/out/build/eigen3/build_pnacl
make -j1 basicstuff cholesky determinant geo_transformations inverse
Scanning dependencies of target basicstuff
Building CXX object test/CMakeFiles/basicstuff.dir/basicstuff.cpp.o
Linking CXX executable basicstuff
Built target basicstuff
Scanning dependencies of target cholesky
[100%] Building CXX object test/CMakeFiles/cholesky.dir/cholesky.cpp.o
clang: error: unable to execute command: Killed
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.7.0 (https://chromium.googlesource.com/a/native_client/pnacl-clang.git cf0dc7f6e6123dfa9b8834b56743315300b34e6c) (https://chromium.googlesource.com/a/native_client/pnacl-llvm.git baa63524b6b493ec2a6aa2c5193d9f25c0c33191)
Target: le32-unknown-nacl
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
test/CMakeFiles/cholesky.dir/build.make:62: recipe for target 'test/CMakeFiles/cholesky.dir/cholesky.cpp.o' failed
make[3]: *** [test/CMakeFiles/cholesky.dir/cholesky.cpp.o] Error 254
CMakeFiles/Makefile2:14386: recipe for target 'test/CMakeFiles/cholesky.dir/all' failed
make[2]: *** [test/CMakeFiles/cholesky.dir/all] Error 2
CMakeFiles/Makefile2:14393: recipe for target 'test/CMakeFiles/cholesky.dir/rule' failed
make[1]: *** [test/CMakeFiles/cholesky.dir/rule] Error 2
Makefile:5128: recipe for target 'cholesky' failed
make: *** [cholesky] Error 2
webports: Build failed: 'eigen3' [pnacl/release]
clang: error: unable to execute command: Killed
It looks like your AWS instance killed clang, so perhaps it ran out of memory. The free tier gives 1 MiB of RAM and that might not be enough for what you're trying to do.