Error at Remote Debugging in Eclipse - linux

I am trying to debug an application remotely in Eclipse. When I start debugging, the application is deployed and the gdbserver is started on the target. This seems to work automatically without any mistakes, but then following error occurs:
'Launching helloworld Build(GNU)' has encountered a problem.
Could not determine GDB version using command: /usr/bin/gdb --version
When I expand <<Details in Eclipse this is shown:
Could not determine GDB version using command: /usr/bin/gdb --version
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
In a console on the target /usr/bin/gdb --version is showing me the version and when I open a Python shell I can import encodings without errors.
Does anybody know where this error comes from? I wasn't sure about how to tag this question since I have no clue in which area the solution will be.
What I tried so far:
In Eclipse/Debug Configurations: Commands to execute before application: Several export commands to Python.
Same in /etc/profile.
bitbake -e python | grep "^PACKAGES=" : Inserted every python package into my image recipe via IMAGE_INSTALL_append.
[...]

Related

ERROR Could not execute Ninja. I was trying to execute "/opt/fuchsia/prebuilt/third_party/ninja/linux-arm64/ninja"

I would like to emulate google fuchsia OS on my jetson nano (arm64) with qemu and kvm. This is guide that I'm reading from :
https://fuchsia.dev/fuchsia-src/get-started/get_fuchsia_source
below u can see the full log,with all the commands that I have issued and the replies that I've got,until the last one that's the error that I'm not able to fix :
/opt# python --version
Python 3.8.11
/opt# curl -sO https://storage.googleapis.com/fuchsia-ffx/ffx-linux-x64 && chmod +x ffx-linux-x64 && ./ffx-linux-x64 platform preflight
bash: ./ffx-linux-x64: cannot execute binary file: Exec format error
/opt# curl -s "https://fuchsia.googlesource.com/fuchsia/+/HEAD/scripts/bootstrap?format=TEXT" | base64 --decode | bash
WARNING: Jiri doesn't support timely updates for arch 'aarch64'. This or future binaries of Jiri might be out of date.
cipd bootstrapped to path:"/opt/fuchsia/.jiri_root/bin/cipd"
Please add /opt/fuchsia/.jiri_root/bin to your PATH
WARN: Please opt in or out of analytics collection. You will receive this warning until an option is selected.
To check what data we collect run: jiri init -show-analytics-data
To opt-in run: jiri init -analytics-opt=true "/opt/fuchsia"
To opt-out run: jiri init -analytics-opt=false "/opt/fuchsia"
Updating all projects
WARN: Some packages are skipped by cipd due to lack of access, you might want to run "/opt/fuchsia/.jiri_root/bin/cipd auth-login" and try again
Done creating a Platform Source Tree at "/opt/fuchsia".
Recommended: export PATH="/opt/fuchsia/.jiri_root/bin:$PATH"
/opt# nano ~/.bash_profile
export PATH=/opt/fuchsia/.jiri_root/bin:$PATH
source /opt/fuchsia/scripts/fx-env.sh
/opt# source ~/.bash_profile
/opt# jiri help
Command jiri is a multi-purpose tool for multi-repo development.
Usage:
jiri [flags] <command>
/opt/fuchsia# fx help
usage: fx [--dir BUILD_DIR] [-d DEVICE_NAME] [-i] [-x] COMMAND [...]
Run Fuchsia development commands. Must be run from a directory
that is contained in a Platform Source Tree.
/opt/fuchsia# fx set core.qemu-arm64
WARNING: Please opt in or out of fx metrics collection.
You will receive this warning until an option is selected.
To check what data we collect, run `fx metrics`
To opt in or out, run `fx metrics <enable|disable>
/opt/fuchsia/tools/devshell/go: line 21: /opt/fuchsia/prebuilt/third_party/go/linux-arm64/bin/go: cannot execute binary file: Exec format error
/opt/fuchsia/tools/devshell/go: line 21: /opt/fuchsia/prebuilt/third_party/go/linux-arm64/bin/go: Success
ERROR: Failed to build fx set.
ERROR: Please file a bug using `fx report-bug set` with the full error copy-pasted.
ERROR: Rerun your command using the uncompiled version:
ERROR: fx --enable=legacy_set set core.qemu-arm64
/opt/fuchsia# fx --enable=legacy_set set core.qemu-arm64
WARNING: Please opt in or out of fx metrics collection.
You will receive this warning until an option is selected.
To check what data we collect, run fx metrics
To opt in or out, run `fx metrics <enable|disable>
ERROR Could not execute Ninja. I was trying to execute "/opt/fuchsia/prebuilt/third_party/ninja/linux-arm64/ninja"
I'll begin by pointing this out from the source code guide:
At this time the preflight tool is only provided as an x64 prebuilt. Fuchsia is currently not guaranteed to build successfully on other host architectures.
So this isn't an officially supported path, and there may be sharp edges. Any time you see Exec format error popping up in your logs it relates to the fact that a prebuilt isn't running on the correct architecture. This may be because the arm64 prebuilt doesn't exist or perhaps it was improperly fetched.
For ffx platform preflight, there are currently no arm64 binaries uploaded (the command you copied pulled the x64 binary). However, this step only helps validate prerequisites...it's not required to complete the build. I have filed fxbug.dev/80517 related to possibly adding support for this.
The subsequent errors coming from fuchsia/prebuilt relate to issues with the linux-arm64 binaries downloaded during bootstrap. I would recommend filing an issue for this as a feature request in the public issue tracker.

RethinkDB 2.4.1 windows build

I'm trying to build the rethinkdb in windows using cygwin. Config runs ok, but making the v8 depedency fails. Anybody more lucky?
Error: open /cygdrive/c/rtdb/rethinkdb-2.4.1/external/v8_4.7.80.23.fetch-wINBkpwO/depot_tools/cipd_client_version: The system cannot find the path specified..
Bootstrap from scratch failed, something is seriously broken. Run the following commands to diagnose if this is repeating:
export CIPD_HTTP_USER_AGENT_PREFIX=depot_tools/364205c70ed16c00802b1c264e88d8e03a0b37ae/manual
/cygdrive/c/rtdb/rethinkdb-2.4.1/external/v8_4.7.80.23.fetch-wINBkpwO/depot_tools/.cipd_client selfupdate -version-file /cygdrive/c/rtdb/rethinkdb-2.4.1/external/v8_4.7.80.23.fetch-wINBkpwO/depot_tools/cipd_client_version
/cygdrive/c/rtdb/rethinkdb-2.4.1/external/v8_4.7.80.23.fetch-wINBkpwO/depot_tools/bootstrap_python3: line 32: bootstrap-3.8.0.chromium.8_bin/python3/bin/python3: No such file or directory
'ygdrive' is not recognized as an internal or external command,
Blockquote

How to check the logs of Mac OS X when running a python exe compiler software?

Environment
Python 3.7
Mac OS Catalina 10.15
Problem
I am developing a software with Python for Mac OS X. I will compile it with Nuitka.
When I run my compiled program, it doesn't work.
When I was searching for solutions on Google, some people speak about checking the log system of the Mac OS.
So I found it here: Finder > Applications > Utilities > Console
The console is full of logs system messages. My problem is I don't know how can I filter all these logs to show only the ones connected to the execution of my software.
I use the logging module to create a log file for my python script but this log file is not produced. I guess program bug before it can create a log file.
Is there another way to check the logs?
Edit:
To compile my code, I execute this Nuitka command:
sudo python3 -m nuitka --standalone --plugin-enable=gevent --plugin-enable=qt-plugins --plugin-enable=pylint-warnings --show-progress --show-scons --follow-imports --recurse-all --windows-icon=phonebot_icon.icns MyApp.py
The result is 2 folders:
MyApp.build
MyApp.dist
MyApp.dist contains the executable file "MyApp" and some .so files.
From Finder, I can't browse MyApp.dist as it is seen as unknown file. So the only way to run the executable file is from terminal. I do:
sudo open MyApp
A new terminal window open and I get this output:
Last login: Thu Sep 3 12:46:32 on ttys001
/Users/gauthierbtz/Dropbox/cff/Python/MyApp/MyApp.dist/MyApp ; exit;
(base) gauthierbtz#MacBook-de-Gauthier ~ % /Users/gauthierbtz/Dropbox/cff/Python/MyApp/MyApp.dist/MyApp ; exit;
Password:
LSOpenURLsWithRole() failed for the application /Applications/MyApp.app with error -10810.
It looks like it try to go to Applications folder to open the MyApp.app which doesn't exist.

mpicxx: Command not found

I am very new to linux. I am trying to build lammps open source software with user defined modules that require to build mpi executable on opensuse leap 15.1.
lammps - https://lammps.sandia.gov/doc/Build_make.html
It showed an error: mpicxx xommand not found.
after searching i did "sudo zypper in gcc-c++" and tried again.
same error
so I did "export PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin"
and make mpi was successful and it built lmp_mpi executable but when i tried to run with lmp_mpi it showed following error:
error while loading shared libraries: libmpi_cxx.so.1: cannot open shared object file: No such file
so I wrote "export PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin" in my bashrc file and ran again make mpi and tried again same error is shown.
I tried by installing mpich2 with yast same error is shown.
Then I tried by installing openmpi as shown here http://edu.itp.phys.ethz.ch/hs12/programming_techniques/openmpi.pdf
When I tried to build mpi again same error "mpicxx: Command not found error" and also when I open terminal following lines are written already.
bash: /home/surya/.bashrc: line 1: syntax error near unexpected token newline'
bash: /home/surya/.bashrc: line 1:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opt/openmpi/lib >'
Someone please help me I have been trying this for long time.
Thanks for the suggestions.

Unable to connect to the GDB server through arm-none-eabi-gdb command

I am following this tutorial. I have compiled the code successfully, but when I try to run using command arm-none-eabi-gdb -q thumbv7em-none-eabihf/debug/led-roulette on terminal, it says that:
C:\Program Files (x86)\GNU Tools ARM Embedded\8 2018-q4-major\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
thumbv7em-none-eabihf/debug/led-roulette: No such file or directory
Although, I have physically checked the path and the file does exist there.
I am a beginner to stm32f3Discovery and trying to setup the device using the documentation
Steps taken so far:
Already added the target using:
rustup target add thumbv7em-none-eabihf
Compiled the program using command:
cargo build --target thumbv7em-none-eabihf
Getting correct output of the following command:
cargo readobj --target thumbv7em-none-eabihf --bin led-roulette -- -file-headers
As I am on Windows, I've tried the following command to launch openOCD:
openocd -s C:\OpenOCD\scripts -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
Run this command to connect to gdb server, but failed:
arm-none-eabi-gdb -q target/thumbv7em-none-eabihf/debug/led-roulette
The above command should work and connect GDB server, but it doesn't.
Thanks hellow.. Your 'Triple check' statement works for me. Yes, it was the path issue which i had to change while debugging. It is rocking..

Resources