Error and Build Failed while setting up mediapipe on Raspberry Pi 4 (Raspbian OS 64 bit) - raspberry-pi

I am new to both Raspberry Pi and Mediapipe. I was following these steps: https://spyjetson.blogspot.com/2021/06/installing-mediapipecpu-mode-on.html
But on this step: root#raspberrypi:/usr/local/src/mediapipe# python3 setup.py bdist_wheel
I am getting error and build failed
Error is this:
ERROR: /usr/local/src/mediapipe/mediapipe/framework/stream_handler/BUILD:95:11: C++ compilation of rule '//mediapipe/framework/stream_handler:default_input_stream_handler' failed (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 55 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 55 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from <command-line>:
/usr/include/stdc-predef.h: In substitution of 'template<class _Functor, class, class> std::function<std::unique_ptr<mediapipe::InputStreamHandler>(std::shared_ptr<mediapipe::tool::TagMap>, mediapipe::CalculatorContextManager*, const mediapipe::MediaPipeOptions&, bool)>::function(_Functor) [with _Functor = <missing>; <template-parameter-1-2> = <missing>; <template-parameter-1-3> = <missing>]':
mediapipe/framework/stream_handler/default_input_stream_handler.cc:24:1: required from here
/usr/include/stdc-predef.h:32:94: internal compiler error: Segmentation fault
32 | whether the overall intent is to support these features; otherwise,
| ^
0x7fa3cab217 __libc_start_main
../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
Target //mediapipe/modules/face_detection:face_detection_short_range_cpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 853.907s, Critical Path: 792.14s
INFO: 990 processes: 130 internal, 860 linux-sandbox.
FAILED: Build did NOT complete successfully

In my case it was a GCC issue. I downgraded from 10 to 9 and it compiled.
sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9

Related

Error installing postgresql with homebrew

When I run brew install postgresql I get this as an error message:
Last 15 lines from /Users/admin/Library/Logs/Homebrew/icu4c/02.make:
./formatted_string_builder.h:227:9: note: subexpression not valid in a constant expression
U_ASSERT(category <= 0xf),
^
../common/uassert.h:35:26: note: expanded from macro 'U_ASSERT'
# define U_ASSERT(exp) void()
^
./formatted_string_builder.h:240:64: note: in call to 'Field(0, 1)'
constexpr FormattedStringBuilder::Field kGeneralNumericField = {UFIELD_CATEGORY_UNDEFINED, 1};
^
3 errors generated.
*** Failed compilation command follows: ----------------------------------------------------------
clang++ -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../common -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -Qunused-arguments -Wno-parentheses-equality -Wglobal-constructors -fvisibility=hidden -fno-common -c -MMD -MT numfmt.d numfmt.o numfmt.ao -o numfmt.ao numfmt.cpp
--- ( rebuild with "/Library/Developer/CommandLineTools/usr/bin/make VERBOSE=1 all" to show all parameters ) --------
make[1]: *** [numfmt.ao] Error 1
make: *** [all-recursive] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
icu4c 67.1 (make C++14 compatible) https://github.com/Homebrew/homebrew-core/pull/59540
Error: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
I have tried brew update (I am already up to date), and the only issue brew doctor gives me is that there are unexpected header files.
I am using
OSX Yosemite 10.10.5
Homebrew 2.4.12

Need help on LFS-7.10 Pass2 binutils configure error

I have been working on resolving issues in build scripts that were built based on LFS a few years
back. I tried over the last week and tried multiple versions and solutions from different sites.
Learned a lot as I put more effort. I need your help as I couldn't get the reason behind the issue.
Based on LFS, pass 1 completed and dummy.c file execution was a success. Then I get the error in
binutils in pass 2.
http://www.linuxfromscratch.org/lfs/view/7.10-systemd/chapter05/binutils-pass2.html GCC 6.2.0
binutils 2.27
glibc 2.24
Edit:
Let me try with a recent version of LFS as suggested
train#ubuntu:~$ uname -a Linux ubuntu 4.15.0-112-generic #113~16.04.1-Ubuntu SMP Fri Jul 10 04:37:08
UTC 2020 x86_64 x86_64 x86_64 GNU/Linux train#ubuntu:~$ gcc --version gcc (Ubuntu 5.4.0-
6ubuntu1~16.04.12) 5.4.0 20160609 train#ubuntu:~$ ldd --version ldd (Ubuntu GLIBC 2.23-0ubuntu11.2)
2.23
train#ubuntu:~$ gcc dummy.c train#ubuntu:~$ readelf -l a.out | grep linux [Requesting program
interpreter: /lib64/ld-linux-x86-64.so.2] train#ubuntu:~$ /tools/bin/x86_64-tc-linux-gnu-gcc dummy.c
train#ubuntu:~$ readelf -l a.out | grep linux [Requesting program interpreter: /tools/lib64/ld-linux-
x86-64.so.2]
cd binutils-2.27-compile; CXXFLAGS="-O2 -m64 -fPIC" CFLAGS="-O2 -m64 -fPIC" CC=x86_64-tc-linux-gnu-gcc
AR=x86_64-tc-linux-gnu-ar RANLIB=x86_64-tc-linux-gnu-ranlib ../binutils-2.27/configure --prefix=/tools
******* Contents from config log **************
configure:2297: checking build system type
configure:2311: result: x86_64-pc-linux-gnu
configure:2358: checking host system type
configure:2371: result: x86_64-pc-linux-gnu
configure:2391: checking target system type
configure:2404: result: x86_64-pc-linux-gnu
configure:2458: checking for a BSD-compatible install
configure:2526: result: /usr/bin//install -c
configure:2537: checking whether ln works
configure:2559: result: yes
configure:2563: checking whether ln -s works
configure:2567: result: yes
configure:2574: checking for a sed that does not truncate output
configure:2638: result: /bin/sed
configure:2647: checking for gawk
configure:2663: found /usr/bin//gawk
configure:2674: result: gawk
configure:4121: checking for gcc
configure:4148: result: x86_64-tc-linux-gnu-gcc
configure:4377: checking for C compiler version
configure:4386: x86_64-tc-linux-gnu-gcc --version >&5
x86_64-tc-linux-gnu-gcc (GCC) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:4397: $? = 0
configure:4386: x86_64-tc-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=x86_64-tc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/train/swe/distrib/tools/bin/../libexec/gcc/x86_64-tc-linux-gnu/6.2.0/lto-
wrapper
Target: x86_64-tc-linux-gnu
Configured with: ../gcc-6.2.0/configure --prefix=/tools --target=x86_64-tc-linux-gnu --prefix=/tools
--with-sysroot=/home/train/swe/distrib --with-newlib --without-headers --with-local-prefix=/tools --
with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --
disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libatomic --
disable-libstdcxx --disable-libmpx --disable-libgomp --disable-libvtv --disable-libquadmath --enable-
languages=c,c++
Thread model: single
gcc version 6.2.0 (GCC)
configure:4397: $? = 0
configure:4386: x86_64-tc-linux-gnu-gcc -V >&5
x86_64-tc-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-tc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4397: $? = 1
configure:4386: x86_64-tc-linux-gnu-gcc -qversion >&5
x86_64-tc-linux-gnu-gcc: error: unrecognized command line option '-qversion'; did you mean '--
version'?
x86_64-tc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4397: $? = 1
configure:4417: checking for C compiler default output file name
configure:4439: x86_64-tc-linux-gnu-gcc -O2 -m64 -fPIC conftest.c >&5
configure:4443: $? = 0
configure:4480: result: a.out
configure:4496: checking whether the C compiler works
configure:4505: ./a.out
../binutils-2.27/
configure: line 4507: 87493 Segmentation fault (core dumped) ./$ac_file
configure:4509: $? = 139
configure:4516: error: in `/home/train/swe/distrib/build/sources/binutils/binutils-2.27-compile':
configure:4520: error: cannot run C compiled programs.
If you meant to cross compile, use --host'. See config.log' for more details.
Would appreciate any help on this

Install postgresql with Homebrew does not work

I tried to install PostgreSQL on my mac book with homebrew.
brew install postgresql
But I couldn't install it and got these error messages.
Does anyone know what is the solution for this issue?
./formatted_string_builder.h:227:9: note: subexpression not valid in a constant expression
U_ASSERT(category <= 0xf),
^
../common/uassert.h:35:26: note: expanded from macro 'U_ASSERT'
# define U_ASSERT(exp) void()
^
./formatted_string_builder.h:240:64: note: in call to 'Field(0, 1)'
constexpr FormattedStringBuilder::Field kGeneralNumericField = {UFIELD_CATEGORY_UNDEFINED, 1};
^
3 errors generated.
*** Failed compilation command follows: ----------------------------------------------------------
clang++ -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -DU_HAVE_STRING_VIEW=1 -I. -I../common -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -Qunused-arguments -Wno-parentheses-equality -Wglobal-constructors -fvisibility=hidden -fno-common -c -MMD -MT numfmt.d numfmt.o numfmt.ao -o numfmt.ao numfmt.cpp
--- ( rebuild with "/Library/Developer/CommandLineTools/usr/bin/make VERBOSE=1 all" to show all parameters ) --------
make[1]: *** [numfmt.ao] Error 1
make: *** [all-recursive] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: You are using macOS 10.12.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
You need icu4c, The currently the version of icu4c written in Homebrew's Fomula is 67.1, and macOS is required to be High Sierra (10.13) or higher.

Unable to compile / install Orange Data Mining on Raspberry Pi

I have been trying to compile and install Orange 2.7.8 on Raspberry Pi 2 but was unsuccessful. I tried compiling by hand and also used pip install orange as per suggestion from: How can I install python-Orange on ubuntu 12.10
The first warning I got this:
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -I/usr/lib/pymodules/python2.7/numpy/core/include -Isource/include -Isource/orange/liblinear -Isource/orange/ppp -Isource/orange/px -I/usr/include/python2.7 -c source/orange/basstat.cpp -o build/temp.linux-armv7l-2.7/source/orange/basstat.o -fPIC -w -DLINUX -DORANGE_EXPORTS
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
But it kept going without an error. Then when it started compiling with g++, it started getting an error on multiple definition of TOrangeVector. There are many errors like the lines below:
build/temp.linux-armv7l-2.7/source/orange/distance.o:(.data.rel.ro+0x6c): multiple definition of `typeinfo for TOrangeVector<GCPtr<TVariable>, true>'
build/temp.linux-armv7l-2.7/source/orange/basstat.o:(.data.rel.ro+0x6c): first defined here
build/temp.linux-armv7l-2.7/source/orange/distance.o: In function `TExamplesDistance::classDescription() const':
/home/pi/build/orange/source/orange/ppp/distance.ppp:17: multiple definition of `typeinfo for TOrangeVector<bool, false>'
In the end it got kicked out:
/home/pi/build/orange/source/orange/vectortemplates.hpp:1075: multiple definition of `typeinfo name for TOrangeVector<GCPtr<TOrangeVector<GCPtr<TVariable>, true> >, true>'
build/temp.linux-armv7l-2.7/source/orange/basstat.o:/home/pi/build/orange/source/orange/ppp/../basstat.hpp:8: first defined here
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
Any guide on how to tweak this to make it compiled would be appreciated.

bdw-gc install failed on lion with brew

i am install w3m with brew on lion. when i use the origin formula the installation is filed.
then i following the issues 7068 of homebrew update the bdw-gc.rb formula script
require 'formula'
class BdwGc < Formula
# url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz'
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha6.tar.gz'
homepage 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/'
# 7.1
# md5 '2ff9924c7249ef7f736ecfe6f08f3f9b'
# 7.2alpha6
md5 '319d0b18cc4eb735c8038ece9df055e4'
fails_with_llvm "LLVM gives an unsupported inline asm error", :build => 2335
def install
# ucontext has been deprecated in 10.6
# use this flag to force the header to compile
# ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE" if MacOS.snow_leopard?
ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE"# if MacOS.snow_leopard?
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
and reinstall it, but it's still failed. here is the install log
brew install bdw-gc
==> Downloading http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alp
File already downloaded in /Users/akira/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/bdw-gc/6
==> make install
........
libtool: compile: /usr/bin/llvm-gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -D_XOPEN_SOURCE -fexceptions -O3 -march=core2 -w -pipe -c obj_map.c -o obj_map.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CC --mode=compile /usr/bin/llvm-gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -D_XOPEN_SOURCE -fexceptions -O3 -march=core2 -w -pipe -c -o pcr_interface.lo pcr_interface.c
./libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h: In function 'AO_test_and_set_full':
./libatomic_ops/src/ato==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/bdw-gc.rb#L22
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: bc90bd554da6bd1199bdec92a830edbca24fa34e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit sandybridge
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -O3 -march=core2 -w -pipe
CXXFLAGS: -O3 -march=core2 -w -pipe
CPPFLAGS: -D_XOPEN_SOURCE
MAKEFLAGS: -j4
Error: Failed executing: make install
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/7068
Otherwise, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
any suggestion?
this problem was fixed by Jack Nagel at Nov 15, 2011.
see the detail
bdw-gc: add 7.2alpha6 as the '--devel' version
but this batch still got a problem. the "make check" step does not works,so you can just skip this step and "make install".