when i finished cross-compile chrome for amr64, I found that an error 'Segmentation fault' would be reported after starting chrome.
The cross-compile server system version is: Linux version 4.4.0-157-generic (buildd#lgw01-amd64-037) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) )
The arm64 server system version is: Linux centos7.6-aarch-template 4.14.0-115.e17a.0.1.aarch64
Here are params in args.gn:
import("//build/args/headless.gn")
target_os = "linux"
symbol_level = 0
is_debug = false
blink_symbol_level = 0
target_cpu = "arm64"
disable_histogram_support = true
The autoninja -C out/Debug headless_shell is used for compling headless chrome.
Then copy the Debug folder to the ARM server
But when I run ./headless_shell on the server, there is only segmentation fault, no more information.
just like this:
./headless_shell
Segmentation fault.
Any help or guidance on how I can solve the problem would be greatly appreciated.
Related
I am trying to build a Docker image in my Mac M1....
When I try to run my Image I am getting "exec format error" which as I understand a cross platform native image problem but as far as I can see I build the native-image with an arm64 GraalVM.
[1/7] Initializing...
(6,5s # 0,23GB)
Version info: 'GraalVM 22.3.0 Java 17 CE'
Java version info: '17.0.5+8-jvmci-22.3-b08'
C compiler: cc (apple, arm64, 14.0.0)
Garbage collector: Serial GC
1 user-specific feature(s)
And I used a base image from alpine:arm64
https://hub.docker.com/layers/library/alpine/3.17.0/images/sha256-af06af3514c44a964d3b905b498cf6493db8f1cde7c10e078213a89c87308ba0?context=explore
and
uname -a
confirms that is an arm64 based linux.
Linux 5e6ec3a5a46e 5.15.64-0-virt #1-Alpine SMP Mon, 05 Sep 2022 08:02:49 +0000 aarch64 Linux
and
docker image inspect
reports
"Architecture": "arm64",
"Os": "linux",
"Size": 80206330,
"VirtualSize": 80206330,
it is an arm64/linux is.
What is going on here?
#peterz answer is absolutely correct, my assumption that MacOS is Unix/Linux based was false.
When I did a cross platform native-image Generation for alpine, this error disappeared.
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x40 in tid 10919 (SDLThread), pid 10882 (org.test.myapp)
this it the last line of the logcat, I am really clueless on what happened because even if I revert everything that I applied, even in the first ever deployment build that I am sure will work on my device because I've tried it before now gives the above error, but when I use my friends phone on an android 10 device it works flawlessly. below is my buildozer spec file... some say it might be a native library issue wherein 32bit libraries cannot work with a 64bit library
requirements = android,python3,kivy,kivymd,certifi,pillow,camera4kivy,gestures4kivy,numpy,keras,opencv-python,requests,urllib3,chardet,idna,beautifulsoup4
# change the major version of python used by the app
osx.python_version = 3
# Kivy version to use
osx.kivy_version = 1.9.1
# (list) Permissions
android.permissions = INTERNET,CAMERA,RECORD_AUDIO,WRITE_EXTERNAL_STORAGE,READ_EXTERNAL_STORAGE
# (list) features (adds uses-feature -tags to manifest)
#android.features = android.hardware.usb.host
# (int) Target Android API, should be as high as possible.
android.api = 31
# (list) The Android archs to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
# In past, was `android.arch` as we weren't supporting builds for multiple archs at the same time.
android.archs = arm64-v8a, armeabi-v7a
p4a.hook = camerax_provider/gradle_options.py
I tried reverting to my most basic app before reverting my code in kivy python and buildozer, and now it gives that error... is it on my phone?
I had the same problem, SIGSEGV due to graphics thread. I managed to find a solution. The problem was using kivymd 1.1.1, I specified a different version(1.0.2) in buildozer.spec requirements, and the error was gone.
I attach the reference where I found the solution: https://github.com/Android-for-Python/Android-for-Python-Users#null-pointer-dereference
After an upgrade to MacOS Catalina, I find that I can no longer install packages from source in the RStudio IDE (v1.2.5001, current stable release).
Example:
> install.packages("processx", type = "source")
trying URL 'https://cran.rstudio.com/src/contrib/processx_3.4.1.tar.gz'
Content type 'application/x-gzip' length 123430 bytes (120 KB)
==================================================
downloaded 120 KB
* installing *source* package ‘processx’ ...
** package ‘processx’ successfully unpacked and MD5 sums checked
** libs
/usr/local/clang4/bin/clang -Wall -g -O2 -Wall tools/px.c -o tools/px
make: *** [tools/px] Killed: 9
ERROR: compilation failed for package ‘processx’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/processx’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/processx’
Warning in install.packages :
installation of package ‘processx’ had non-zero exit status
In the process I get a popup with this message:
“clang-4.0” cannot be opened because the developer cannot be verified.
It seems that RStudio is pointed at clang from XCode 11.1, rather than the clang 8 I got from CRAN https://cran.r-project.org/bin/macosx/tools/.
Straight from R (e.g. sudo -i R in my terminal) a source install works fine, so it seems to be a matter of getting RStudio to look in the right place for the clang binary.
Any ideas?
I changed my ~/.R/Makevars file to point to a newer version of clang (R recommends 8+), e.g. CC=/usr/local/opt/llvm/bin/clang. I commented out the clang4 lines and created a new set pointing to the updated clang. Worked like a charm, now able to install R packages as usual.
Note: I had previously used brew to update llvm, which installed clang9.
Hope that helps!
Recently I am trying to build OpenCV with CUDA support, and I met problem while building the module cudaarithm.
OpenCV source: git cloned from : http://github.com/Itseez/opencv.git
OpenCV branch: master branch
OpenCV commit:
`commit 5466e321b8c8f97536002a357e5b7ff49a5d2bf9, on Tue Feb 10 12:17:11 2015 +0000`
CUDA version: CUDA 6.5
Hardware: MacBook Pro (13-inch, Mid 2010)
GPU: NVIDIA GeForce 320M 256 MB
OS Version: OS X Yosemite
Steps I used:
1. cd in OpenCVSource, then mkdir myrelease, and cd myrelease
2. cmake -DPLANTUML_JAR=/usr/local/Cellar/plantuml/8002 -D BUILD_DOCS=1 -DPYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib -DPYTHON2_INCLUDE_DIR=/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DPYTHON3_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib -DPYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/include/python3.4m -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -Wno-dev -DNVCC_FLAGS_EXTRA="-Xcompiler -stdlib=libstdc++; -Xlinker -stdlib=libstdc++" -DOPENCV_EXTRA_CXX_FLAGS=" -stdlib=libstdc++" -DOPENCV_EXTRA_EXE_LINKER_FLAGS="-stdlib=libstdc++" ..
3. make VERBOSE=1
Expect Result: Building success without error
Actual Result: when building OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu, error happend like below:
/Users/Hawk/Documents/study/DIP/OpenCV/OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu(61): *error: identifier "getInputMat" is undefined*
/Users/Hawk/Documents/study/DIP/OpenCV/OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu(67): *error: identifier "getOutputMat" is undefined*
/Users/Hawk/Documents/study/DIP/OpenCV/OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu(92): *error: identifier "syncOutput" is undefined*
Then what action I take:
check the code and I found these undefined symboles are defined in OpenCVSource/modules/core/include/opencv2/core/private.cuda.hpp
check the code and I confrim that the "transpose.cu" file include "opencv2/core/private.cuda.hpp"
check the building log, and I the confirm the private.cuda.hpp is in the search path of header file
cp "opencv2/core/private.cuda.hpp" as another file "opencv2/core/hawk.hpp", and then edit "transpose.cu" to include this new file, and I found
the "undifined symbole error" disapeared.
Although this is a workable workaround, I would like know whether the original OpenCV source cannot be compiled.
All, I think I found the problem cause.
Before I met such problem, I've already build and install OpenCV using older code from the git repo. So that there already have header files in my /usr/local/include/opencv2, especially there is /usr/local/include/opencv2/core/private.cuda.hpp.
However, it is an older one that doesn't define the symbols reporting undefined in above question. At the same time I found during the building nvcc have -I/usr/local/include in the command line, so that it use wrong private.cuda.hpp. As you know it should use the one in OpenCVSource, not the older installed one.
I think the solution is to gracefully remove the original installed OpenCV from my computer, then build again. I am trying and I will report later.
So far I was building libxml2-2.9.2 and previous versions for iOS 32 bits only.
The command I'm using to call configuration script is:
./configure --with-debug=no --host=arm-apple-darwin12.5.0 --with-iconv=no --with-zlib=no
and this was working just fine.
Now to build it for 64 bit architecture I'm passing:
./configure --with-debug=no --host=arm64-apple-darwin12.5.0 --with-iconv=no --with-zlib=no
And this is printing out the following errors:
checking build system type... x86_64-apple-darwin12.5.0
checking host system type... Invalid configuration `arm64-apple-darwin12.5.0': machine `arm64-apple' not recognized
configure: error: /bin/sh ./config.sub arm64-apple-darwin12.5.0 failed
Do you know how to fix this problem?
Thanks in advance.