Missing files in Yocto SDK - sdk

I have some files downloaded by a certain recipe during an Yocto image build. I want to include them in the SDK of the same image.
I add this recipe in TOOLCHAIN_TARGET_TASK.
When I build the SDK based on the my custom image(populate_sdk) these files are missing from the resulting SDK. I can see only some certain header files made for that particular recipe.
I want to know how I can include these files in the SDK build. I didn't find any commands that does that for files for SDKs.
For reference, the files are downloaded by the recipe from this git:
https://github.com/dji-sdk/Onboard-SDK/archive/3.6.zip
The Recipe:
SUMMARY = "DJI Onboard SDK"
SECTION = "libs"
LICENSE_FLAGS = "osdk"
LICENSE = "CLOSED"
PV = "3.6"
SRC_URI = "https://github.com/dji-sdk/Onboard-SDK/archive/${PV}.zip"
FILESEXTRAPATHS_prepend := "${THISDIR}/Onboard-SDK-${PV}:"
TOOLCHAIN_TARGET_TASK_append = " osdk"
S="${WORKDIR}/Onboard-SDK-${PV}"
INSANE_SKIP_${PN} = "dev-so"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
inherit pkgconfig cmake
FILES_${PN} = "usr/lib/* usr/share/*"
FILES_${PN}-dev = "usr/include/*"

Could you please:
- Give us the recipe
- Tell us how you have populated TOOLCHAIN_TARGET_TASK variable ?
Should be something like that:
TOOLCHAIN_TARGET_TASK_append = " <recipename>-staticdev"
Have you add (inside the recipe):
BBCLASSEXTEND = "native nativesdk"
So we need more info to help you :)

Related

Luarocks on windows not recognizing my lua_libdir

i want to install nngraph on lua using luarocks
using this code
luarocks --from=https://raw.githubusercontent.com/torch/rocks/master/ install nngraph
but it's give me an error
it said :
Error: Failed finding Lua library. You may need to configure LUA_LIBDIR.
does anyone have same experience? can you solve it ?
this was my config-5.2.lua :
rocks_trees = {
{ name = [[user]],
root = home..[[/luarocks]],
},
{ name = [[system]],
root = [[d:\shared\ta\_bootstrap\_install\]],
},
}
variables = {
MSVCRT = 'MSVCRT',
LUALIB = 'D:\\Shared\\TA\\_bootstrap\\_install\\lib\\liblua.dll.a',
LUA_LIBDIR = 'D:\\Shared\\TA\\_bootstrap\\_install\\lib'
}
verbose = false -- set to 'true' to enable verbose output
Is your config-5.2.lua file located in one of the searched paths? I installed the stand-alone binaries (with Lua version 5.3), which searches for C:/Program Files (x86)/luarocks/config-5.3.lua & %APPDATA%/luarocks/config-5.3.lua. Neither of these files existed on my system & I had to create one manually. Running the luarocks command without any arguments will show you where it searches. If you want to use a custom location, you can set the LUAROCKS_CONFIG environment variable.
I was able to get mine working by adding the following variables to my configuration (Note: I am using MinGW/GCC compiler):
rocks_trees = {
{ name = [[system]], root = [[C:/Development/Lua53]] },
}
variables = {
LUA = 'C:/Development/Lua53/bin/lua',
LUA_BINDIR = 'C:/Development/Lua53/bin',
LUA_INCDIR = 'C:/Development/Lua53/include',
LUA_LIBDIR = 'C:/Development/Lua53/lib',
CC = 'gcc',
LD = 'gcc',
}
The CC & LD variables are only necessary if it has trouble finding the compiler or linker (defaults to mingw32-gcc on my system).
Sources:
http://lua-users.org/wiki/LuaRocksConfig
http://lua-users.org/lists/lua-l/2015-12/msg00172.html
https://github.com/luarocks/luarocks/wiki/config-file-format
I hope this helps.
Edit: If all else fails, you may want to have a look at LuaDist. It is a Lua distribution with its own package management system & includes LuaRocks & some other libraries/utilities pre-installed. I haven't tried it yet, but I plan to.

Qmake get the target output file path

I have a qmake project that looks like this:
TEMPLATE = lib
CONFIG += dll
TARGET = mydll
SOURCES += ...
HEADERS += ....
Now I want to add an INSTALLS section, so I have:
target.path = /path/to/somedir/
target.files =./$$TARGET
INSTALLS+= target
Unfortunately this will not work, because $$TARGET contains the target name, and not the output file name. Is there a portable way to obtain the output file name? (Please no platform dependent string concatenation like lib + $$TARGET + .so)
You don't have to specify target.files, target is a special case and it's predefined in qmake.
http://qt-project.org/doc/qt-4.8/qmake-environment-reference.html#installs
If you append a built-in install set to the INSTALLS variable and do not specify files or extra members, qmake will decide what needs to be copied for you. Currently, the only supported built-in install set is target:
target.path = /usr/local/myprogram
INSTALLS += target
In the above lines, qmake knows what needs to be copied, and will handle the installation process automatically.

qmake: How to have longer version numbers in .so file name

I'm trying to build a dynamic library on Linux using qmake. Here is my .pro file:
TEMPLATE = lib
TARGET = soTest
DEPENDPATH += .
INCLUDEPATH += .
VERSION = 3.5.2.1
The problem is that when I use qmake to make the so file I get soTest.so.3.5.2, but what I need is soTest.3.5.2.1.
How can I get qmake to use the fourth number? (build number)
Thanks.
Ok,
I figured it out. I used "VER_PAT" which allowed me to put in the last octet.
Thanks.

FTPHelper library not working iOS

Hello I have this code and don't download anything...
FTPHelper *ftp;
ftp.urlString = #"ftp.marignal.com";
ftp.uname = #"whttpapp.marignal.com";
ftp.pword = #"hidden";
ftp.filePath = #"Barcos/Imagenes";
[ftp download:#"catlanza.bmp"];
I'm using this lib: https://github.com/erica/iphone-3.0-cookbook-/tree/master/C13-Networking/15-FTP%20Helper
That method download, It suppose to install the selected file in Documents directory...
Look in the simulator for the path it copied to.
Likely you need to tack on Documents:
ftp.filePath = #"Documents/Barcos/Imagenes";
Or get the path programmatically:
What is the documents directory (NSDocumentDirectory)?

Copy a file to the build directory after compiling project with Qt

I have a file "settings.ini" which needs to reside next to the Qt executable.
I can add a custom build step for this in Qt Creator which calls something like this:
copy %{sourceDir}/settings.ini %{buildDir}/settings.ini
This works great so far, but I'd like to include this in the *.pro file so I can put this up in our SVN too.
How can I do this using qmake/.pro-files only?
To copy %{sourceDir}/settings.ini to the build directory without requiring to call make install use:
copydata.commands = $(COPY_DIR) $$PWD/settings.ini $$OUT_PWD
first.depends = $(first) copydata
export(first.depends)
export(copydata.commands)
QMAKE_EXTRA_TARGETS += first copydata
$$PWD is the path of current .pro file. If your settings.ini file is not located in the same directory than the project file, then use something like $$PWD/more_dirs_here/settings.ini
Note: I found this solution here. I recommend to read the whole article as it explains how it works.
You probably want to use the INSTALLS keyword in QMake. It will require you to run make install after your build, but it does work cross-platform.
install_it.path = %{buildDir}
install_it.files += %{sourceDir}/settings.ini
INSTALLS += install_it
for osx bundles you can handle it this way
see Resource files in OS X bundle
add this to you project file:
APP_QML_FILES.files = path/to/file1.qml path/to/file2.qml
APP_QML_FILES.path = Contents/Resources
QMAKE_BUNDLE_DATA += APP_QML_FILES
this example copies the files to Contents/Resources
Compatible with Windows and Mac OSX Dev environments:
Change {AppName} to respective application name
# Define mac/windows specific target dirs
TARGETDIR = ''
macx {
TARGETDIR += $$OUT_PWD/{AppName}.app/Contents/MacOS/
}
else {
TARGETDIR += $$OUT_PWD
}
# Directories do not exist for the first build
# Without mkdata, build is successful after 5 tries. To avoid, use mkdata
mkdata.commands = $(MKDIR) $${TARGETDIR}
copydata.commands = $(COPY_FILE) $$PWD/settings.ini $${TARGETDIR}
first.depends = $(first) mkdata copydata
export(first.depends)
export(mkdata.commands)
export(copydata.commands)
QMAKE_EXTRA_TARGETS += first mkdata copydata
Happy to add Unix support if someone posts Unix solution in the comments.

Resources