Prior to upgrading to Fedora 24, I would see output from Gradle like the following:
> Loading
> Configuring project 0/20
> Executing test 39 of 4049, 12 skipped.
I've read that users often set TERM=dumb in order to disable this output; however, my TERM environment variable is set to xterm-256color.
Could someone tell me what I need to set or change under Fedora 24 (which seemed to exist in Fedora 23) to allow me to get this Gradle output?
The problem is that Gradle is wanting to use ncurses5 where it seems Fedora 24 install comes with a newer version, thus causing the issue. This can be seen by running gradle --debug and seeing the following output:
[DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Unable to load from native-platform backed Consol
eDetector. Continuing with fallback. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'libnative-pl
atform-curses.so' for Linux amd64.
caused by: java.lang.UnsatisfiedLinkError: /home/dkowis/.gradle/native/19/linux-amd64/libnative-platform-curses.so: libncurses.so.5: c
annot open shared object file: No such file or directory
The temporary solution is to create a symbolic link to the new libncurses.so.6 library as follows:
sudo ln -s /usr/lib64/libncurses.so.6 /usr/lib64/libncurses.so.5
After doing this, Gradle now outputs the build status text as it did previously.
Related
We are trying to setup corda and run the cordapp-example on our macbook using Intellij. I am getting an error which says that the NodeDriver.main() failed but unable to debug as to what the failure is.
This is only explanation of the error:
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/java'' finished with non-zero exit value 132
I am following the setup instructions on https://docs.corda.net/docs/corda-os/4.4/getting-set-up.html and the run instructions from https://docs.corda.net/docs/corda-os/4.4/tutorial-cordapp.html.
Gradle version: 5.4.1
JDK: 1.8.251
The error mostly comes because of the conflicting version of Java. I guess it is because a higher version of Java may be installed on your machine which the system might be defaulting to.
I suggest you should try to check and remove any conflicting Java versions or set Java 1.8 as default.
I have installed docker then java image then jenkins image, now installing its dependencies, gives following error in logs, any Idea how can it be resolved, as I am from rails background so don't have much knowledge about java error and exceptions, please provide suggestions.
May 31, 2020 9:41:30 AM hudson.model.UpdateCenter$DownloadJob run
INFO: Starting the installation of Pipeline: Job on behalf of admin
May 31, 2020 9:41:32 AM hudson.model.UpdateCenter$UpdateCenterConfiguration download
INFO: Downloading Pipeline: Job
May 31, 2020 9:41:33 AM hudson.PluginManager dynamicLoad
INFO: Attempting to dynamic load /var/jenkins_home/plugins/workflow-job.jpi
May 31, 2020 9:41:33 AM hudson.model.UpdateCenter$DownloadJob run
SEVERE: Failed to install Pipeline: Job
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1893)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Failed to install workflow-job plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:874)
at hudson.PluginManager.dynamicLoad(PluginManager.java:813)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1889)
... 5 more
Caused by: java.io.IOException: Pipeline: Job v2.39 failed to load.
- You must update Jenkins from v2.60.3 to v2.138.4 or later to run this plugin.
- Pipeline: API v2.40 failed to load. Fix this plugin first.
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626)
at hudson.PluginManager.dynamicLoad(PluginManager.java:864)
... 7 more
Which Jenkins version did you install?
It seems like plugins not supporting on outdated Jenkins version.
Try to skip plugin installation from 'Getting Started' and install them later.
Also, you can try to use official Jenkins docker images.
https://www.jenkins.io/blog/2018/12/10/the-official-Docker-image/
I had same issue and tried with v2.60.3 and other version as well.
LTS version works and installs plugin.
$ docker pull jenkins/jenkins:lts
$ docker run -p 8080:8080 -p 50000:50000 --name myjenkins jenkins/jenkins:lts
there's deprecation notice in the page as following https://hub.docker.com/_/jenkins?tab=description
I had the same issue, and it's because there was old jenkins configuration in folder "/home/user/.jenkins/" , just delete it o backup it, in order when you new Jenkins Installation start, it going to create a new ".jenkins/" folder with empty conf.
And don't forget that you really has deinstalled old jenkins version.
I'm trying to build java-cef on ubuntu following instructions from https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding.
At cmake step
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
i get
-- Downloading clang-format from Google Storage...
Failed to fetch file gs://chromium-clang-format/942fc8b1789144b8071d3fc03ff0fcbe1cf81ac8 for tools/buildtools/linux64/clang-format. [Err: /home/x/Desktop/jcef/src/tools/buildtools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/boto/boto/pyami/config.py:71: UserWarning: Unable to load AWS_CREDENTIAL_FILE ()
warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)
Failure: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727).
]
Terminal indicates that I'm using Python 2.7.15+.
How can i make it work? Many thanks.
In the folder where it has created the build jcef/src/tools/buildtools/download_from_google_storage.py change the version parameter of gsutil to a recent version, like 4.39. If you don't find specified file use a tool like find.
I created a new Android Studio Project with C++ support and did not add anything to it. The project builds, compiles and runs with CMake. I then added the following two lines of code to CMakeLists.txt at the bottom of the file and I get a CMake build error.
find_package(Java COMPONENTS Development) # Line 47
find_package(JNI REQUIRED) # Line 48
And this is the error I get when building the project
-- Found Java: /usr/lib/jvm/java-10-oracle/bin/java (found version "10.0.1") found components: Development
-- Configuring incomplete, errors occurred!
CMake Error at /home/xxxxx/Android/Sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
See also "/home/xxxxx/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/release/x86_64/CMakeFiles/CMakeOutput.log".
JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
/home/xxxxxx/Android/Sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/home/xxxxxx/Android/Sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/FindJNI.cmake:314 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:48 (find_package)
External native generate JSON release: JSON generation completed with problems
CMake runs when being called form the command line, but fails inside Android Studio for some reason and I am not sure why.
EDIT 1
Here is the CMakeOutput.log file
EDIT 2
This is all that is in CMakeLists.txt file. It compiles in cmd with the command cmake.
cmake_minimum_required(VERSION 3.4.1)
find_package(Java COMPONENTS Development)
find_package(JNI REQUIRED)
This is the cmd output
E:\Users\xxxxx\AndroidStudioProjects\MyApplication\app\build>cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Users/xxxxx/AndroidStudioProjects/MyApplication/app/build
When I try to add it compile it in Android Studio using gradle I get the following error on Windows 10 pro 64 bit
Microsoft Windows [Version 10.0.17134.112]
(c) 2018 Microsoft Corporation. All rights reserved.
E:\Users\xxxxx\AndroidStudioProjects\MyApplication>gradlew build --stacktrace
> Task :app:generateJsonModelDebug
External native generate JSON debug: starting JSON generation
External native generate JSON debug: using platform version 24 for ABI ARMEABI_V7A and min SDK version 24
External native generate JSON debug: noticing that build file 'E:\Users\xxxxx\AndroidStudioProjects\MyApplication\app\CMakeLists.txt' is out of date with respect to E:\Users\xxxxx\AndroidStudioProjects\MyApplication\app\.extern
alNativeBuild\cmake\debug\armeabi-v7a\android_gradle_build.json
External native generate JSON debug: rebuilding JSON E:\Users\xxxxx\AndroidStudioProjects\MyApplication\app\.externalNativeBuild\cmake\debug\armeabi-v7a\android_gradle_build.json due to:
External native generate JSON debug: - a dependent build file changed
External native generate JSON debug: keeping json folder 'E:\Users\xxxxx\AndroidStudioProjects\MyApplication\app\.externalNativeBuild\cmake\debug\armeabi-v7a' but regenerating project
External native generate JSON debug: executing cmake Executable : E:\Android\SDK\cmake\3.6.4111459\bin\cmake.exe
arguments :
-HE:\Users\xxxxx\AndroidStudioProjects\MyApplication\app
-BE:\Users\xxxxx\AndroidStudioProjects\MyApplication\app\.externalNativeBuild\cmake\debug\armeabi-v7a
-DANDROID_ABI=armeabi-v7a
-DANDROID_PLATFORM=android-24
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Users\xxxxx\AndroidStudioProjects\MyApplication\app\build\intermediates\cmake\debug\obj\armeabi-v7a
-DCMAKE_BUILD_TYPE=Debug
-DANDROID_NDK=E:\Android\SDK\ndk-bundle
-DCMAKE_CXX_FLAGS=
-DCMAKE_TOOLCHAIN_FILE=E:\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake
-DCMAKE_MAKE_PROGRAM=E:\Android\SDK\cmake\3.6.4111459\bin\ninja.exe
-GAndroid Gradle - Ninja
jvmArgs :
CMake Error at E:/Android/SDK/cmake/3.6.4111459/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
E:/Android/SDK/cmake/3.6.4111459/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
E:/Android/SDK/cmake/3.6.4111459/share/cmake-3.6/Modules/FindJNI.cmake:314 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
See also "E:/Users/xxxxx/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
Solved with
sudo apt-get install -y openjdk-8-jdk
sudo apt-get install -y default-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
As the CMake version bundled with Android tries to tell you, it can't find the JNI package because some parts were missing:
missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH
Checking the documentation for FindJNI (https://cmake.org/cmake/help/latest/module/FindJNI.html) these variables are set to the locations of libraries and headers not shipped with the Android version of JNI (to little surprise, Android does not included the AWT library for instance).
When running find_package(JNI REQUIRED), the FindJNI code checks if these variables are set and if not, issues an error.
A workaround is to set these variables yourself, before calling find_package:
# We are only interested in finding jni.h: we do not care about extended JVM
# functionality or the AWT library.
set(JAVA_AWT_LIBRARY NotNeeded)
set(JAVA_JVM_LIBRARY NotNeeded)
set(JAVA_INCLUDE_PATH2 NotNeeded)
set(JAVA_AWT_INCLUDE_PATH NotNeeded)
find_package(JNI REQUIRED)
Be aware though, that your code will only be able to use jni.h and its functionality: if it tries to access any other part of the JNI package it will fail (probably at compile time) because essentially, you have tricked CMake into thinking that the entire package was found, when in reality only a part of it exists in the Android setup.
I found a solution that works for me:
cmake_minimum_required(VERSION 3.10)
project("ktaglib")
set(JAVA_AWT_LIBRARY "$ENV{JAVA_HOME}/lib/libjawt.so")
set(JAVA_JVM_LIBRARY "$ENV{JAVA_HOME}/lib/server/libjvm.so")
set(JAVA_INCLUDE_PATH "$ENV{JAVA_HOME}/include")
set(JAVA_INCLUDE_PATH2 "$ENV{JAVA_HOME}/include/linux")
set(JAVA_AWT_INCLUDE_PATH "$ENV{JAVA_HOME}/include")
find_package(JNI REQUIRED)
You must set the environment variable JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" beforehand.
More info: https://github.com/dockcross/dockcross/issues/576
Same on alpine:edge docker image, fixed using:
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
RUN apk add --no-cache openjdk8
ref: https://pkgs.alpinelinux.org/contents?branch=edge&name=openjdk8&arch=x86_64&repo=community
Problem
I'm attempting to create a Bitbake recipe which will install Oracle JRE 8 onto my target OS.
I've tried to use metadata from meta-oracle-java, but had some difficulties due to one of the .inc files which are provided for general JREs has a JRE-7-specific URI.
I've changed some of the metadata from meta-oracle-java and created my own recipe to do this install.
Tests
A Build of the JRE Recipe by Itself
When building the recipe by itself:
bitbake oracle-jse-jre
The build completes without error. I've added a dependency on libav into the oracle-jse-jre recipe, so I can do the following from TMPDIR:
$ find . -name libavformat*so
./work/core2-64-poky-linux/libav/9.18-r0/sysroot-destdir/usr/lib/libavformat.so.54.20.4
./work/core2-64-poky-linux/libav/9.18-r0/sysroot-destdir/usr/lib/libavformat.so
./work/core2-64-poky-linux/libav/9.18-r0/sysroot-destdir/usr/lib/libavformat.so.54
./sysroots/genericx86-64/usr/lib/libavformat.so.54.20.4
./sysroots/genericx86-64/usr/lib/libavformat.so
./sysroots/genericx86-64/usr/lib/libavformat.so.54
Runtime Dependency Success
If I add the default package from the oracle-jse-jre recipe to RDEPENDS_${PN} of another recipe xenoros_0.1.bb, I can run bitbake xenoros and build without errors.
Core Image Failure
If I add xenoros to the IMAGE_INSTALL variable of a core-image-xenoros, the build fails with the following error:
ERROR: Unable to install packages. Command '/home/presslertj/yocto-OS/poky-jethro-build/build/tmp/sysroots/x86_64-linux/usr/bin/smart --log-level=warning --data-dir=/home/presslertj/yocto-OS/poky-jethro-build/build/tmp/work/genericx86_64-poky-linux/core-image-my-server/1.0-r0/rootfs/var/lib/smart install -y message-generation#core2_64 catkin#core2_64 python-distutils#core2_64 ldd#core2_64 xenoros#core2_64 rosgraph#core2_64 gedit#core2_64 actionlib#core2_64 python-compression#core2_64 dhcp-server#core2_64 libpthread-stubs#core2_64 tf2#core2_64 python-email#core2_64 catkin-dev#core2_64 git#core2_64 rosbash#core2_64 python-json#core2_64 python-wstool#core2_64 connman#core2_64 ros-config#core2_64 packagegroup-core-boot#genericx86_64 libsdl-1.2-0#core2_64 rosjava#core2_64 quagga#core2_64 nginx#core2_64 rospy#core2_64 apt#core2_64 libc6#core2_64 netcat#core2_64 shadow#core2_64 bash#core2_64 roscpp#core2_64 roslaunch#core2_64 run-postinsts#all python-rosinstall#core2_64 elfutils#core2_64 openssl#core2_64 font-alias#all gradle#core2_64 python-catkin-pkg#core2_64 catkin-runtime#core2_64 catkin-runtime-dev#core2_64 pciutils#core2_64 base-passwd#core2_64' returned 1:
Loading cache...
Updating cache... ######################################## [100%]
Computing transaction...error: Can't install oracle-jse-jre-1.8.0-u77r0#core2_64: no package provides libavformat.so.53(LIBAVFORMAT_53)(64bit)
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/presslertj/yocto-OS/poky-jethro-build/build/tmip/work/genericx86_64-poky-linux/core-image-my-server/1.0-r0/temp/log.do_rootfs.22073
ERROR: Task 7 (/home/presslertj/yocto-OS/poky-jethro-build/meta-myLayer/recipes-core/images/core-image-my-server.bb, do_rootfs) failed with exit code '1'
Looking inside TMPDIR, I can find this:
/sysroots/genericx86-64/usr/lib/libavformat.so.54
It seems there's a version mismatch, where smart expects version 53, but 54 is provided.
Reverting libav's version
Just to test what's going on, I've made a recipe which fetches version 0.8.17 of libav (which uses version 53). When using this instead of 9.18, I have the exact opposite problem, that smart expects but can't find version 54.
Questions
How does smart determine the version number for these shared object files?
What about the do_rootfs() task causes the build to fail at this specific time?
Is there a simple resolution to my specific problem?
1) It's not smart, but rather rpmbuild, that is adding dependencies derived from the ELF DT_NEEDED field (see elfutils -a).
2) The do_rootfs() task is failing because of unresolved dependencies.
3) Since you are using Poky/Yocto and rpm5, there is a simple way to mask the issue (substituting whatever dependencies are causing you heartburn)
echo "unresoved_dependency" > /etc/rpm/sysinfo/Providename
That is just a band-aid; you still need to figure out the packaging issues rather than masking the underlying problem with how you are building rpm packages.
For anyone that still encounter this error: as stated in the README file of the meta-oracle-java repo
There are some known install problems for JRE packages due to dependencies reported by RPM package manager.
Switching to DEB or IPK packaging temporarily fixes this.
ie:
PACKAGE_CLASSES = "package_deb"
or
PACKAGE_CLASSES = "package_ipk"
in your 'local.conf' file