I recently switched from Bazel 5 to Bazel 6. The following commands generated in the past a working code coverage report for me:
git clone https://github.com/Vertexwahn/FlatlandRT.git
cd FlatlandRT/devertexwahn
bazel coverage --config=gcc11 --instrumentation_filter="[:]" --instrument_test_targets=true --combined_report=lcov -- //...
output_path=$(bazel info output_path)
genhtml "$output_path"/_coverage/_coverage_report.dat -o coverage_report
In Bazel 6 the following error is reported:
genhtml: ERROR: cannot read /home/vertexwahn/dev/FlatlandRT/devertexwahn/external/Imath/src/Imath/ImathMatrixAlgo.h
Any ideas/hints on how to get a proper code coverage report with Bazel 6?
When I remove --instrumentation_filter="[:]" everything seems to work with Bazel 6.0. With Bazel 5.4.0 I do not need remove this flag.
Related
I wanna add notification in my app with flutter_local_notifications but once I add the plugin to my .yaml, my app doesn't run again.
Below is the error
```D8: Program type already present: android.support.v4.app.INotificationSideChannel
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/2.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/3.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/6.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/7.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/8.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/9.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/10.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/11.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/12.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/13.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/14.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/15.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/16.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/17.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/18.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/19.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/20.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/21.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/22.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/23.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/24.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/25.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/26.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/27.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/28.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/29.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/30.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/31.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/32.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/33.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/34.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/35.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/36.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/37.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/38.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/39.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/40.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/41.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/42.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/43.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/44.jar, /Users/macbook/AndroidStudioProjects/restaurant/build/app/intermediates/transforms/dexBuilder/debug/45.jar
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 29s
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See ... for more information on the problem and how to fix it.
Finished with error: Gradle task assembleDebug failed with exit code 1```
Thanks.
First you need to upgrade all the packages that you have to the version where they are compatible with AndroidX. You can know that from the ChangeLog.md of each package on the dart packages page. Next you need to open the android project of your flutter in AndroidStudio, then select Refactor->Migrate to AndroidX. Wait a bit until android studio refactors your project. And the run rebuild project from android studio. It should work then!
something weird is happening and I don't know why (The first time this happens to me).
I have my Cordova project that I'm testing in my iPhone (I work on MacBook Pro), but, the 3rd time I did cordova build ios I noticed somethig weird in my app as nothing had changed. (That happened yesterday)
Since then I've been making changes (even deleting complete files) but it doesn't matter how many times I build, nothing changes in my phone.
When building, it ends with ** BUILD SUCCEEDED ** so I really don't understand why this is happening.
$ cordova build ios
Running command: /Users/myuser/Documents/project/platforms/ios/cordova/build
2015-04-10 10:41:33.992 xcodebuild[1943:1007] [MT] PluginLoading: Required plug-in compatibility UUID A16FF353-8441-459E-A50C-B071F53F51B7 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/myuser/Documents/project/platforms/ios/build/emulator
SDKROOT = iphonesimulator8.2
SHARED_PRECOMPS_DIR = /Users/myuser/Documents/project/platforms/ios/build/sharedpch
VALID_ARCHS = i386
=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET LolApi OF PROJECT LolApi WITH CONFIGURATION Debug ===
Check dependencies
PhaseScriptExecution Copy\ www\ directory build/LolApi.build/Debug-iphonesimulator/LolApi.build/Script-304B58A110DAC018002A0835.sh
cd /Users/myuser/Documents/project/platforms/ios
/bin/sh -c /Users/myuser/Documents/project/platforms/ios/build/LolApi.build/Debug-iphonesimulator/LolApi.build/Script-304B58A110DAC018002A0835.sh
real 0m0.243s
user 0m0.032s
sys 0m0.058s
ProcessInfoPlistFile build/emulator/LolApi.app/Info.plist LolApi/LolApi-Info.plist
cd /Users/myuser/Documents/project/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/sw/bin:/sw/sbin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin"
builtin-infoPlistUtility /Users/myuser/Documents/project/platforms/ios/LolApi/LolApi-Info.plist -genpkginfo /Users/myuser/Documents/project/platforms/ios/build/emulator/LolApi.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -additionalcontentfile /Users/myuser/Documents/project/platforms/ios/build/LolApi.build/Debug-iphonesimulator/LolApi.build/MainViewController-PartialInfo.plist -o /Users/myuser/Documents/project/platforms/ios/build/emulator/LolApi.app/Info.plist
GenerateDSYMFile build/emulator/LolApi.app.dSYM build/emulator/LolApi.app/LolApi
cd /Users/myuser/Documents/project/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/sw/bin:/sw/sbin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/myuser/Documents/project/platforms/ios/build/emulator/LolApi.app/LolApi -o /Users/myuser/Documents/project/platforms/ios/build/emulator/LolApi.app.dSYM
Touch build/emulator/LolApi.app
cd /Users/myuser/Documents/project/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/sw/bin:/sw/sbin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin"
/usr/bin/touch -c /Users/myuser/Documents/project/platforms/ios/build/emulator/LolApi.app
** BUILD SUCCEEDED **
Any ideas?
Edit:
All changes where made in project/www folder, not in project/platform/ios/
I had the same problem, however, I was using Cordova with React and I had npm scripts prepared in package.json:
"cordova:start:ios": "npm run build:cordova && cp -a ./dist/. ./.cordova/www && cd ./.cordova && cordova run ios"
If I used Cordova commands directly cordova build ios the app wouldn't register the changes. Only when I used the command above it would work.
I came across similar issue with somebody using Ionic. They also were bypassing Ionic preset build commands and using Cordova directly, which caused them the same issue.
Recently I am doing some AllJoyn development on iOS and OS X. When I run xcodebuild for alljoyn_darwin.xcodeproj using command line as below:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project alljoyn_darwin.xcodeproj -scheme alljoyn_core_ios -sdk iphoneos -configuration Debug PLATFORM_NAME=iphoneos
I got an error like this:
export variant=normal
/opt/local/bin/scons -u OS=darwin CPU=arm BR=on BINDINGS=cpp SERVICES= WS=off VARIANT=Debug --
scons: *** No SConstruct file found.
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.3.4/SCons/Script/Main.py", line 920, in _main
Command /opt/local/bin/scons failed with exit code 2
** BUILD FAILED **
The following build commands failed:
ExternalBuildToolExecution alljoyn_core_ios
(1 failure)
I really have no idea why I got this, I followed all the instruction in the official site--Build From Source and I am sure I set the correct OPENSSL_ROOT path. I installed scons using Macport and it was installed correctly. I tried double-click the alljoyn_darwin.xcodeproj from finder but I got the same error.
scons: *** No SConstruct file found.
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.3.4/SCons/Script/Main.py", line 920, in _main
Command /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/scons-2.3.4 failed with exit code 2
So I am stuck here. But the thing is I can successfully run AllChatz sample in sdk_14.12 for iOS in iphonesimulator for iPhone6. openssl version is 1.0.2 and I tried build both for alljoyn sdks 14.06 and 14.12. same error happened. I don't know if this is related. Anyone can help here? Many thanks.
The problem is that scons cant find the root-level SConstruct script, which probably doesnt help much as you can see that in the error :)
When you use the "-u", that tells scons to look up the directory structure for the root-level SConstruct script.
SCons must be executed from within the project directory structure. Look for the root-level SConstruct, and make sure you're executing scons from within the project directory structure.
Recently I am trying to build OpenCV with CUDA support, and I met problem while building the module cudaarithm.
OpenCV source: git cloned from : http://github.com/Itseez/opencv.git
OpenCV branch: master branch
OpenCV commit:
`commit 5466e321b8c8f97536002a357e5b7ff49a5d2bf9, on Tue Feb 10 12:17:11 2015 +0000`
CUDA version: CUDA 6.5
Hardware: MacBook Pro (13-inch, Mid 2010)
GPU: NVIDIA GeForce 320M 256 MB
OS Version: OS X Yosemite
Steps I used:
1. cd in OpenCVSource, then mkdir myrelease, and cd myrelease
2. cmake -DPLANTUML_JAR=/usr/local/Cellar/plantuml/8002 -D BUILD_DOCS=1 -DPYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib -DPYTHON2_INCLUDE_DIR=/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DPYTHON3_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib -DPYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/include/python3.4m -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -Wno-dev -DNVCC_FLAGS_EXTRA="-Xcompiler -stdlib=libstdc++; -Xlinker -stdlib=libstdc++" -DOPENCV_EXTRA_CXX_FLAGS=" -stdlib=libstdc++" -DOPENCV_EXTRA_EXE_LINKER_FLAGS="-stdlib=libstdc++" ..
3. make VERBOSE=1
Expect Result: Building success without error
Actual Result: when building OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu, error happend like below:
/Users/Hawk/Documents/study/DIP/OpenCV/OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu(61): *error: identifier "getInputMat" is undefined*
/Users/Hawk/Documents/study/DIP/OpenCV/OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu(67): *error: identifier "getOutputMat" is undefined*
/Users/Hawk/Documents/study/DIP/OpenCV/OpenCVSource/modules/cudaarithm/src/cuda/transpose.cu(92): *error: identifier "syncOutput" is undefined*
Then what action I take:
check the code and I found these undefined symboles are defined in OpenCVSource/modules/core/include/opencv2/core/private.cuda.hpp
check the code and I confrim that the "transpose.cu" file include "opencv2/core/private.cuda.hpp"
check the building log, and I the confirm the private.cuda.hpp is in the search path of header file
cp "opencv2/core/private.cuda.hpp" as another file "opencv2/core/hawk.hpp", and then edit "transpose.cu" to include this new file, and I found
the "undifined symbole error" disapeared.
Although this is a workable workaround, I would like know whether the original OpenCV source cannot be compiled.
All, I think I found the problem cause.
Before I met such problem, I've already build and install OpenCV using older code from the git repo. So that there already have header files in my /usr/local/include/opencv2, especially there is /usr/local/include/opencv2/core/private.cuda.hpp.
However, it is an older one that doesn't define the symbols reporting undefined in above question. At the same time I found during the building nvcc have -I/usr/local/include in the command line, so that it use wrong private.cuda.hpp. As you know it should use the one in OpenCVSource, not the older installed one.
I think the solution is to gracefully remove the original installed OpenCV from my computer, then build again. I am trying and I will report later.
My Jenkins job set for an IOS Project clones (fetches) the code from Bitbucket but fails to run one of the last scripts for building the Xcode project.
The script is called.I get the following error it really does not mean a lot for me.
Has anyone had a similar problem.I am pretty sure that there is something wrong with the project settings since other jobs in the jenkins run perfect.
PhaseScriptExecution Run\ Script
/Users/jenkins/Library/Developer/Xcode/DerivedData/myApp-Workspace-doqiapyymubizteljhyzayqxdtyk/Build/Intermediates/Target.build/Release-iphoneos/Target.build/Script-334A8A5117785D7D001DC5DA.sh
cd "/Users/Shared/Jenkins/Home/workspace/myApp - BETA"
/bin/sh -c /Users/jenkins/Library/Developer/Xcode/DerivedData/myDriveriOSDriver-Workspace- doqiapyymubizteljhyzayqxdtyk/Build/Intermediates/Driver.build/Release-iphoneos/Driver.build/Script-334A8A5117785D7D001DC5DA.sh
fatal: Not a git repository: '/Users/Shared/Jenkins/Home/workspace/myApp - BETA/../.git'
VERSION: 2.1.3.0
2014-01-24 13:54:29.529 defaults[61460:507] Unexpected argument Driver; leaving defaults unchanged.
Command /bin/sh failed with exit code 1
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Run\ Script /Users/jenkins/Library/Developer/Xcode/DerivedData/myApp- Workspace-doqiapyymubizteljhyzayqxdtyk/Build/Intermediates/Target.build/Release-iphoneos/Target.build/Script-334A8A5117785D7D001DC5DA.sh
(1 failure)
The mentioned script sets some environment variables before the fatal error including;
...
setenv YACC yacc
setenv arch armv7s
setenv variant normal
There is a clear error in the log:
fatal: Not a git repository: '/Users/Shared/Jenkins/Home/workspace/myApp - BETA/../.git'
By analyzing your error log I guess that problem is in following statement
cd "/Users/Shared/Jenkins/Home/workspace/myApp - BETA"
instead try
cd "/Users/Shared/Jenkins/Home/workspace/myApp\ -\ BETA"
hope it helps