ninja output empty compdb content - android-source

When i tried to integrate Google Kythe system with my own Android source code.
And i found i need to generate compile_commands.json first.
So i run command prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-$target.ninja -t compdb, however generate nothing.
$ prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-venus.ninja -t compdb
[
]
And my version of ninja:
$ prebuilts/build-tools/linux-x86/bin/ninja --version
1.8.2.git
I also created a Helloworld project to do the samething, yet still nothing. Is it a known issue?

OK, it seems only latest ninja process could generate the json file.
so i download from github and compile ninja myself. now it works

Related

yocto opendds does not create the sdknative files

I am trying to build an application that communicates with dds with opendds. I am using the opendds layer on krikstone. The bitbake image is built with the opendds libraries but when I build the sdk it seems the layer nativesdk is not installed. When I run the cmake I get the error "Missing required dependencies OPENDDS_IDL;ACE_GPERF;TAO_IDL".
from the opendds.inc I see there is the nativesdk install. I added a junk line and expected that when i build the opendds or build the populate-sdk I will fail but it seems that the nativesdk is not run.
build is for imx8mm variscite som with command bitbake fsl-image-qt5 -v populate_sdk_ext
layer with the problem is meta-opendds (krikstone branch) building version 3.22
the layer has a bb file that requires an opendds.inc file which has the nativesdk install
Blockquote
do_install:append:class-nativesdk() {
dfdf -- my junk line to trigger failure
ln -sf ${bindir}/opendds_idl ${D}${datadir}/dds/bin/opendds_idl
ln -sf ${bindir}/ace_gperf ${D}${datadir}/ace/bin/ace_gperf
ln -sf ${bindir}/tao_idl ${D}${datadir}/ace/bin/tao_idl
}
Blockquote
** i added a junk line to trigger failure but it doesnt fail with building the sdk or image itself
why is the nativesdk command not run and why is the sdk without the opendds_idl executable
thanks
I was able at last to build the nativesdk files. I had to build them specifically as they are not build by default. i had to "bitbake nativesdk-opendds" manually.
my mistake was to believe that the nativesdk will be defaulted. my assumption is that if i am using the opendds that most probable that i will build subscribers/produces applications and will need the opendds_idl executable.
!!!! after testing the nativesdk-opendds it did not solve the problem !!!
!! in general after adding building the opendds layer i cannot build the Messanger example for lack of the opendds_idl and other two (tao,ace) executable

Xcode 14.0 command PhaseScriptExecution failed with a nonzero exit code

After updating my Xcode to the latest version 14.0. I am facing this issue if anyone know how to resolve it please let me know
Click properties on the project, go to build phases and check the option "For install builds only"
Maybe the problem is with "Run script"
Ex: I did change firebase crashlytics from "pod" to "Packeges".
But I not change script.
I have tried all the solutions in
"https://stackoverflow.com/questions/53289524/xcode-10-2-1-command-phasescriptexecution-failed-with-a-nonzero-exit-code"
My solutions is change TARGETS -> Build Phases. In the script field
form
"${PODS_ROOT}/FirebaseCrashlytics/run"
to
"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
In short the problem is your script, do it right
If Scrip is install builds only. U need
Targets -> Build Phases -> Run Scrip -> check "For install builds only"
Ex:
APP_PATH=“${TARGET_BUILD_DIR}/${WRAPPER_NAME}”
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find “$APP_PATH” -name ‘*.framework’ -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read “$FRAMEWORK/Info.plist” CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH=“$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME”
echo “Executable is $FRAMEWORK_EXECUTABLE_PATH”
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo “Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME”
lipo -extract “$ARCH” “$FRAMEWORK_EXECUTABLE_PATH” -o “$FRAMEWORK_EXECUTABLE_PATH-$ARCH”
EXTRACTED_ARCHS+=(“$FRAMEWORK_EXECUTABLE_PATH-$ARCH”)
done
echo “Merging extracted architectures: ${ARCHS}”
lipo -o “$FRAMEWORK_EXECUTABLE_PATH-merged” -create “${EXTRACTED_ARCHS[#]}”
rm “${EXTRACTED_ARCHS[#]}”
echo “Replacing original executable with thinned version”
rm “$FRAMEWORK_EXECUTABLE_PATH”
mv “$FRAMEWORK_EXECUTABLE_PATH-merged” “$FRAMEWORK_EXECUTABLE_PATH”
done
On my side this issue appeared when i change my computer and issue was caused by Apple Silicon processor. When i start to use m1 pro, i did not check the installation page i directly intalled flutter via Fvm. When i check the installation page i saw there are a few steps to install flutter on Apple Slicon. And these steps fixed the issue;
sudo softwareupdate --install-rosetta --agree-to-license
ref: https://docs.flutter.dev/get-started/install/macos

How to generate C API for onnxruntime on Linux

I am trying to build onnxruntime from source on Linux. According to this instruction I have successfully built python wheels and shared libs. But I have not seen headers for C API.
There is a build option --build_csharp which seems to enable C#/C packages. I tried to add this option but got following errors.
CMake Warning at CMakeLists.txt:137 (message):
Language Csharp is not found in the system
I installed dotnet-sdk-3.1 but still got this error. Can I ask how to properly generate onnxruntime C API on Linux? Thanks!
Please try the following steps:
- Steps to build ONNX from source code:
1. git clone --recursive https://github.com/Microsoft/onnxruntime
2. Get the commit ID of the version you want to build (In case you want older version)
3. git checkout "your commitID"
4. Install the required version of Cmake on your system
6. Run: <path>\build.sh --config Release --build_shared_lib --parallel
7. A build folder will be created in the onnxruntime.
5. Get the onnxruntime.dll from the dir: \onnxruntime\build\Windows\Release\Release
6. Get the required headers (onnxruntime_c_api.h, onnxruntime_cxx_api.h, onnxruntime_cxx_inline.h)
from the dir: \onnxruntime\include\onnxruntime\core\session and put it in the unit location.

List packages which will be included in host Yocto SDK

I'm currently encountering an issue whereby the version of OpenCV being included in the target image is different to that which is being included in the host SDK (3.4.x as opposed to 3.3.x).
In order to better debug this, I want to list the packages (and their versions) which will be included in the host SDK produced by bitbake core-image-weston -c populate_sdk.
How can I do this? Note: I'm using the command line and am not using Toaster.
Thanks in advance.
One good way to debug such package or sdk issues is yocto buildhistory
Add the content below to your local.conf
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"
BUILDHISTORY_FEATURES = "image package sdk" # maybe already default value
A new folder will be created under build/buildhistory/ , which allows you to verify packages, sdk and the image in a easy manner.
Edit:
Since you want it before compiling everything:
bitbake -g core-image-weston -c populate_sdk && cat pn-buildlist | sort | uniq | bitbake -s > dependencies

Unity Failed to Re-package Resources Error

I am getting an error when i try to build my game for android. The error is :
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Users\halil.cosgun\Desktop\ADTBundle\adt_bundle\sdk\build-tools\21.1.1\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/halil.cosgun/Desktop/ADTBundle/adt_bundle/sdk\platforms\android-21\android.jar" -F bin/resources.ap_ --extra-packages com.fusepowered.unitytest:com.google.android.gms:com.unity3d.player:com.google.android.gms -S "C:\Users\halil.cosgun\Desktop\Projects\AmbulanceFirstDeneme\Temp\StagingArea\android-libraries\FuseSDK\res" -S "C:\Users\halil.cosgun\Desktop\Projects\AmbulanceFirstDeneme\Temp\StagingArea\android-libraries\google-play-services_lib\res" -S "C:\Users\halil.cosgun\Desktop\Projects\AmbulanceFirstDeneme\Temp\StagingArea\android-libraries\play-services-base-6.5.87\res"
If I delete the play_game_services_libs folder (play_game_services.jar is in there), the build is successful. But, PlayGamesPlatform.Activate() code is not work. If I delete the FuseSDK, the build is successful. I know there is a conflict between this two plugins, but I didn't figure it out how I fix this problem.
Please help me.
Sincerely.
These are the screenshots my project folder :
Actually I didn't know how I can solve this problem at first. I tried so many ways to solve this error. First of all, I updated my JDK to latest version.(jdk1.8.0.65 - 64bit) - Then I deleted play_game_services_6.5.8.7 and AndroidSupportV4 which is in Plugins/Android/ folder. After that I added FuseSDK prefab to main scene of my project. Finally I hit Build and Run.
Before:
After:
Have a nice day! :)