Trouble installing QT Jambi on a Windows 64 bit system - windows

I've been trying to use QT Jambi, but I couldn't manage to install it yet. First of all, this is my system:
Windows 7 Home Premium 64 Bit
Java 6 32 bit (I often use JDownloader which is not compatible with the 64 bit version of Java)
MinGW C++ compiler that comes with Code::Blocks (which sets all required environmental variables during setup)
I also have CygWin installed, but I don't understand why it gets mentioned during the error that I get...
My first idea was to try the 32 bit version since I have 32-bit Java, so I linked the libraries in Eclipse, tried the classical beginner program found in a tutorial and I got this message:
java.lang.ExceptionInInitializerError
at com.trolltech.qt.QtJambiObject.<clinit>(Unknown Source)
Caused by: java.lang.RuntimeException: Loading library failed, progress so far:
Unpacking .jar file: 'qtjambi-win32-msvc2008-4.7.1.jar'
Checking Archive 'qtjambi-win32-msvc2008-4.7.1.jar'
- skipping because of wrong system: trying to load: 'win32', expected: 'win64'
Loading library: 'QtCore4.dll'...
- using 'java.library.path'
at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(Unknown Source)
at com.trolltech.qt.internal.NativeLibraryManager.loadQtLibrary(Unknown Source)
at com.trolltech.qt.Utilities.loadQtLibrary(Unknown Source)
at com.trolltech.qt.Utilities.loadQtLibrary(Unknown Source)
at com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(Unknown Source)
... 1 more
Caused by: java.lang.RuntimeException: Library 'QtCore4.dll' was not found in 'java.library.path'=C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C: \Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11\Driver;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\CodeBlocks\MinGW\bin\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\cygwin\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;.
at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(Unknown Source)
... 6 more
Exception in thread "main"
Then since it says it expects a 64 bit system I followed the Installation Guide and tried this steps:
1) Downloaded QTJambi source package
2) Downloaded original QT source package
3) Added "C:\QTJambi\QT\qt-qt\bin" (QT source package folder) to the environment PATH variable
4) Opened Visual Studio 2005 Command Prompt
5) cd C:\QTJambi\QT\qt-qt
6) Tried: configure -platform win64-g++ -D QT_JAMBI_BUILD -no-qt3support -plugin-manifests
But it didn't work, error: invalid option win64-g++ for -platform
7) Tried configure -platform win32-g++ -D QT_JAMBI_BUILD -no-qt3support -plugin-manifests
8) Digit o for open source
9) Digit y for accepting license
But it doesn't work either, getting this error:
Running syncqt...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset)
LANG = "IT"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't execute /cygdrive/c/QTJambi/QT/qt-qt/bin//syncqt
syncqt failed, return code 2
Anyone able to help?
Thanks in advance to anyone!

This response attempts to explain and address the original problem (i.e. how to make use of the 32bit QtJambi binary distribution on a 64bit Windows system).
skipping because of wrong system: trying to load: 'win32', expected: 'win64'
This is a message from the QtJambi initialization code that detects a mismatch between the 32/64 bit-ness of the JVM and the 32/64 bit-ness of the QtJambi implementation trying to be loaded into the JVM instance at runtime.
In your case this is due to trying to use a 64bit JVM with a 32bit version of QtJambi. This is not a possible feat. To correct the problem find and install directly the Windows 32bit JVM on your system so that you have the file "C:\Program Files (x86)\Java\jre6\bin\java.exe" (you may already have it installed, please check)
When they are both installed on a 64bit system take a look at the difference between:
C:\>"C:\Program Files (x86)\Java\jre6\bin\java.exe" -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
C:\>"C:\Program Files\Java\jre6\bin\java.exe" -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
The top one is the 32bit JVM; the bottom one is the 64bit JVM.
Now try loading the QtJambi binary version you have via the 32bit JVM you have to do this explicitly as the default "java.exe" should be the 64bit one on a Windows 64bit platform:
"C:\Program Files (x86)\Java\jre6\bin\java.exe" -cp qtjambi-X.Y.Z.jar;qtjambi-win32-msvc2008-X.Y.Z.jar;myjar.jar mypackage.MyMain
You need to fixup the command line above the ClassPath (-cp) to the locations of your JARs you are attempting to run and the main().
If you have problems getting the application to start due to UnsatisfiedLinkError and you are using a msvc2008 build then try installing the "Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)" http://www.microsoft.com/download/en/details.aspx?id=5582 (NOTE: There is also a 64bit version of this as well, this link is for the 32bit version which is relevant to using 32bit QtJambi on a 32bit JVM, if you also want the 64bit version search for the same page with "(x64)" in the title instead of "(x86)" on the microsoft website).
Then retry your test.

Qt Jambi nowadays supports 64 bit compilations too, but getting proper Qt is quite a bit harder.
For MinGW there is some resources available in Internet. Maybe they can help you. Building 64-bit Qt 4.7 using MinGW-w64
Only supported (by Nokia) solution at the moment is 64 bit MSVC compilations, but AFAIK there is no such binaries distributed from Nokia because runtimes are not allowed to be freely distributed. When compiling with MSVC, correct profile for MSVC 2010 would be win32-msvc2010. List of those can be found from in mkspecs directory.
Note that you don’t usually have to specify the profile in first place; only if there is many available profiles you could use and you want to use certain one (MinGW or MSVC, for example).
64 bit compilation with MSVC works using 64 bit environment, according this page.
Using Cygwin with Qt or Qt Jambi is not really suggested; use MSYS if you want unix-like environment.

Related

Tizen-sdk-for-wearable-setup Installation issue because of JAVA HOME

System Configuration:
OS - Windows 8
System type - 64-bit Operating System , x64-based processor
I have installed java-8 and set JAVA_HOME as
C:\Program Files\Java\jdk1.8.0
I am getting error as below image while Tizen-sdk-for-wearable-setup Installation.
error - Cannot execute Java even if it was installed. Check environment variable or Java version(over 1.6) please.
I tried installing after JDK 7 both 32 bit and 64 bit and setting JAVA_HOME - Program Files path and Program Files (x86) path both also it didn't worked.
I have a another system in which the Issue didn't occurred.
System Configuration :
OS - Windows 7 Enterprise
System Type - 32 bit operating system.
Installed Java - C:\Program Files\Java\jdk1.6.0_45
JAVA_HOME set as - C:\Progra~1\Java\jdk1.6.0_45
Now there may be many chances why installation is not getting in my win-8 64 bit.
64 bit JAVA support is not available.
I am not sure about ~ symbol in JAVA_HOME path but it may be to escape space between Program Files and I have not set java home using this symbol.
In win-8 64 bit I have 2 folders. Program Files and Program Files (x86) , I am not sure whether to use ~ or " " to set JAVA_HOME and for 32 bit java or 64 bit java installed.
May be only java 1.6 is supported right now.
I searched and found similar issues :
I find this link but not able to get why its advised to set the system environment Path Variable to 'c:\windows\system32'.
In this link its advised to use InstallManager.jar via cmd.exe.
I can try each possible assumption till it works but hoping to find a solution with proper reason why I am getting this error.
If any one knows how should I work this out please help.
At last solve the Issue.
Installed jdk1.7.0_51 (I think currently JAVA 8 is not supported).
Set the JAVA_HOME as C:\PROGRA~1\Java\jdk1.7.0_51 (thanks to #Michael comment).
This link: https://answers.madewithmarmalade.com/questions/16878/cant-install-tizen-sdk-on-windows-8-64-bit.html solved for me the problem of Tizen SDK installation:
Change directory to %LOCALAPPDATA%\Temp\tizensdk_TimeStampOfInstallationInvocation
java -jar InstallManager.jar
My system: Windows 7 Ultimate x64. Java's version installed (64 bit):
g:>echo %JAVA_HOME%
c:\Program Files\Java\jdk1.8.0_05
g:>echo %CLASSPATH%
c:\Program Files\Java\jdk1.8.0_05\jre\lib
Added to PATH: c:\Program Files\Java\jdk1.8.0_05\bin\
(Tizen IDE and "Hello World" example run just fine.)
I encountered the same problem and finally I realised that my version of Tizen installer is 64bit but I installed 32bit java in my computer. Then I downloaded 32bit Tizen installer and everything was fine.
I encountered the same problem, and it was solved by placing the Java path in the beginning of the system path ! weird.. but worked :)
You must include, depending on whether you downloaded the x86 or x64 Tizen installer, C:\Program Files (x86)\Java\jre7\bin or C:\Program Files\Java\jre7\bin in the PATH environment system variable. You can't use java 8. See this oracle page for instructions on setting environment variables. I have read some others mention that they put the entry at the very beginning of the PATH variable. I think this would only matter if you also had an entry for java 8, but better safe than sorry.

Lua for windows https error: "%1 is not a valid Win32 application"

I've got a question about Lua and https. I'm developing some software for a router which supports Lua. The bad thing is that this router doesn't support debugging. So I was looking for an IDE for Lua.
I'm using the Lua Development Tools and LuaForWindows on a Win 7 64-bit OS. Till now everything works like it should. But now I have to call some urls by https. The router itself has a package ssl.lua and you can user this package with the require ("ssl.https") statement. But I want to debug it with the Lua Development Tools. I was searching for Windows compatible packages and have found the "Luasec" project.
As mentioned in this thread "Lua with the Freebase API"; I have downloaded Luasec.
I have put the ssl.lua and the ssl folder within my lua installation the I have put the ssl.dll in the clibs folder within the lua installation.
For testing I only do a require ("ssl.https") in my Lua file but it crashes. It says:
C:\Program Files (x86)\Lua\5.1\lua.exe: error loading module 'ssl.core' from file 'C:\Program Files (x86)\Lua\5.1\clibs\ssl.dll':
%1 ist keine zulässige Win32-Anwendung. (%1 is no a valid Win32 application)
I've tested it on a Win 7 32 bit pc too and it crashes with this:
C:\Program Files\Lua\5.1\lua.exe: error loading module 'ssl.core' from file 'C:\Program Files\Lua\5.1\clibs\ssl.dll':
Das angegebene Modul wurde nicht gefunden. (The module cant be found)
Can anybody please help me getting this work?
I had this same problem on Windows 7 64 bit as well, using Alien to load a Windows DLL.
The library I was loading (i.e. the DLL) is a 64 bit DLL, but Lua for Windows is a 32 bit application.
I have a 32-bit version of the DLL that I loaded instead, and that works. See if you too can find a 32 bit version of your library.
As for your problem on 32 bit Windows, that could of course be due to other factors, though if you are using the same 64 bit DLL, I guess that won't work either.
I got this problem yesterday and solved it by downloading the source code of Luasec and built it with static library on a 32-bit windows 7 pc. You may try to build your own.
I changed some configurations in my C/C++ and Linker properties of project.
Below are what I changed:
C/C++ -> Code Generation -> Runtime Library: Multi-threaded (/MT)
Linker -> General -> Additional Library Directories: C:\OpenSSL-Win32\lib\VC\static
Linker -> Input -> Additional Dependencies: add libeay32MT.lib and ssleay32MT.lib
Or, you could download my version here if you need.

OpenSSL on 64bit Windows

I am trying to build and link OpenSSL on Windows 8 and I've found it really daunting. I should mention that I am aware of following posts
OpenSSL Windows x64 Compilation error
How do you compile OpenSSL for x64?
Building OpenSSL VC++ Static 64bit Libs
but none of them addressed what I do really need to know. Therefore I decided to share my experience with you guys as a new post!
First, I can successfully build and link OpenSSL on a Win32 OS and it perfectly works. I know that Windows 8 comes with WOW64. “WOW64 is an x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows”, though when I run my app that is built on windows 7 32-bit, I receive an error “The program can’t start because libeay32.dll is missing from your computer…” while “libeay32.dll” is apparently there and not missing.
In order to avoid registry missing stuffs, I tried to build OpenSSL in 32bit mode on Windows 8. The build was successfully done and the app linked correctly with no error. Again when I run the app I received the same error message.
And then I tried to build it in 64bit mode based on the following steps;
set PATH=%PATH%;c:\perl\bin;c:\nasm;
call "c:\visual studio\2012\vc\vcvarsall.bat" x64
perl Configure VC-WIN64A no-shared no-idea
call ms\do_win64a
copy ms\libeay32.def ms\libeay64.def /Y
copy ms\ssleay32.def ms\ssleay64.def /Y
ssed -e s/out32/out64/g ms\ntdll.mak | ssed … > ms\ntdll-64.mak
ssed -e s/out32/out64/g ms\nt.mak | ssed … > ms\nt-64.mak
nmake -f ms\ntdll-64.mak
nmake -f ms\ntdll-64.mak test
nmake -f ms\ntdll-64.mak install
In this case, I received a lot of warnings mostly on “data conversion and possibility of data loss” during build but it was built and while “test” failed “install” generated outputs.
Now when I try to build my solution in Visual Studio using new “libeay64.lib and ssleay64.lib” I receive almost thousands of errors saying “unresolved external symbol”
So if possible please answer following questions;
Why I cannot run my 32bit app on Windows 8 (64bit)?
Why correctly built OpenSSL (32bit mode) on Windows 8, still
encounters same error?
In OpenSSL build (64bit mode), am I making something wrong?
I am using OpenSSL ver 1.0.1e, Visual Studio 2012 and nasm 2.10.07
Thanks
I am partially answering your question:
You can run 32-bit under 64-bit in WOW64.
For OpenSSL under 64-bit, there is a compiler option /WX under visual studio which means treat warnings as an error. Remove that compiler option from the makefile. You will get lots of warnings. But OpenSSL will get compiled.
Since, most of the modules are not compiled and their object file is not generated, that is why you are getting linker error. Please let me know if it solves your problem.

Running Grobid on Windows 64 bit

I am trying to execute GROBID on a 64-bit Windows.
There is no x64 bit version of the library for Windows (Atleast I could not find). It runs on 64 bit Linux with 64 bit JRE and on 32 bit Windows with 32 bit JRE. So the version of JRE is not the problem.
I understand I need to include the 64-bit Windows - libcrfpp file. However I cannot find it. Can you please let me know where can I find it or help me execute it?
However I get an errors as follows -
Error when trying to run it using a 64 bit JVM on Windows 64 -
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.grobid.core.main.GrobidParser.<clinit>(GrobidParser.java:22)
at org.pushpin.main.Main.main(Main.java:138)
Caused by: java.lang.RuntimeException: Unable to find a native CRF++ library: Folder <FOLDER>\GROBID_HOME\.\lib\win-64 does not exist
at org.grobid.core.main.LibraryLoader.load(LibraryLoader.java:21)
at org.grobid.core.impl.GrobidFactoryImpl.init(GrobidFactoryImpl.java:35)
at org.grobid.core.impl.GrobidFactoryImpl.newInstance(GrobidFactoryImpl.java:22)
at org.grobid.core.impl.GrobidFactoryImpl.instance(GrobidFactoryImpl.java:14)
at org.grobid.core.GrobidFactory.<clinit>(GrobidFactory.java:13)
... 2 more
UPDATE
Error when trying to run it using a 32 bit JVM on Windows 64 -
Caused by: java.io.IOException: Cannot run program "<project path i have removed it>\lib/pdftoxml": CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:448)
at java.lang.Runtime.exec(Runtime.java:345)
at org.grobid.core.document.Document.pdf2xml(Document.java:217)
at org.grobid.core.engines.HeaderParser.processing(HeaderParser.java:86)
It is not possible to load a 32-bit native library from a 64-bit JVM.
Using a 32 bit dll on a 64 bit machine
But you can install a 32-bit JVM on your 64-bit Windows and run a Java application which uses a 32-bit native library.
Is it possible to install both 32bit and 64bit Java on Windows 7?
How to run an API made for 32-bit on a 64-bit machine?
UPDATE:
This is a excerpt of the application launcher
private static String getLibraryFolder() {
String osPart = System.getProperty("os.name").replace(" ", "").toLowerCase().substring(0, 3);
String archPart = System.getProperty("sun.arch.data.model");
//todo: change to fetching the basic dir from GrobidProperties object
return String.format("%s/%s-%s", GrobidProperties.getInstance().getNativeLibraryPath().getAbsolutePath(),
osPart, archPart);
}
The application is checking property sun.arch.data.model to get the native library folder. If you use a 32-bit JVM in a 64-bit Windows, you get
java.home=C:\Program Files (x86)\Java\jre7
os.arch=x86
os.name=Windows 7
sun.arch.data.model=32
So executing the application with a 32-bit JRE would load the native libraries from <FOLDER>\GROBID_HOME\.\lib\win-32
UPDATE:
The error you get when using 32-bit JRE has nothing to do with JVM architecture. You should install and configure your pdf2xml correctly.
I'm writing here just to inform you that we've integrated the ported version of Wapiti for Windows 64bit.
If you are still interested to try, you can just download/update the Grobid development version from master.
The issues with pdf2xml have been solved as well as other minor bugs that emerged when testing with Windows.
Batch and service mode are both working just fine. Would be great to have more intensive testing on different Windows versions running natively.
You can follow up the progress and report eventual problems or bugs at the relative issue.

How to compile Qt for 64-bit Windows from a 32-bit environment with Visual C++ 2010 Express?

I am trying to compile the Qt library (I don't need the demos or examples) for 64-bit Windows. There are instructions here but I run into the error described in the comment below it. There doesn't seem to be a reference anywhere for how one might go about doing this process.
I am targetting Microsoft Visual C++ 2010 Express. It looks like I need Perl and the Windows SDK as well - how do I go about this process?
This process is quite tedious and time-consuming - but I will explain each step in detail here for the benefit of others who try to compile Qt in the future.
The first step is to install all of the prerequisites.
ActivePerl, which is used during the configuration process. You will need to restart after installing Perl since it modifies environment variables.
The Windows SDK 7.1 (formerly called the Platform SDK). Be sure to include the x64 libraries when you select the components to install.
Download the Qt source archive from the Qt Downloads page.
Extract the contents of the archive to an easy-to-remember location (like C:\). You need to remember this location later since we will be using it to set some environment variables.
Now open the Windows SDK 7.1 Command Prompt. Begin by setting the environment to 32-bit release mode (we need to build some of the tools as 32-bit applications):
setenv /release /x86
Set the following environment variables (example below assumes you extracted to C:\):
set QTDIR=C:\qt-everywhere-opensource-src-4.8.0
set PATH=%PATH%;%QTDIR%\bin
Now run cd %QTDIR% and specify the configuration options - example is included below:
configure -release -opensource -qt-zlib -qt-libpng -qt-libmng -qt-libtiff
-qt-libjpeg -qt-style-windowsxp -qt-style-windowsvista -platform
win32-msvc2010
Once the configuration process is complete, cd to the src directory and run:
qmake
nmake
This process may take a considerable amount of time, so now would be a good time to take a break and answer some questions here on Stack Overflow :)
The tools are now built and you need to compile Qt as a 64-bit library. Enter the following command:
setenv /x64
You will need to set the environment variables from step 5 again. Enter those commands now.
Run cd %QTDIR% and then rerun the configure command being sure to specify one additional option:
configure -release -opensource -qt-zlib -qt-libpng -qt-libmng -qt-libtiff
-qt-libjpeg -qt-style-windowsxp -qt-style-windowsvista -platform
win32-msvc2010 -no-qmake
The -no-qmake option is very important - it indicates that we want to skip the compilation of the qmake.exe program because we want to keep the 32-bit version.
Now things get really complicated here because of some dependency problems. The tools (like moc) that Qt needs to build the core library and some of the other components are listed as dependencies in the src.pro file. This means that the compiler will attempt to build them as 64-bit applications and then try to run them - which will of course fail on a 32-bit system. So what we need to do is edit src.pro and remove those dependencies ourselves. Scroll down near line 85 and look for a line that begins with:
!wince*:!ordered:!symbian-abld:!symbian-sbsv2 {
Each subsequent line in the section lists a sub-target and its dependencies. What you want to do now is remove all dependencies that begin with src_tools_. For example:
src_gui.depends = src_corelib src_tools_uic
Becomes:
src_gui.depends = src_corelib
There might be a better way of doing this, but I haven't figured it out yet :)
Now we cd into the src directory once again and run the following command
nmake sub-winmain sub-corelib sub-xml sub-network sub-sql sub-testlib
sub-gui sub-qt3support sub-activeqt sub-opengl sub-xmlpatterns sub-phonon
sub-multimedia sub-svg sub-script sub-declarative sub-webkit
sub-scripttools sub-plugins sub-imports
This builds only the Qt libraries and skips the tool dependencies. Note that this too may take a considerable amount of time.
You should now have 64-bit libraries in the lib folder that you can link against in your 64-bit Qt applications.
Edit: it turns out that even this wasn't enough since I still ran into some problems when linking the QtWebKit4.dll library (something about unresolved symbols). It turns out that someone else has already found the solution and you need to change QMAKE_HOST.arch to QMAKE_TARGET.arch in WebCore.pro.
Also, the above options will build QNetwork4.dll without OpenSSL support (you won't be able to access sites over HTTPS - even in a QWebView). This, thankfully isn't too hard to fix. Download and build OpenSSL for Win64 and append the options below to the command in step #9:
-openssl -I C:\OpenSSL\inc32 -L C:\OpenSSL\out32dll
(You'll have to change the paths if you installed OpenSSL somewhere other than C:\OpenSSL.)
Further edit: to save the trouble of doing this yourself, I have uploaded the compiled libraries here:
http://www.box.com/s/9710cbb278ef4890a7b5
As I mentioned in the comments to George Edison's answer, there is a bug in the Microsoft Visual C++ compiler that comes with the Windows SDK 7.1. For more information on this, see QTBUG-11445 and QTBUG-19175.
I have compiled the Qt 4.8.2 64-bit binaries following George's instructions, including the OpenSSH library. In addition, I applied Microsoft's hotfix to fix the compiler bug.
For your convenience, I have made the resulting 64-bit libraries available for download from here: https://www.box.com/s/8948c60c3cdd743ef83b

Resources