petalinux-package fails to find file in /tmp - fpga

I'm following this rather good YT tutorial to build and run petalinux on an arty board. Everything is fine until I try to package the build with petalinux-package.
I get the following error:
daniel#daniel-OptiPlex-3050:~/work/arty_petalinux_test$ petalinux-package --boot --force --fpga ../arty_linux/arty_linux.runs/impl_1/design_1_wrapper.bit --u-boot --kernel --flash-size 16 --flash-intf SPIx1
INFO: Sourcing build tools
WARNING: Auto detecting MMI file with XSA
INFO: Creating download.bit...
INFO: Fpga bitstream: /home/daniel/work/arty_linux/arty_linux.runs/impl_1/design_1_wrapper.bit
INFO: Fpga bitstream MMI file: /tmp/tmp.j6IieOwBAR/design_1_wrapper.mmi
INFO: Fsbl file: /home/daniel/work/arty_petalinux_test/images/linux/fs-boot.elf
INFO: Output download.bit: /home/daniel/work/arty_petalinux_test/images/linux/download.bit
cp: cannot stat '/tmp/tmp.j6IieOwBAR/download.bit': No such file or directory
ERROR: Failed to create download bit file for MicroBlaze MCS file.
The temp directory which it is looking for hasn't been created. I've also tried specifying the path to the MMI file (same as the path to the bit file) explicitly, but same issue.
Does petalinux-package generate any logs? I've searched and find no clue for this odd error.
Any ideas?

Related

Error while generating grpc files (--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.)

I’m trying to run the following command to generate grpc files:
protoc --proto_path=$PROTO_PATH --plugin=protoc-gen-grpc=$PLUGIN_GRPC --grpc_out=$OUT/grpc $PROTO_FILES
This results in the following error:
/Users/MYUSERNAME/Downloads/protoc-gen-grpc-java-1.48.1-osx-aarch_64.exe: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
I made sure the file from the error message is located at that path and has also the correct permissions.
-rwxrwxrwx# 1 MYUSERNAME staff 6334176 10 Aug 00:03 protoc-gen-grpc-java-1.48.1-osx-aarch_64.exe
I also tried running the command as sudo.
Generating java or kotlin files with --java_out=$OUT/java --kotlin_out=$OUT/kotlin
works perfectly fine, so the problem is --grpc_out=$OUT/grpc
I also downloaded multiple versions of the protoc-gen-grpc-java-1.48.1-osx-aarch_64.exe file but it always results in the same error. I also tried replacing all path variables (e.g. $PROTO_PATH) with their corresponding values, without any effect. I’m using MacBook with M1Pro chip.
The problem is that M1 Macs aren't supported. They have copied over the osx-x86_64 binary and renamed it for osx-aarch_64 as a workaround to make it easier to run with Rosetta. See here for where that change was made and here for the full conversation about supporting M1 Macs.

Placement of custom partition csv file

I need to create a custom csv file for my ESP32 project. Where would i need to place this file, as I am getting the following error message?
Build files have been written to:
G:/TestProjects/iot-middleware-freertos-samples/demos/projects/ESPRESSIF/esp32/build
Running ninja in directory
g:\testprojects\iot-middleware-freertos-samples\demos\projects\espressif\esp32\build
Executing "ninja all"... ninja: error: '../partitions_IOT_A.csv',
needed by 'partition_table/partition-table.bin', missing and no known
rule to make it ninja failed with exit code 1
According to the error message the csv file is expected to be one directory up from the build directory in g:\testprojects\iot-middleware-freertos-samples\demos\projects\espressif\esp32\build.
ESP IDF documentation specifies that the partition table file needs to be in the root of the project directory.

How do I fix a crashpad compilation error (for windows)

tI am following the instructions listed here: https://github.com/chromium/crashpad/blob/master/doc/developing.md
I cloned crashpad from here: https://chromium.googlesource.com/crashpad/crashpad
But I get the following results:
D:/Work/GitRepos/ThirdParty/crashpad> gn gen out/default
ERROR at //build/crashpad_buildconfig.gni:56:5: Unable to load "D:/Work/GitRepos/ThirdParty/crashpad/third_party/mini_chromium/mini_chromium/build/compiler.gni".
import("../third_party/mini_chromium/mini_chromium/build/compiler.gni")
^---------------------------------------------------------------------
See //BUILD.gn:15:1: whence it was imported.
import("build/crashpad_buildconfig.gni")
^--------------------------------------
Which is correct. There are no sub-folders under: D:\Work\GitRepos\ThirdParty\crashpad\third_party\mini_chromium
There must be something missing from the configuration instructions(?) How does one build crashpad for windows?

unable to build OpenH264.lib for windows

I followed all the instruction mentioned in https://github.com/cisco/openh264 but I am unable to get through. The information is cited in link but its quite confusing.
Alternative Way:
You can build Openh264 using visual studio in windows. Here are the steps..
i) Download OpenH264 source code provided by cisco (that already you
mentioned https://github.com/cisco/openh264).
ii) Now you will find two visual studio compatible projects in
directory /OpenH264/codec/build/win32/dec and
/OpenH264/codec/build/win32/enc.
iii) You will need to download NASM software from http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/
iv) Install NASM software on the directory C:\NASM or wherever you like.
v) Then Add NASM executable path to all these visual studio projects.
vi) Then You can either select static or dynamic library in general
options.
vi) If you are able to perform all these operations successfully, you will have 5 different .lib or .dll files named welsdcore, welsdecplus, welsecore, welsencplus, welsvp and those
are usable in any visual studio projects.
Now if you want to get openh264 features, just add all these libraries to your project and enjoy.
Hope it will help you.. :)
I also had some difficulty building openh264 on Windows using the recommended mingw approach.
In my case make crashed for all configurations I tried:
bash -c "make OS=msvc ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug clean"
bash -c "make OS=msvc ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug"
0 [main] make 3888 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
564 [main] make 3888 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
0 [main] make 5448 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
561 [main] make 5448 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
copying dll files to destination folder...
FullDestDir is E:\projects\openh264\bin\x64\Debug
current dir is:
E:\projects\openh264
DestDir is bin/x64/Debug
cp: cannot stat `openh264.dll': No such file or directory
cp: cannot stat `openh264.lib': No such file or directory
cp: cannot stat `openh264.pdb': No such file or directory
cp: cannot stat `codec_unittest.exe': No such file or directory
cp: cannot stat `h264enc.exe': No such file or directory
cp: cannot stat `h264dec.exe': No such file or directory
BuildDebugFlag =1
BuildReleaseFlag =0
BuildDebugInfo ="build debug--failed"
BuildReleaseInfo =NULL
aBuildFlagList is 1 0
ReturnCode is 1
I resorted to converting the existing solution/projects (VS2008) to VS2013 and linking/building with the created .lib files.
You can find the solutions in {openh264_dir}\codec\build\win32\enc and {openh264_dir}\codec\build\win32\dec.
Building the solution will create .libs and .dlls in {openh264_dir}\bin\Win32\Release
To link to the lib, you need to link to welsenc.lib.
When running, you need to have both the welsenc.dll and welsvp.dll in your application directory. So far it seems to have worked fine for my usage.
I'm assuming that building the decoder will be similar.

failing to load ROracle: unable to load shared object ROracle.so: libclntsh.so.11.1 No such file or directory

So I can't load ROracle. I am indeed very new to this so any information is appreciated and any info regarding what further information to give would be helpful as well.
> library(ROracle)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '~/R/x86_64-pc-linux-gnu-library/2.14/ROracle/libs/ROracle.so':
libclntsh.so.11.1: cannot open shared object file: No such file or directory
Error: package/namespace load failed for ‘ROracle’
ROracle.so is exactly where it says it is. libclntsh.so.11.1 can be found at /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1. This is the result of .libPaths:
> .libPaths()
[1] "/home/nguiller/R/x86_64-pc-linux-gnu-library/2.14" "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"
[4] "/usr/lib/R/library" "/usr/lib/rstudio/R/library"
My .Renviron file
LD_LIBRARY_PATH="/usr/lib/oracle/11.2/client64/lib:/home/nguiller/Downloads/instantclient_11_2"
ORACLE_HOME="/usr/lib/oracle/11.2/client64/:/home/nguiller/Downloads/instantclient_11_2"
OCI_LIB="/usr/lib/oracle/11.2/client64/lib"
I had a lot of trouble installing ROracle to begin with due to OCI libraries but it eventually worked with R CMD INSTALL --configure-ags='--with-oci-lib=/usr/lib/oracle/11.2/client64/lib --with-oci-inc=/usr/include/oracle/11.2/client64' ROracle_1.1-8.tar.gz
Let me know how I can help.
ORACLE_HOME should point to just one location. Shouldn't you set LD_LIBRARY_PATH_64 variable?
If you really really really want to do this within the R environment, you can load the specific library as follows:
dyn.load("/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1")
library(ROracle)
References:
Setting LD_LIBRARY_PATH from inside R
set $LD_LIBARARY_PATH=$ORACLE_HOME/lib
I got same error while loading "library(ORE)"
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib64/R/library/ROracle/libs/ROracle.so':
libclntsh.so.11.1: cannot open shared object file: No such file or directory
Error: package 'OREdm' could not be loaded
Looks like the shared object ROracle.so is referring to libclntsh.so.11.1 instead of libclntsh.so.12.1
bash-4.1$ pwd
/usr/lib64/R/library
bash-4.1$ grep -irsh "libclntsh.so.11.1" *
Binary file ROracle/libs/ROracle.so matches
As a work around, I have created a symlink, so that libclntsh.so.12.1 can be referred as libclntsh.so.11.1.
$ cd /scratch/softwares/R/db_instant_client/instantclient_12_1
ln -s libclntsh.so.12.1 libclntsh.so.11.1
After this step, I am able to load library(ORE) successfully.
Please see my website for more details.
Set this in /etc/rstudio/rserver.conf
rsession-ld-library-
path=/usr/lib64/R/lib:/home/oracle/app/oracle/product/12.1.0/client_1/lib
Then restart Rserver
sudo rstudio-server stop
sudo rstudio-server start
This helped me.

Resources