Light Service Framework Fails to build if original readme followed - service

If we follow original readme for building LSF, its keep failing at the first step.
As soon as I run "scons" I get:
scons: Reading SConscript files ... Checking c++ compiler support for
-std=c++11 flag... yes Using OpenSSL crypto GTEST_DIR not specified skipping common unit test build GTEST_DIR not specified skipping About
Service unit test build GTEST_DIR not specified skipping alljoyn_core
unit test build
scons: warning: Ignoring missing SConscript
'/home/dms/lighting_alljoyn_poligon/base/config/cpp/SConscript' File
"/home/dms/lighting_alljoyn_poligon/core/service_framework/SConscript",
line 28, in GTEST_DIR not specified skipping LSF unit test
build
scons: warning: Ignoring missing SConscript
'/home/dms/lighting_alljoyn_poligon/core/ajtcl/SConscript' File
"/home/dms/lighting_alljoyn_poligon/core/service_framework/SConscript",
line 164, in AttributeError: 'NoneType' object has no
attribute 'Append': File
"/home/dms/lighting_alljoyn_poligon/core/service_framework/SConstruct",
line 5: env.SConscript('SConscript') File
"/usr/lib/scons/SCons/Script/SConscript.py", line 546: return
_SConscript(self.fs, *files, **subst_kw) File "/usr/lib/scons/SCons/Script/SConscript.py", line 260: exec file
in call_stack[-1].globals File
"/home/dms/lighting_alljoyn_poligon/core/service_framework/SConscript",
line 166: lamp_service_env.Append(LIBPATH = [
lamp_service_env.Dir('../ajtcl') ])
The warnings can be ignored, but at the bottom the append related issues are causing the stop of building process.
By the way I have built alljoyn framework including base services and it works perfect.
Any hint is welcomed!

The problem was in the structure of the files.
The original SConsript file of LSF tries to access ../../base_tcl folder, but the base_tcl folder was located under services/ folder.
I have tried two solutions and both worked:
1. Either you change the path to the base_tcl folder in the SConscript
2. Or the folder base_tcl can moved to the proper path
I think this issue was caused because of version problem. The difference between 15.04 and 15.09

Related

Getting 'Multiple commands produce' error with duplicate output file warning in Xcode 13.0

I am getting below multiple commands produce error while running the application in Xcode 13.0.
Multiple commands produce '/Users/XYZ/Library/Developer/Xcode/DerivedData/AppName-dsntzothkrspqbfirwzgyvntjirn/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/GoogleAppMeasurement/AdIdSupport/GoogleAppMeasurement.framework':
1) That command depends on command in Target 'GoogleAppMeasurement' (project 'Pods'): script phase “[CP] Copy XCFrameworks”
2) That command depends on command in Target 'GoogleAppMeasurement-AdIdSupport' (project 'Pods'): script phase “[CP] Copy XCFrameworks”
And also getting duplicate output file warning as mentioned below: -
duplicate output file '/Users/XYZ/Library/Developer/Xcode/DerivedData/AppName-dsntzothkrspqbfirwzgyvntjirn/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/GoogleAppMeasurement/AdIdSupport/GoogleAppMeasurement.framework' on task: PhaseScriptExecution [CP] Copy XCFrameworks /Users/asif.raza/Library/Developer/Xcode/DerivedData/AppName-dsntzothkrspqbfirwzgyvntjirn/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleAppMeasurement-AdIdSupport.build/Script-CAAD1E7A7F15E98CC87B30D71A33FD1C.sh
Could someone please help me out to resolve this issue?
Thanks in advance.
Solution found: After removing below ‘Pods_AppName.framework’ from ‘Link Binary With Libraries’ in Build Phases as showing disabled. Removed all derived data then Clean Build folder and and run.

Does a recipe provided as DEPENDS can have own do_install() in yocto?

I am trying to build a custom recipe with Yocto (Rocko) for my Linux i.MX6 based embedded system.
The main recipe had dependency on a other custom recipe(as the main recipe is using header-files from this recipe) which is also creating some binaries which needs to be included in the final image.
I have added other_recipe(nbdkit) in the "DEPENDS" of main_recipe.bb
DEPENDS += "nbdkit"
the main recipe is creating a .so with the help of its own source file which is including header-files from the 'kit' recipe. I am able to install the binaries & .so generated using this main_recipe by adding it in do_install().
Now in the other_recipe(nbdkit http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/nbdkit/nbdkit_git.bb?h=master), When I add do_install()to include the binaries generated from that recipe the main_recipe build gets failed with PKG_CONFIG error as follow,
| Package nbdkit was not found in the pkg-config search path.
| Perhaps you should add the directory containing `nbdkit.pc'
| to the PKG_CONFIG_PATH environment variable
| No package 'nbdkit' found
Other build errors says that the header-files of kit included in the main_recipe is not found.
app-nbdkit-plugin.c:2:10: fatal error: nbdkit-plugin.h: No such file or directory
Where app-nbdkit-plugin.c is source file of main_recipe & kit-plugin.h is header file of other_recipe.
The strange thing is, when I remove do_install() from other_recipe(nbdkit) the main_recipe is getting built successfully.
Now I doubt, Is it possible to set a recipe as DEPENDS of other recipe and at the same time it provides output file as do_install()?
Will sharing header-files from other_recipe to main_recipe resolves the issue? If yes, how to do that?
Thanks.
[EDIT] Added nbdkit recipe link.

Can not build a mex file in octave using mkoctfile --mex

I am trying to build a mex file in octave. The Octave instructions says that we need to use mkoctfile --mex to build one. The file I am trying to build is in the following path:
> C:\devwork\Octave\boosted\toolbox\channels\private\rgbConvert.cpp
When I write
> mkoctfile --mex rgbConvert.cpp
I get the following error:
> g++: error: rgbConvert.cpp: No such file or directory g++: fatal
> error: no input files compilation terminated.
Note: My current directory is set correct. It is at \devwork\Octave\boosted\toolbox\channels\private
Can some one explain me why am I getting this error.
The problem is resolved using: mkoctfile --mex -DMATLAB_MEX_FILE rgbConvertMex.cpp
Hence, if you want to convert any Matlab compiled .mex file to Octave executable file, do the following two steps:
Modify wrappers.hpp file by adding #include <stdlib.h>
Save the file.
Simply run: mkoctfile --mex -DMATLAB_MEX_FILE file_name
.o file will be created.
I did it using the same and it worked fine.
Eskapp was grateful enough to release the Octave compiled MEX files. You'll need to manually add the files to the main toolbox.Please find the link here:
https://github.com/Eskapp/Piotr_vision_extrafiles_Octave
Hope it helps others :)

How to use SCons lex builder with variant directories

I'm trying to build a complex application with flex lexer using SCons. To build debug/release variants I'm using VariantDir().
The problem is that I can't force lex builder to generate lexer header in variant build directory. It isn't a big problem itself but it forces SCons to think that lexer is always out of date.
SConstruct contents:
VariantDir('build', '.', duplicate=0)
SConscript('build/SConscript')
SConscript contents:
env = Environment(LEXFLAGS='--header-file=scanner.h')
env.Program(target='scanner', source='scanner.l')
Full source to represent this problem is here: https://gist.github.com/g7r/4257f273715cadcf0d36
First scons.py --debug=explain run gives us this:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
scons: building `build/scanner.c' because it doesn't exist
flex --header-file=scanner.h -t scanner.l > build/scanner.c
scons: building `build/scanner.o' because it doesn't exist
gcc -o build/scanner.o -c build/scanner.c
scons: building `build/scanner' because it doesn't exist
gcc -o build/scanner build/scanner.o
scons: done building targets.
Second run gives this:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
scons: building `build/scanner.h' because it doesn't exist
flex --header-file=scanner.h -t scanner.l > build/scanner.c
scons: done building targets.
So second run rebuilds the lexer because scanner.h was generated in root directory instead of build directory.
Am I doing something wrong? Is there any way to do it right?
Consider combining the call to VariantDir() with the call to SConscript() which usually makes the paths in the build scripts more intuitive. Also, I suspect (unfortunately) the call to VariantDir() is confusing the SCons flex builder.
Here is an example:
SConscript('SConscript', variant_dir='build', duplicate=0)
Chapters 14 and 15 of the SCons user's guide give a good explanation of the SConscript() function.
For anyone hitting this old problem via a search - the problem isn't variant dirs per se, it's the use of the --header-file option and being in a subdirectory: SCons passes LEXFLAGS on as is when flex is called, but also extracts the header file name you asked for and adds it as a target - at which point it's subject to the SCons path interpretation rules, as in "relative to the directory of the SConscript", so flex generates the file one place via the issued command and SCons thinks it's a different place, thus the "always out of date". There's more on this topic at https://github.com/SCons/scons/issues/4154.

Including Zend library issue

I'm new to Zend. I've download the latest version and followed the instructions to install it but I'm having trouble including the library.
So far I've saved the entire Zend folder to my local host file. Which is the 'sites' folder located in the user folder.
As advised I have altered the php.ini file to include the path of the library as so:
;include_path = ".:/php/includes"
;include_path = ".:/Users/myusername/Sites/ZendFramework20/library"
However when I attempt to run one of the zend demo scripts I get an error:
Warning: require_once(Zend/Registry.php) [function.require-once]: failed to open stream: No such file or directory in /Users/Sumbop/Sites/ZendFramework20/demos/Zend/Wildfire/public/index.php on line 27
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Registry.php' (include_path='.:') in /Users/Sumbop/Sites/ZendFramework20/demos/Zend/Wildfire/public/index.php on line 27
I've searched and tried many things to no avail. How do I get this working? Or find a guide?
Thanks
Your include path is wrong.
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Registry.php' (include_path='.:') in /Users/Sumbop/Sites/ZendFramework20/demos/Zend/Wildfire/public/index.php on line 27
You may use next code (somewhere in index.php - best would be first line) to set it.
set_include_path($pathWhereZendFolderIsLocated . PATH_SEPARATOR . get_include_path());