Rapsbian and Qt5 - qt

I'm developing an application using qt5.11 on Raspberry Pi 3. My code works on my laptop with ubuntu 18.xx. When I put my code on the RPi, I can compile it with the Makefile make -j2 but when I want to launch my program I get the following message:
16:02:44: Starting /home/pi/build-VideoProcessor-Desktop-Debug/VideoProcessor...
**libEGL warning: DRI2: failed to authenticate**
**qt5ct: using qt5ct plugin**
(VideoProcessor:985): GLib-GObject-WARNING **: 16:02:55.208: cannot register existing type 'GtkWidget'
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(VideoProcessor:985): GLib-GObject-WARNING **: 16:02:55.208: cannot register existing type 'GtkBuildable'
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
(VideoProcessor:985): GLib-CRITICAL **: 16:02:55.208: g_once_init_leave: assertion 'result != 0' failed
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_register_static: assertion 'parent_type > 0' failed
I don't understand what's going on with my RPi because my code works with my laptop.

I believe this problem is because you do not have OpenGL support enabled.
Run:
sudo raspi-config
Then pick:
Advanced Options
GL Driver
GL (Fake KMS)
That should make things work after a reboot.
This will eliminate this error : libEGL warning: DRI2: failed to authenticate.

Related

Why does the sbt tutorial fail on adding the plugin?

I'm working thru the sbt introductory tutorial at https://www.scala-sbt.org/1.x/docs/sbt-by-example.html and when I reload after the step "Add sbt-native-packager plugin" which adds a plugin, it fails, with many warnings and errors, to a prompt of "Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?" At that point sbt has basically died. I will append a full capture of the errors.
I believe I followed all instructions. What is going wrong?
I have tried:
Restarting sbt
Undoing the latest code the tutorial asked for (plugins.sbt and changes in build.sbt) and restarting sbt. Then sbt is live again, but of course as soon as I add the code back it dies again.
Adding resolvers for other repos that I know of,
The built-in resolvers mentioned in https://www.scala-sbt.org/1.x/docs/Resolvers.html
resolvers += "apache-repo" at "https://repo.maven.apache.org/maven2/com/typesafe/"
resolvers += "lightbend" at "https://repo.lightbend.com/typesafe/releases/"
resolvers += "lightbend" at "https://repo.lightbend.com/typesafe/ivy-releases/"
Totally replacing the "resolvers" variable in case an early one was poisoning the process.
Changing the requested version from "1.3.4" to other versions of sbt-native-
packager that I know exist. Basically the same story with different version numbers.
As I am new to Scala and sbt, I may be missing something elementary, but I'm just not seeing it.
Here is the complete error log:
[info] Loading settings for project foo-build-build from plugins.sbt ...
[info] Loading project definition from /home/tehom/projects/ic-fab/foo-build/project
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.sbt:sbt-native-packager:1.3.4 (sbtVersion=1.0, scalaVersion=2.12)
[warn]
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.3.4
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.3.4/sbt-native-packager-1.3.4.pom
[error] not found: /home/tehom/.ivy2/local/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml
[error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:246)
[error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$34(CoursierDependencyResolution.scala:215)
[error] at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:215)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
[error] at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2947)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:290)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.3.4
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.3.4/sbt-native-packager-1.3.4.pom
[error] not found: /home/tehom/.ivy2/local/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
I found out what was going wrong - approximately, anyways. Sbt and Java underneath it seemed to have had outdated security certificates. Odd, as I just installed it this week.
The command:
sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
updated the relevant certificates and then it worked.

Error in invoking target 'client_sharedlib' of makefile oracle 11g centos 7

Hi please help me to solve this problem , thank you
I got stuck during installation of oracle 11g on CENTOS 7 and faced this error
"Error in invoking target 'client_sharedlib' of makefile
'/u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk'. See
'/u01/app/oraInventory/logs/installActions2017-10-17_03-27-55PM.log'
for details."
and this is my log file :
INFO: /u01/app/oracle/product/11.2.0/db_1/bin/genclntsh
INFO: /bin/ld: cannot find -lstdc++_nonshared
INFO: collect2: error: ld returned 1 exit status
INFO: genclntsh: Failed to link libclntsh.so.11.1
INFO: make: *** [client_sharedlib] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'client_sharedlib' of makefile '/u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2017-10-17_03-27-55PM.log' for details.
Exception Severity: 1
Please try
# yum install make
# yum install gcc

How to install sbt on Google Cloud compute engine VM?

I go through the steps mentioned in the debian package installation procedure on the official sbt website. These steps work locally on my Ubuntu machine, however the same steps do not work in a Google Cloud Compute Engine VM. When I run sbt, I get the following error:
Getting org.scala-sbt sbt 0.13.8 ...
:: problems summary ::
:::: WARNINGS
module not found: org.scala-sbt#sbt;0.13.8
==== local: tried
/home/<homedir>/.ivy2/local/org.scala-sbt/sbt/0.13.8/ivys/ivy.xml
-- artifact org.scala-sbt#sbt;0.13.8!sbt.jar:
/home/<homedir>/.ivy2/local/org.scala-sbt/sbt/0.13.8/jars/sbt.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.8/sbt-0.13.8.pom
-- artifact org.scala-sbt#sbt;0.13.8!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.8/sbt-0.13.8.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.8/ivys/ivy.xml
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.8/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.8: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
Server access Error: java.lang.RuntimeException: Unexpected error:
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.8/sbt-0.13.8.pom
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.8/sbt-0.13.8.jar
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.8/ivys/ivy.xml
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.8/ivys/ivy.xml
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.8: not found
Error during sbt execution: Error retrieving required libraries
(see /home/<homedir>/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.8

How to create a new project with activator for Lagom

Just downloaded and installed the last version of the activator (1.3.10) following this guide.
The location where I installed the activator distro is writable and activator-1.3.10/bin was added to my $PATH.
Then, I tried to create a new project like this:
activator new test-project lagom-scala
... but I always get the following errors:
j3d#gonzo:~/Projects$ activator new test-project lagom-scala
Getting com.typesafe.activator activator-launcher 1.3.10 ...
:: problems summary ::
:::: WARNINGS
module not found: com.typesafe.activator#activator-launcher;1.3.10
==== local: tried
/home/j3d/.ivy2/local/com.typesafe.activator/activator-launcher/1.3.10/ivys/ivy.xml
-- artifact com.typesafe.activator#activator-launcher;1.3.10!activator-launcher.jar:
/home/j3d/.ivy2/local/com.typesafe.activator/activator-launcher/1.3.10/jars/activator-launcher.jar
==== activator-launcher-local: tried
file:/opt/activator-1.3.10-minimal/repository/com.typesafe.activator/activator-launcher/1.3.10/ivys/ivy.xml
==== Maven Central: tried
https://repo1.maven.org/maven2/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.pom
-- artifact com.typesafe.activator#activator-launcher;1.3.10!activator-launcher.jar:
https://repo1.maven.org/maven2/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.jar
==== typesafe-releases: tried
https://repo.typesafe.com/typesafe/releases/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.pom
-- artifact com.typesafe.activator#activator-launcher;1.3.10!activator-launcher.jar:
https://repo.typesafe.com/typesafe/releases/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.jar
==== typesafe-ivy-releasez: tried
https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.activator/activator-launcher/1.3.10/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: com.typesafe.activator#activator-launcher;1.3.10: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.pom
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.jar
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.typesafe.com/typesafe/releases/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.pom
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.typesafe.com/typesafe/releases/com/typesafe/activator/activator-launcher/1.3.10/activator-launcher-1.3.10.jar
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.activator/activator-launcher/1.3.10/ivys/ivy.xml
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: com.typesafe.activator#activator-launcher;1.3.10: not found
Error during sbt execution: Error retrieving required libraries
(see /home/j3d/.sbt/boot/update.log for complete log)
Error: Could not retrieve activator-launcher 1.3.10
Any help would be really appreciaded.
Googling further I've found there is an issue on Ubuntu that can be solved as described here. I hope it helps.

Where is the origin for the sbt error below?

The problem looks like below:
:: problems summary ::
:::: WARNINGS
module not found: org.scala-sbt#sbt;0.13.7
==== local: tried
/home/jiakui/.ivy2/local/org.scala-sbt/sbt/0.13.7/ivys/ivy.xml
-- artifact org.scala-sbt#sbt;0.13.7!sbt.jar:
/home/jiakui/.ivy2/local/org.scala-sbt/sbt/0.13.7/jars/sbt.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.7/ivys/ivy.xml
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.7/sbt-0.13.7.pom
-- artifact org.scala-sbt#sbt;0.13.7!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.7/sbt-0.13.7.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.7: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.7/ivys/ivy.xml
Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.7/sbt-0.13.7.pom
Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.7/sbt-0.13.7.jar
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.7: not found
Error during sbt execution: Error retrieving required libraries
(see /home/jiakui/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.7
+ exit 1
I finally found a workaround.
Run this at command line:
sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
The issue seems to be related to this one: https://github.com/docker-library/openjdk/issues/19 (at least for me).
It seem, as far as I understand, that this bug can get back at JDK9 =/

Resources