Tensorflow on Hexagon DSP unclear issues - tensorflow

I am follow instruction to build Android application with Tensorflow engine on Hexagon DSP.
My device is Pixel 1.
libhexagon_controller.so - there is no compilation problem with android_Release mode , but when I trying to build android_Release_aarch6 i have linkage problem :
warning: libadsprpc.so, needed by /Tensorflow_Hexagon/tensorflow-master/tensorflow/contrib/makefile/downloads/hexagon/libs/libhexagon_controller.so, not found (try using -rpath or -rpath-link)
I resolve it with adding -ladsprpc to Makefile in tensorflow/contrib/makefile.
If ladsprpc nedeed for android_Release_aarch64 why in android_Release it's ok ?
2.I follow steps to generate sign test shared library -${QUALCOMM_SDK}/docs/Tools_Signing.html
my problem is with adb push output/testsig-0x<serial number> /system/lib/rfsa/adsp/
I am getting adb: error: failed to copy 'testsig-xxxx.so' to '/system/lib/rfsa/adsp/': remote couldn't create file: Is a directory
What to do?
Thanks.

Related

Unreal engine build fails on google colab

I follow the steps specified in docs:
git clone -b 4.25 git#github.com:EpicGames/UnrealEngine.git
which results in:
Cloning into 'UnrealEngine'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So I found a workaround by connecting my github account with EpicGames following the instructions here. Then I fork the UnrealEngine repo which is a private repo and you can't access it unless you connect your github account as specified earlier. Then I clone the fork:
git clone --depth 1 https://username:token#github.com/username/UnrealEngine.git
which results in
Cloning into 'UnrealEngine'...
remote: Enumerating objects: 111586, done.
remote: Counting objects: 100% (111586/111586), done.
remote: Compressing objects: 100% (83748/83748), done.
remote: Total 111586 (delta 26650), reused 92556 (delta 24736), pack-reused 0
Receiving objects: 100% (111586/111586), 236.57 MiB | 17.26 MiB/s, done.
Resolving deltas: 100% (26650/26650), done.
Checking out files: 100% (137999/137999), done.
Followed by the instructions specified in docs
cd UnrealEngine
./Setup.sh
./GenerateProjectFiles.sh
make
Which work perfectly fine until I get an error at the later stages of the build as shown below. You can check the full build log here
... truncated for readability
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/librpcsvc.a
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/libpthread.a
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/libmcheck.a
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/libnss_nisplus.so
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/crt1.o
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/libnss_dns.so
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/Scrt1.o
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/libc.a
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/libBrokenLocale.so
./v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/libnsl.a
Target arch set to: x86_64-unknown-linux-gnu
Building ThirdParty libraries
If you don't see SUCCESS message in the end, then building did not finish properly.
In that case, take a look into /content/UnrealEngine/Engine/Build/BatchFiles/Linux/BuildThirdParty.log for details.
No third party libs needed to be built locally
********** SUCCESS ****************
Setup successful.
Attempting to set up UE4 pretty printers for gdb (existing UE4Printers.py, if any, will be overwritten)...
updated UE4Printers.py
no ~/.gdbinit file found - creating a new one.
Setting up Unreal Engine 4 project files...
Fixing inconsistent case in filenames.
Setting up Mono
Generating data for project indexing... 100%
Generating data for project indexing... 100%
Writing project files... 100%
Generating data for project indexing... 100%
Generating data for project indexing... 100%
Generating data for project indexing... 100%
Generating data for project indexing... 100%
Writing project files... 100%
bash "/content/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh" CrashReportClient Linux Shipping
Fixing inconsistent case in filenames.
Setting up Mono
Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe CrashReportClient Linux Shipping
Using 'git status' to determine working set for adaptive non-unity build (/content/UnrealEngine).
Creating makefile for CrashReportClient (no existing makefile)
Creating makefile for UnrealHeaderTool (no existing makefile)
------- Build details --------
Using toolchain located at '/content/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu'.
Using clang (/content/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '10.0.1' (string), 10 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /content/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink circularly dependent libraries (no FixDeps).
------------------------------
Performing 38 actions (2 in parallel)
[1/38] Compile PCH.Core.h
[2/38] Compile PCH.CoreUObject.h
[3/38] Compile BuildSettings.cpp
[4/38] Compile Module.TraceLog.cpp
[5/38] Compile SharedPCH.Core.ShadowErrors.h
[6/38] Compile Module.Core.4_of_14.cpp
[7/38] Compile Module.Core.12_of_14.cpp
[8/38] Compile Module.Core.11_of_14.cpp
[9/38] Compile Module.Core.7_of_14.cpp
[10/38] Compile Module.Core.10_of_14.cpp
[11/38] Compile Module.Core.9_of_14.cpp
[12/38] Compile Module.Core.2_of_14.cpp
[13/38] Compile Module.Core.6_of_14.cpp
[14/38] Compile Module.Core.5_of_14.cpp
[15/38] Compile Module.Core.13_of_14.cpp
[16/38] Compile Module.Core.8_of_14.cpp
[17/38] Compile Module.Core.3_of_14.cpp
[18/38] Compile Module.Core.1_of_14.cpp
[19/38] Compile Module.Core.14_of_14.cpp
[20/38] Link (lld) libUnrealHeaderTool-TraceLog.so
[21/38] Link (lld) libUnrealHeaderTool-BuildSettings.so
[22/38] Compile Module.Json.cpp
[23/38] Link (lld) libUnrealHeaderTool-Core.so
[24/38] Compile Module.Projects.cpp
[25/38] Link (lld) libUnrealHeaderTool-Json.so
[26/38] Compile Module.CoreUObject.6_of_8.cpp
[27/38] Link (lld) libUnrealHeaderTool-Projects.so
[28/38] Compile Module.CoreUObject.2_of_8.cpp
[29/38] Compile Module.CoreUObject.7_of_8.cpp
[30/38] Compile Module.CoreUObject.1_of_8.cpp
[31/38] Compile Module.CoreUObject.8_of_8.cpp
[32/38] Compile Module.CoreUObject.4_of_8.cpp
[33/38] Compile Module.CoreUObject.5_of_8.cpp
[34/38] Compile Module.CoreUObject.3_of_8.cpp
[35/38] Compile Module.UnrealHeaderTool.cpp
[36/38] Link (lld) libUnrealHeaderTool-CoreUObject.so
[37/38] Link (lld) UnrealHeaderTool
[38/38] UnrealBuildTool.exe UnrealHeaderTool.target
Total time in Local executor: 472.22 seconds
Parsing headers for CrashReportClient
Running UnrealHeaderTool CrashReportClient "/content/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="/content/UnrealEngine/Engine/Programs/UnrealBuildTool/Log_UHT.txt"
src/tcmalloc.cc:283] Attempt to free invalid pointer 0x7fab74511030
Makefile:327: recipe for target 'CrashReportClient-Linux-Shipping' failed
make: *** [CrashReportClient-Linux-Shipping] Error 3
I tried solutions to similar issues proposed here, here, and here and nothing seems to fix the problem, and some cause other errors.
For some reason it performs a wrongful memory deallocation (likely deallocating twice):
Attempt to free invalid pointer 0x7fab74511030
This might be a better place to ask: https://issues.unrealengine.com

Yocto SDK, QtWebEngine: Unknown module(s) in QT: webengine

I'm doing my first steps with Qt and QtWebEngine on an embedded board (i.MX6), using Yocto. Using provided example recipes, like the quicknanobrowser, works nicely on the target. So I can't confirm this answer which claims that WebEngine is not available on embedded platforms.
Now I want to write my own QML application and deploy it on the board. With the recipe meta-toolchain-qt5 I created an SDK and installed it. In QtCreator I set all paths to the SDK installation and tried to build it, but got this error:
Project ERROR: Unknown module(s) in QT: webengine
11:13:13: The process "/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" exited with code 3.
It turned out that WebEngine was not included in the SDK. Thanks to this answer, I fixed that by putting the following to my own packagegroup-qt5-toolchain-target.bbappend file:
RDEPENDS_${PN} += " \
qtwebengine \
qtwebengine-qmlplugins \
qtquickcontrols-qmlplugins \
qtwebengine-examples \
"
Then reinstalled the SDK. Now it seems that all WebEngine files are available in the SDK installation (the zsh glob pattern below matches all directories in any subdirectory of /opt/poky/1.8/, which contain "webengine", case-insensitively):
% ls -1 -d (#i)/opt/poky/1.8/**/*webengine*(/)
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/5.4.3/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/5.4.3/QtWebEngineWidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/qml/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webengine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webenginewidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/translations/qtwebengine_locales/
Still, I get the same Unknown module error. This is independent of QtCreator, and can also be shown by directly calling qmake:
% source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
% /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake /home/me/test/test.pro -r -spec linux-oe-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
Project ERROR: Unknown module(s) in QT: webengine
The project itself should be fine, because it compiles and runs without problems on the Desktop installation.
Any ideas? Are there maybe still some files missing in the SDK? Where does qmake search for the modules? How can I tell qmake where to find the WebEngine installation?
In /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
add sh /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/environment-setup.d/qt5.sh
This will set up the Qt5 environment.

Connecting HTTPKit to a Theos application project. Undefined symbols error

Aim
I am trying to build the simplest Theos application that is acting like HTTP server.
I have no specific preferences on what libraries to use, but I tried by best using HTTPKit this time. I will appreciate any comments and/or links on how to build such applications.
Question in a couple of words
Failed to use HTTPKit in Theos application project. Getting "Undefined symbols" when using any of the HTTPKit classes.
Personal thoughts
I am sure the "Undefined symbols" error is caused by wrong linking. And I am almost sure that it has to do something with the dependencies folder since I have no idea where to put it and how to link it.
It's not completely neccessary to use HTTPKit, but I am having quite the same troubles trying to implement CocoaHTTPServer in Theos application.
I will also appreciate any comments on what I am doing wrong while installing Theos and making applications.
How I installed and configured Theos
Installed Theos using the following guide
Downloaded everything from one of the headers repository into
$(THEOS)/include
Downloaded (additionally) IOSurfaceAPI.h from here into
$(THEOS)/include/IOSurface
Making a simple project
1.Created a Theos application using NIC
cd ~
$THEOS/bin/nic.pl
NIC 2.0 - New Instance Creator
------------------------------
[1.] iphone/application
[2.] iphone/library
[3.] iphone/preference_bundle
[4.] iphone/tool
[5.] iphone/tweak
Choose a Template (required): 1
Project Name (required): name
Package Name [com.yourcompany.name]:
Author/Maintainer Name [***]:
Instantiating iphone/application in name/...
Done.
2.Put the whole repository HTTPKit into newly created folder
~/name/HTTPSources
3.Added the following line
name_FILES += $(foreach ext, c cpp m mm x xm xi xmi, $(wildcard
HTTPSources/*.$(ext)))
into the Makefile, so it looks like this
4.Put all files from here into newly created
$THEOS/include/HTTPKit
5.Now the $(THEOS) folder looks like this
6.Calling make now doesnot cause fatal errors (except ldid command, which I guess is not vital) resulting in
~/name/theos/makefiles/targets/Darwin/iphone.mk:41: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for application name...
Copying resource directories into the application wrapper...
Compiling main.m...
Compiling nameApplication.mm...
Compiling RootViewController.mm...
Linking application name...
Stripping name...
Signing name...
/bin/sh: ldid: command not found
Trying to use HTTPKit, getting errors
1.Added HTTPKit import and a few simple lines from the example
HTTPServer * serv = [[HTTPServer alloc] init];
[serv handleGET:#"/hello/*"
with:^(HTTPConnection *connection, NSString *name) {
return [NSString stringWithFormat:#"Hello %#!", name];
}];
into ~/name/main.m so it looks like this
2.Now calling make causes "Undefined symbols for architecture armv7" error
~/name/theos/makefiles/targets/Darwin/iphone.mk:41: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for application name...
Copying resource directories into the application wrapper...
Compiling main.m...
Linking application name...
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_HTTPServer", referenced from:
objc-class-ref in main.m.f3071598.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/name.app/name.ba964c90.unsigned] Error 1
make[1]: *** [internal-application-all_] Error 2
make: *** [name.all.application.variables] Error 2
Additional info
find ~/name
make clean all messages=yes
Try adding
export ARCHS = armv7 arm64
export TARGET = iphone:clang:7.0:7.0
to your makefile.
That fixed a similar error for me. If the error is different would you be so kind as to post the output?
I think you missing library. You only have HTTPServer header but lack of implement. Compile HTTPKit and put it on $THEOS/lib. Then add name_LIBRARIES = nameoflibHTTKit in Makefile

Cannot Compile StellaWare

I am trying to develop applications with Eclipse / Linux for Stellaris Launchpad (LM4F120). I am following this guide: http://kernelhacks.blogspot.de/2012/11/the-complete-tutorial-for-stellaris.html
However, I can't compile StellarisWare with make:
adc.c:1: error: bad value (cortex-m4) for -mcpu= switch
adc.c:1: error: invalid floating point option: -mfpu=fpv4-sp-d16
Obviously for compilation 'cc' instead of arm-*-gcc is used. How can I circumvent this problem?
I am using gcc-arm-none-eabi-4_7-2012q4. I did the following things for both a) the full StellarisWare Package (SW-LM3S-9453.exe) and the one for the Stellaris Launchpad (SW-EK-LM4F120XL-9453.exe):
1. Unzip: ../SW-*.zip
2. Try to compile: make
please follow the instruction in the below article
http://www.embeddedcircle.com/stellaris-lm4f120-launchpad-compiling-in-ubuntu-12-04/
do not forget to set the compiler path as per instruction 4

dlopen() error image not found

I have software that first loads a .dylib lets call libFirst.dylib using the following command:
void* handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_GLOBAL);
Later on inside a function from the loaded libFirst.dylib I attempt to load another .dylib using the same command but for libSecond.dylib, the loading of this shared library gives me the following warnings in my Xcode console:
error warning: Ignored unknown object module at 0x129310 with type 0x8a8399
dlerror: dlopen(/path/libSecond.dylib, 9): Library not loaded: libFirst.dylib
Referenced from: /path/libSecond.dylib
Reason: image not found
What I don't get is that its says libFirst.dylib is not loaded but I am currently inside a function from libFirst.dylib, so how can this be?
All my paths in DYLD_LIBRARY_PATH appear correct too.
Thanks in advance, I have been stuck on this for days.
I ended up using -install_name to change the install name of all my libraries to #rpath/dylibName.dylib and then in Xcode I set the Runpath Search paths using #loader_path to find all my .dylibs that I was using.
use:
install_name_tool -id #executable_path/../Frameworks/mylib.dylib mylib.dylib
then check it with:
otool -D mylib.dylib
I think an easier way to get around this error would be to revert to an earlier version where you were not getting this error. Right click on the project folder and navigate to local history to revert to an earlier version. I verified this to be working on the android studio installed on Mac OS Big sur.