This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compiling QtJambi on KDE

Tags: None
(comma "," separated)
deltaecho
Registered Member
Posts
18
Karma
0
OS

Compiling QtJambi on KDE

Fri Oct 17, 2008 9:58 pm
I'm trying to compile and install QtJambi on Arch Linux + KDEMod, but it keeps failing when it attempts to find Qt's Phonon plugin; since KDE is my desktop environment of choice, my version of Qt was compiled without the phonon plugin so I may use KDE's.

Has anybody successfully gotten QtJambi to compile? I need it for several projects of mine (many of which are KDE related).

Edit: Here is the specific error message it is giving me:
java.io.FileNotFoundException: /usr/plugins/phonon_backend/libphonon_gstreamer.so (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:137)
at com.trolltech.tools.ant.Util.copy(Unknown Source)
at com.trolltech.tools.ant.PlatformJarTask.processLibraryEntry(Unknown Source)
at com.trolltech.tools.ant.PlatformJarTask.execute_internal(Unknown Source)
at com.trolltech.tools.ant.PlatformJarTask.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Failed to copy library 'libphonon_gstreamer.so'
at com.trolltech.tools.ant.PlatformJarTask.processLibraryEntry(Unknown Source)
at com.trolltech.tools.ant.PlatformJarTask.execute_internal(Unknown Source)
at com.trolltech.tools.ant.PlatformJarTask.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

BUILD FAILED
/tmp/qtjambi-build/qtjambi-src-gpl-4.4.3_01/build.xml:284: Failed to create native .jar

Last edited by deltaecho on Sat Oct 18, 2008 7:46 am, edited 1 time in total.


"Many of life's failures are people who did not realize how close they were to success when they gave up."
Thomas Edison
deltaecho
Registered Member
Posts
18
Karma
0
OS

RE: Compiling QtJambi on KDE

Fri Oct 24, 2008 10:26 pm
OK, so I've hacked on it a little and learned a bit, however, now receive this error:
[jar] Building jar: /tmp/qtjambi-src-gpl-4.4.3_01/qtjambi-linux64-gcc-4.4.3_01.jar
[delete] Deleting directory /tmp/qtjambi-src-gpl-4.4.3_01/platform-output

library.native:

library.java.compile:
[javac] Compiling 641 source files to /tmp/qtjambi-src-gpl-4.4.3_01
[javac] /tmp/qtjambi-src-gpl-4.4.3_01/com/trolltech/qt/core/QByteArray.java:894: cannot find symbol
[javac] symbol : method toChar_private(com.trolltech.qt.QNativePointer,int)
[javac] location: class com.trolltech.qt.core.QByteArray
[javac] char res = toChar_private(ok, base);
[javac] ^
[javac] /tmp/qtjambi-src-gpl-4.4.3_01/com/trolltech/qt/core/QLocale.java:1544: cannot find symbol
[javac] symbol : method toChar(java.lang.String,com.trolltech.qt.QNativePointer,int)
[javac] location: class com.trolltech.qt.core.QLocale
[javac] char returned = (char) toChar(s, ok, base);
[javac] ^
[javac] /tmp/qtjambi-src-gpl-4.4.3_01/com/trolltech/qt/core/QLocale.java:1544: inconvertible types
[javac] found : toChar
[javac] required: char
[javac] char returned = (char) toChar(s, ok, base);
[javac] ^
[javac] Note: /tmp/qtjambi-src-gpl-4.4.3_01/com/trolltech/qt/QNoSuchPropertyException.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 3 errors

BUILD FAILED
/tmp/qtjambi-src-gpl-4.4.3_01/build.xml:154: Compile failed; see the compiler error output for details.


I will keep playing with it, but in the meantime, can anybody help me with these?


"Many of life's failures are people who did not realize how close they were to success when they gave up."
Thomas Edison
deltaecho
Registered Member
Posts
18
Karma
0
OS

RE: Compiling QtJambi on KDE

Tue Dec 23, 2008 8:18 pm
For now, I've given up on compiling my own version of QtJambi :P

What I've decided to do is unpack its binary to /opt/qtjambi, and symlink its various libraries to the locations I would have placed them had I compiled it. This seems to be the best solution for now, because Eclipse's QtJambi plugin will not work with system-compiled libraries, only the binaries supplied by Qt.

If you're running Arch Linux, here is my PKGBUILD and here is the link to its AUR page. If you have any suggestions on how I can improve it, let me know (the build() method is written in BASH).

For those interested in helping me figure out how to get the bugger to compile, here are the steps I've already taken:
1) Unpack the binary's tarball and `cd' into the new directory.

2) Disable QtJambi's Phonon and QtXmlPatterns plugins (these will cause the build to fail because KDE has its own Phonon and Arch hasn't compiled QtXmlPatterns into its Qt libs):
Code: Select all
$ sed -e 's|String result = String.valueOf(doesQtLibExist("phonon", 4));|String result = "false";|' -e 's|String result = String.valueOf(doesQtLibExist("QtXmlPatterns", 4));|String result = "false";|' -i com/trolltech/tools/ant/InitializeTask.java


3) Change Qt's plugin directory from "/usr/plugins" to "/usr/lib/qt/plugins," which is where Arch keeps them:
Code: Select all
$ sed -e 's|subdir="plugins|subdir="lib/qt/plugins|g' -i build.xml


4) Run `ant'
Code: Select all
$ ant


I hope that helps somebody ...

NOTE: For 64-bit users, QtJambi's Eclipse plugin will not work, but you can work around this by including QtJambi's *.jar's in your project's build path ("Project -> Properties -> Java Build Path -> Libraries tab -> Add External Jars"). You won't have access to the nice QtDesigner interface from Eclipse, but you can have it opened separately and work on the UI while dealing with the coding part in Eclipse.


"Many of life's failures are people who did not realize how close they were to success when they gave up."
Thomas Edison


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell