while cloning SPF12.1 sdk I am facing this issue - sdk

repo init -u https://android.googlesource.com/platform/manifest -b master
Get https://gerrit.googlesource.com/git-repo/clone.bundle
File "/data/shubham/qca-networking-2022-spf-12-1_qca_oem-r12.1_00010.3-24c5c8c657389e2af3f7af24c691f1ffb82ab86b/.repo/repo/main.py", line 79
file=sys.stderr)
^
SyntaxError: invalid syntax
Tring to clone and compile SPF 12.1 SDK

Related

Error while building GHC 9.2.1 for target=aarch64-apple-ios

I have a library written in Haskell that I would like to use in iOS and Android apps.
The library contains mainly business logic and networking, no GUI calls, therefore using this library
from an iOS or Android app is just a matter of calling a single entry point using C FFI.
I am starting first with the iOS target.
To the best of my knowledge, in order to compile Haskell sources into a Mach-O aarch64 object file,
which could later be linked to the iOS app, I need to compile the GHC compiler with a target aarch64-apple-ios.
Here is how I did the compilation of GHC:
First create a nix-shell with the following shell.nix:
let
unstable = import <unstable> { };
in
{ nixpkgs ? import <nixpkgs> {} }:
nixpkgs.mkShell {
nativeBuildInputs = [
nixpkgs.automake
nixpkgs.autoconf
nixpkgs.python38
nixpkgs.haskell.compiler.ghc8107
nixpkgs.cabal-install
nixpkgs.sphinx
unstable.clang_13
nixpkgs.llvmPackages_13.llvm
nixpkgs.gmp
nixpkgs.gnumake
nixpkgs.git
];
shellHook =
''
cabal install alex-3.2.6 happy-1.20.0
export PATH=$PATH:~/.cabal/bin
'';
}
then from inside the nix-shell run the following commands:
git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
git config --global url."http://github.com/ghc/packages-".insteadOf http://github.com/ghc/packages/
git config --global url."https://github.com/ghc/packages-".insteadOf https://github.com/ghc/packages/
git config --global url."ssh://git#github.com/ghc/packages-".insteadOf ssh://git#github.com/ghc/packages/
git config --global url."git#github.com:ghc/packages-".insteadOf git#github.com:ghc/packages/
git clone --recurse-submodules git://github.com/ghc/ghc
cd ghc
git checkout ghc-9.2.1-release
git submodule update --init --recursive
echo "HADDOCK_DOCS = NO" >> mk/build.mk
./boot
./configure --target=aarch64-apple-ios -disable-large-address-space
make -j
Then I get the following compilation error:
rts/StgCRun.c:965:11: error:
error: unknown register name '%x19' in asm
: "%x19", "%x20", "%x21", "%x22", "%x23", "%x24", "%x25", "%x26", "%x27", "%x28",
^
|
965 | : "%x19", "%x20", "%x21", "%x22", "%x23", "%x24", "%x25", "%x26", "%x27", "%x28",
| ^
1 error generated.
`clang' failed in phase `C Compiler'. (Exit code: 1)
make[1]: *** [rts/ghc.mk:345: rts/dist/build/StgCRun.o] Error 1
make: *** [Makefile:128: all] Error 2
I tried to build with hadrian, got exactly the same results.
The machine I am building on is: macOS Monterey 12.1
Does anybody habe any idea how to solve this?
Does GHC 9.2.1 support iOS and Android targets straight away or is any kind of compiler patching required?
I have got an answer on Haskell Discource, here is a link:
https://discourse.haskell.org/t/need-help-error-while-building-ghc-9-2-1-for-target-aarch64-apple-ios/4129/3

Cannot compile Open CV on Ubuntu 18.04 because of jasper.h not found

I am trying to compile Opencv on Ubuntu 18.04. I installed many dependencies packages but when I run make I get the error:
grfmt_jpeg2000.cpp:59:10: fatal error: jasper/jasper.h: No such file or directory
#include <jasper/jasper.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
I had already jasper installed and installed libjasperreports-java. However the file jasper.h cannot still be found in my system. Is there any library I can install with apt install to get that file? Or am I missing any other library?
EDIT 1
I tried also downloading the opencv_contrib to install extra moduels of openCV but first of all jaspar is not present and secondly setting the build with
cmake -D CMAKE_INSTALL_PREFIX=./ -D CMAKE_BUILD_TYPE=Debug -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../openCV
returns the error:
Make Error at cmake/OpenCVModule.cmake:352 (message):
Duplicated modules NAMES has been found
while CMakeError.log contains many errors of the type:
Build output check failed:
Regex: 'command line option .* is valid for .* but not for C\+\+'
Output line: 'cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++'

Alpine package install protocol error

I am trying to install git on alpine 3.6. It is failing with Protocol error in the first instance but works on the second instance. To be specific pcre and libcurl are not installed in first instance. Here's the log of what I am trying to do.
$ docker run -it alpine:3.6 /bin/sh
/ # apk --update add git
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/6) Installing ca-certificates (20161130-r2)
(2/6) Installing libssh2 (1.8.0-r1)
(3/6) Installing libcurl (7.56.1-r0)
ERROR: libcurl-7.56.1-r0: Protocol error
(4/6) Installing expat (2.2.0-r1)
(5/6) Installing pcre (8.41-r0)
ERROR: pcre-8.41-r0: Protocol error
(6/6) Installing git (2.13.5-r0)
Executing busybox-1.26.2-r9.trigger
Executing ca-certificates-20161130-r2.trigger
2 errors; 24 MiB in 15 packages
/ # git
Error loading shared library libpcre.so.1: No such file or directory (needed by /usr/bin/git)
Error relocating /usr/bin/git: pcre_compile: symbol not found
Error relocating /usr/bin/git: pcre_exec: symbol not found
Error relocating /usr/bin/git: pcre_maketables: symbol not found
Error relocating /usr/bin/git: pcre_study: symbol not found
Error relocating /usr/bin/git: pcre_free: symbol not found
Installing pcre/git again works though.
/ # apk add pcre
(1/2) Installing libcurl (7.56.1-r0)
(2/2) Installing pcre (8.41-r0)
OK: 25 MiB in 17 packages
/ # git
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
I had this problem too (surprisingly, it was deterministic), and changing the mirror worked. For example, do:
$ echo "https://mirror.csclub.uwaterloo.ca/alpine/v3.7/main" >/etc/apk/repositories
$ echo "https://mirror.csclub.uwaterloo.ca/alpine/v3.7/community" >>/etc/apk/repositories
to change the mirror to the UWaterloo server. You can find the full list of mirrors here.

SyntaxError: invalid syntax while building z3

I downloaded z3 source codes from the master branch and tried to build it, which resulted in the following error:
c:\Program Files\z3>python --version
Python 3.3.2
c:\Program Files\z3>python scripts\mk_make.py
Traceback (most recent call last):
File "scripts\mk_make.py", line 9, in <module>
from mk_util import *
File "c:\Program Files\z3\scripts\mk_util.py", line 81
print "dos2unix '%s'" % fname
^
SyntaxError: invalid syntax
Am I doing something wrong?
The master branch only works with Python 2.7.x.
The unstable (working-in-progress) branch should work with Python 3.x.
Here are instructions to compile the working-in-progress branch.

Xcode Build error, arm-apple-darwin11-gcc-4.2.1 execvp: No such file or directory

After upgrading to Xcode 4.3.2. I'm getting a metric ton of build errors.
A whole line of them are error code 255
gcc-4.2: error trying to exec '/usr/bin/arm-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
Command /usr/bin/gcc-4.2 failed with exit code 255
I noticed that there is no /usr/bin/arm-apple-darwin11-gcc-4.2.1 file on my machine. Could this be the source of the problem?
What's the output of this command?
$ printenv | grep "CC="
It might be honoring your C Compiler (CC) selection. I was getting similar errors (through cocoapods) and doing an
$ export CC=
fixed it for me.

Resources