I ran into a quiet weird situation ...
Currently I try to build and install OpenCv3 for Python3 on Ubuntu 15
While compiling and installing opencv3 for python2.7 worked pretty well - doing the same for python3 (same downloaded opencv package) stops with make error 2 (actually with different errors) ...
So something's wrong with: [ 77%] Generating photo+CalibrateCRF.java, photo.cpp because afterwards I get different traceback's and errors:
Traceback (most recent call last):
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 1559, in <module>
generator.gen(srcfiles, module, dstdir)
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 1061, in gen
self.gen_class(ci)
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 1460, in gen_class
for fi in ci.getAllMethods():
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 824, in getAllMethods
result.extend([fi for fi in sorted(self.methods) if fi.isconstructor])
TypeError: unorderable types: FuncInfo() < FuncInfo()
modules/java/CMakeFiles/opencv_java.dir/build.make:86: recipe for target 'modules/java/photo+CalibrateCRF.java' failed
make[2]: *** [modules/java/photo+CalibrateCRF.java] Error 1
CMakeFiles/Makefile2:6282: recipe for target 'modules/java/CMakeFiles/opencv_java.dir/all' failed
make[1]: *** [modules/java/CMakeFiles/opencv_java.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
Obviously there is something going on with the java part of OpenCV. I ran into exactly the same error but since I didn't want to use Java at all I excluded it from the build and everything worked just fine.
Here is what did the job for me:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") -D BUILD_EXAMPLES=ON -D PYTHON_EXECUTABLE=$(which python3) -D BUILD_opencv_java=OFF BUILD_opencv_test_java=OFF ..
Related
pip install pyjnius
Collecting pyjnius
Using cached https://files.pythonhosted.org/packages/b6/57/c90acf31322e6417f06c90410dbfcb149633a6006b7efbf99dfebe177c1f/pyjnius-1.2.0.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\dev1\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Dev1\\AppData\\Local\\Temp\\pip-install-uxkserni\\pyjnius\\setup.py'"'"'; __file__='"'"'C:\\Users\\Dev1\\AppData\\Local\\Temp\\pip-install-uxkserni\\pyjnius\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\pip-egg-info'
cwd: C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\
Complete output (18 lines):
warning: [options] bootstrap class path not set in conjunction with -source 6
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
WARNING: Not able to assign machine() = AMD64 to a cpu value!
Using cpu = 'i386' instead!
JDK_HOME: C:\Program Files\Java\jdk-13.0.1
JRE_HOME: None
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\setup.py", line 246, in <module>
compile_native_invocation_handler(JDK_HOME, JRE_HOME)
File "C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\setup.py", line 96, in compile_native_invocation_handler
join('jnius', 'src', 'org', 'jnius', 'NativeInvocationHandler.java')
File "c:\users\dev1\appdata\local\programs\python\python37-32\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\Java\\jdk-13.0.1\\bin\\javac.exe', '-target', '1.6', '-source', '1.6', 'jnius\\src\\org\\jnius\\NativeInvocationHandler.java']' returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I am trying to generate a dmg from a jar using the javapackager.
Here is what I put into terminal:
cd "/Users/name/Documents/JarToApplication"
jdk=$(/usr/libexec/java_home -v 1.8)
$jdk/bin/javapackager -deploy -native dmg -BappVersion=8 -name DMSLauncher -srcdir . -srcfiles DMSLauncher.jar -appclass com.blockhead7360.dms.launcher.DMSLauncher -Bicon=package/macosx/DMSLauncher.icns -outdir deploy -outfile DMSLauncher -v
And it runs until here:
Running [osascript, /var/folders/z5/n802xjnx49l4535kq63992280000gn/T/fxbundler8419176091447096668/macosx/DMSLauncher-dmg-setup.scpt]
/var/folders/z5/n802xjnx49l4535kq63992280000gn/T/fxbundler8419176091447096668/macosx/DMSLauncher-dmg-setup.scpt:635:742: execution error: Finder got an error: The operation can’t be completed because there is already an item with that name. (-48)
java.io.IOException: Exec failed with code 1 command [[osascript, /var/folders/z5/n802xjnx49l4535kq63992280000gn/T/fxbundler8419176091447096668/macosx/DMSLauncher-dmg-setup.scpt] in unspecified directory
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132)
at com.oracle.tools.packager.mac.MacDmgBundler.buildDMG(MacDmgBundler.java:376)
at com.oracle.tools.packager.mac.MacDmgBundler.bundle(MacDmgBundler.java:92)
at com.oracle.tools.packager.mac.MacDmgBundler.execute(MacDmgBundler.java:556)
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
at com.sun.javafx.tools.packager.Main.main(Main.java:476)
Config files are saved to /var/folders/z5/n802xjnx49l4535kq63992280000gn/T/fxbundler8419176091447096668/macosx. Use them to customize package.
Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:354)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
at com.sun.javafx.tools.packager.Main.main(Main.java:476)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
I went to the file that it said it was having a problem with (DMSLauncher-dmg-setup.scpt) and when I ran the script manually this is what it said:
Can anyone assist me in fixing this problem? Thank you.
In case someone still sees the problem, what I did to resolve it was to check /Volumes folder and eject the volume. Here the volume would be 'DMSLauncher'.
I want work with javaRAP but i can't make parseIt.I have this error:
C:\Users\zahra\Documents\bllipparser-2015.08.18\first-stage\PARSE>make parseIt
g++ parseIt.C -o parseIt
In file included from InputTree.h:24,
from parseIt.C:31:
SentRep.h:22: istream: No such file or directory
SentRep.h:24: ostream: No such file or directory
make: *** [parseIt] Error 1
Install Charniak's parser (version parser05Aug16).
$ make parseIt
If you encounter the following error message, you may want to try
overwriting the files in the PARSE/ subdirectory of the parser with
those provided in the parser05Aug16.patch.zip zipfile.
[wing.nus#cte PARSE]$ make
/usr/bin/g++ -c -O BchartSm.C
BchartSm.C:30: error: expected initializer before ‘*’ token
BchartSm.C: In member function ‘float Bchart::computepTgT(int, int)’:
BchartSm.C:612: error: ‘globalGi’ was not declared in this scope
make: *** [BchartSm.o] Error 1
Get the latest JavaRAP
(http://aye.comp.nus.edu.sg/~qiu/NLPTools/JavaRAP.html), decompress
it, and modify env.jrap carefully. It's important that you add "./"
as a directory prefix even it seems unnecessary.
Try:
$ java -jar AnaphoraResolution.jar testdata/SimpleTest.txt
I'm trying to build CSipSimple
I get such error:
# External sources fetched out from external repos/zip
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
Isources/modules/audio_processing/aecm/include -Isources/modules/audio_processing/aecm/../utility -Isources/modules/audio_processing/aecm/../../.. -Isources/modules/audio_processing/aecm/../../../common_audio/signal_processing/include -Isources/modules/audio_processing/aecm/../../../system_wrappers/interface -mfpu=neon -mfloat-abi=softfp -flax-vector-conversions -S -o sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S sources/modules/audio_processing/aecm/aecm_core_neon_offsets.c
make[1]: Isources/modules/audio_processing/aecm/include: No such file or directory
make[1]: [sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S] Error 1 (ignored)
Traceback (most recent call last):
File "sources/build/generate_asm_header.py", line 46, in <module>
main(sys.argv[1:])
File "sources/build/generate_asm_header.py", line 30, in main
infile = open(argv[0])
IOError: [Errno 2] No such file or directory: 'sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S'
make[1]: *** [sources/modules/audio_processing/aecm/aecm_core_neon_offsets.h] Error 1
make: *** [webrtc-preprocess] Error 2
Here suggests to check variables and installed soft. But my variables is ok
echo $PATH output:
/opt/local/bin:/opt/local/sbin:/usr/local/php5/bin:/Users/Nikita.Leshchev/Downloads/pcre-8.39/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/Nikita.Leshchev/Library/Android/sdk/tools:/Users/Nikita.Leshchev/Library/Android/sdk/platform-tools:/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/
Variables ANDROID_NDK and ANDROID_SDK defined. All required soft installed
which ndk-build output:
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle//ndk-build
I did everything like in documentation, but i have this error. Can anybody help?
NDK Version 13.11.3345770
SDK Version 25.2.2
OSX 10.11.6
UPD I coudn't build it, but i found this repository I could download and build it without any problems
I solved my problem, not on 100% for a while, but this error i have resolved.
This and some other files i found in this repository
I'm trying to load the "openNLP" library in RStudio and I'm getting the following error. I get a similar error when I try to install the "RWeka" package.
How do I troubleshoot this?
library(openNLP)
Error : .onLoad failed in loadNamespace() for 'openNLPdata', details:
call: .jinit()
error: JNI_GetCreatedJavaVMs returned -1
Error: package or namespace load failed for ‘openNLP’
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
Found a solution to my issue. This is what worked for me. Please see below:
Launch R at the command line (to test the solution):
sudo R CMD javareconf
export LD_LIBRARY_PATH=$JAVA_LD_LIBRARY_PATH
LD_LIBRARY_PATH=$(/usr/libexec/java_home)/jre/lib/server: open -a RStudio
Now within RStudio:
install.packages("rJava", type = "source")
install.packages("openNLP")
require(rJava)
require(openNLP)
To launch RStudio from finder (El Capitan), you have to link libjvm.dylib to /usr/lib.
sudo ln -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib