Using Scons to build Alljoyn Thin App for Arduino - arduino

I am trying to get familiar with Alljoyn Thin Core Library (15.09) and my current goal is to run the example from AJTCL_DIR\src\target\arduino\examples\AJ_LedService. The problem is I am not familiar with the Scons and there seems to be no guide for building AJTCL for arduino target (Arduino + freeRTOS is not what I need). Can anyone help me with building that library for Arduino, because my attempts to buid that with scons failed.scons buid output

For me the way to solve this problem was to edit file Sconscript.target.arduino.
I replaced these lines:
`# Install the .c files as .cpp files for the Arduino IDE to consume.
srcs = [
Glob('src/*.c'),
Glob('src/target/$TARG/*.c'),
Glob('src/crypto/*.c'),
Glob('external/sha2/*.c')
]`
with following:
`# Install the .c files as .cpp files for the Arduino IDE to consume.
srcs = []
srcs.extend(Glob('src/*.c'))
srcs.extend(Glob('src/target/$TARG/*.c'))
srcs.extend(Glob('src/crypto/*.c'))
srcs.extend(Glob('external/sha2/*.c'))`.
So list srcs contains file objects, not the list of file objects. After applying these changes lib was build successfully, but i stil have some problems with compilation.

In the "SConscript.target.arduino" file, change the variable with the correct path.
arduinoLibDir = '#dist/arduino_due/libraries/AllJoyn/'
Try;
scons WS=off VARIANT=debug TARG=arduino

I am not very sure if the builds(working) for Arduino are available yet. There is some work going on, to get the Arduino builds running.
here is the link to one of mails on the Allseen Core Working List.
Allseen Core Mailing List
I had tried to build them, even thought it built successfully i still had a few unreferenced libraries and hence the AJ_LedService example would not compile.!

Related

grpc-java - java_plugin not found

I am trying to get a program running. I installed grpc-java in one of my folders on linux. I did ../gradlew publishToMavenLocal for grpc-java and it was successful but I don't find anything generated in /usr/local. How to resolve the compile error below and make sure java-plugin is found? Any pointers? I am new to linux.
compiling route
/usr/local/grpc/java-plugin-1.15.0/exe/java_plugin/protoc-gen-grpc-java: program not found or is not executable
--grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1.
grpc is not executable binary (it is a library). anyways, the output of publishToMavenLocal should be in ~/.m2/ directory if you haven't override default.
if you want to compile grpc, please read COMPILING.md.
i recommend to follow https://grpc.io/docs/quickstart/java/

How install qt libraries near to executable file

There was such a problem: using cmake to install the compiled executable in a certain directory, along with all the dependent libraries (qt), so that later this folder could be simply transferred to another computer, with the same architecture (and installed packages, like built-essential). And do it on two systems: linux & windows. And there are two problems:
what are the dependencies of Qt libraries and how to identify them with cmake (if it possible)?
when using install(FILES $<TARGET_FILE:Qt5::some_packet> DESTINATION bin) on Linux, the following libraries will be copied: libQt5some_packet.so.5.11.1 and when you try to start the program, it will immediately declare that it cannot find the corresponding libraries. And the command export LD_LIBRARY_PATH=/install path/bin haven't any result.
UDP i find how fix problem 2:
install(FILE $<TARGET_SONAME_FILE:Qt::some_package> DESTINATION bin)
but first problem (for windows) is open.
You can use Dependency Walker to get the complete list of dll dependencies

Can I get source code from PyInstaller generated package?

Seems the PyInstaller put all the python script into the executable file, and when run this file, it start PyInstaller bootloader first, then prepare a temp python environment add run the scripts.
So I wonder whether my source code are safe. Can I get the source code from the package when running the executable file?
PyInstaller includes the byte compiled (.pyc) files of your program but not the original source (.py) files. You don't even need to run the executable to get the .pyc files. There are more or less working Python decompilers that turn compiled byte code (.pyc) into equivalent source code (.py).
You need to assess whether this protection is good enough for your purposes. However as a friendly suggestion, I recommend first inventing/writing something that people will want to copy before worrying about how to protect it.

Cant use shared libraries in Qt project

I created a C++ library project in Qt creator. After building the project I have the libMylib.so, .so.1, .so.1.0, .so.1.0.0, Makefile and mylib.o files. I added the library headers to my other project and added the path to my .pro file like this:
LIBS += "/home/peter/Workspace/build-Libtester-Desktop-Release/libMyLib.so"
When building the application I don't get no such file error, but when running it I get this:
/home/peter/Workspace/build-Libtester-Desktop-Debug/Libtester: error while loading shared libraries: libMyLib.so.1: cannot open shared object file: No such file or directory
which I can't understand, because it's right there next to the .so which it seem to find, because when the path is wrong I get a no such file or directory error when trying to build the project.
Could someone explain what I'm missing here?
Thanks for your time.
Fortunately, your problem has nothing to do with both Qt and Qt Creator. The error simply boils down to how shared libraries are searched by LD for dynamic linking on Unix OS family.
Today, I've answered similar question, have a look, please. This question was asked in regard to Mac OS X. However, Linux and Mac OS X are the same in the context of your problem. I've provided additional explanation for Linux at the bottom, so pay attention to it. "it's right there next to the .so" - you seem to have Windows background if you make this assumption, but it is wrong for Unix OS family altogether (as stated in the answer too). If you have further questions, just ask.
You are adding the library incorrectly. You are doing:
LIBS += "/home/peter/Workspace/build-Libtester-Desktop-Release/libMyLib.so"
instead of:
LIBS += -L"/home/peter/Workspace/build-Libtester-Desktop-Release" -lMyLib
The first version works on windows, but not linux.
Basically, you create a library, which will be named "libMyLib.so", and then you specify the path to its folder, prepended by "-L" and then do "-lMyLib" at the end, note that it's not "-llibMyLib", but just "-lMyLib", despite the fact that the .so name is "libMyLib".
Look here: https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application for more info.

Partial compilation of openwrt project

I would like to get an idea or reference to compile only subset on the openwrt project.
i am aware of the menuconfig utility but this is not enough for my goal.
i would like to compile only the tool-chain (binutils + gcc + glibc) for a specific target (ar71xx) and also the kernel.
now, after looking in the makefiles etc, i have noticed that most of the work in actually patching the toolchain and the kernel and then compile it. is there any option to stop build process after the patching so i can have only the source code patched and i can write my own make file to compile it?
To prepare (patch) toolchain independently:
make toolchain/{clean,prepare} V=99
To extract the kernel source and patch it:
make target/linux/{clean,prepare} V=99
The patched kernel source will be in build_dir/linux-$(target)/linux-$(version)

Resources