--
Levente "Si vis pacem para bellum!"
I think you just need to define a "-post-init" target, and in that,
reset the javac.classpath property. You could also change the
file.reference.jna.jar and file.reference.swt.jar properties to point
to the external ones.
Probably do it via an ant conditional, based on a property you set on
the command line.
ant -Doverride.javac.classpath=/usr/share/java/jna.jar:...
Similarly for javac.test.classpath
2008/9/26 Farkas Levente <lfa...@lfarkas.org>:
ok now i patch the project.properties and put:
--------------------------------------------
file.reference.jna.jar=/usr/share/java/jna.jar
file.reference.junit-4.4.jar=/usr/share/java/junit4.jar
file.reference.swt.jar=/usr/lib/eclipse/swt-gtk-3.2.1.jar
...
run.jvmargs=-Djna.library.path=/usr/lib:/usr/lib/gstreamer-0.10
--------------------------------------------
into it, and it's compiles clean.
but the tests still failed with
--------------------------------------------
-do-test-run:
[junit] Testsuite: org.gstreamer.BinTest
[junit] #
[junit] # An unexpected error has been detected by Java Runtime
Environment:
[junit] #
[junit] # SIGSEGV (0xb) at pc=0x4841b3d4, pid=1628, tid=1604496
[junit] #
[junit] # Java VM: OpenJDK Server VM (1.6.0_0-b11 mixed mode linux-x86)
[junit] # Problematic frame:
[junit] # C 0x4841b3d4
[junit] #
[junit] # An error report file with more information is saved as:
[junit] # /home/lfarkas/rpm/BUILD/gstreamer-java-0.8/hs_err_pid1628.log
[junit] #
[junit] # If you would like to submit a bug report, please visit:
[junit] # http://icedtea.classpath.org/bugzilla
[junit] #
[junit] Test org.gstreamer.BinTest FAILED (crashed)
--------------------------------------------
any tip what else can be change?
i attached the log file mentioned above.
> Probably do it via an ant conditional, based on a property you set on
> the command line.
> ant -Doverride.javac.classpath=/usr/share/java/jna.jar:...
ant
-Doverride.javac.classpath="/usr/share/java/jna.jar:/usr/share/java/junit4.jar:/usr/lib/eclipse/swt-gtk-3.2.1.jar"
not working:-(
> Similarly for javac.test.classpath
neither this.
Before doing anything else, I suggest trying to build JNA from source
and run its unit tests on fedora, using the external libffi:
ant -Ddynlink.native=true clean test
It is possible something is broken in either the way libffi or jna is
compiled for fedora, given the binaries from jna work fine.
> ant
> -Doverride.javac.classpath="/usr/share/java/jna.jar:/usr/share/java/junit4.jar:/usr/lib/eclipse/swt-gtk-3.2.1.jar"
> not working:-(
>
>> Similarly for javac.test.classpath
>
> neither this.
No, those properties don't work yet - I was saying you might have to
add support for something like them to build.xml so they would work.
However, it appears that simply setting javac.classpath and
javac.test.classpath on the ant command line overrides them fine.
selinux is disabled on the build host:-(
i'll search for my earlier post and how to fix it on monday...
it was on this list also:
http://groups.google.com/group/gstreamer-java/browse_thread/thread/c94885fa91a22f7/6548f16bf7a4737c?hl=en&lnk=gst&q=levente#6548f16bf7a4737c
and the same problem disappear there too:-(
i try to find it on monday step-by-step...
ok now the conclusion gstreamer-java:
- on fedora-9:
build (with the test so probably run) with the included and the
system jna-3.0.2-7.fc9.i386, junit and swt too.
- on redhat/centos-5:
- fedora's jna-3.0.2-7.fc9.i386 rebuild and installed then it's
compile but test failed with SIGSEGV so probably it's a jna
problem:-(
any tip why it's not working on rhel?
- with the included jar's it's build and test only failed because of
the too old gstreamer installed on the system (but it can be solved
as i recompile newer gstreamer).
any help would be useful:-)
since i wanna build these rpm on centos too...
another strange thing it's not build on fedora-10, here is the build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=849892
it has a newer jna-3.0.4-5.svn700.fc10 and according to the buildlog:
http://koji.fedoraproject.org/koji/getfile?taskID=849892&name=build.log
it seems to build but tests failed with such errors:
-----------------------------------------------------------
[junit] Testcase: testElementAddedCallback(org.gstreamer.BinTest):
Caused an ERROR
[junit] Callback argument class org.gstreamer.Bin requires custom
type conversion
[junit] java.lang.IllegalArgumentException: Callback argument class
org.gstreamer.Bin requires custom type conversion
[junit] at
com.sun.jna.CallbackReference.<init>(CallbackReference.java:121)
[junit] at
com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:235)
[junit] at com.sun.jna.Function.convertArgument(Function.java:405)
[junit] at com.sun.jna.Function.invoke(Function.java:206)
[junit] at com.sun.jna.Library$Handler.invoke(Library.java:204)
[junit] at $Proxy26.g_signal_connect_data(Unknown Source)
[junit] at org.gstreamer.GObject.g_signal_connect(GObject.java:321)
[junit] at
org.gstreamer.GObject$SignalCallback.<init>(GObject.java:327)
[junit] at org.gstreamer.GObject.connect(GObject.java:370)
[junit] at org.gstreamer.GObject.connect(GObject.java:360)
[junit] at org.gstreamer.Bin.connect(Bin.java:245)
[junit] at
org.gstreamer.BinTest.testElementAddedCallback(BinTest.java:119)
-----------------------------------------------------------
2008/9/30 Farkas Levente <lfa...@lfarkas.org>:
2008/9/30 Farkas Levente <lfa...@lfarkas.org>:
Both. JNA changed the way type mappers were configured for Callbacks,
which I fixed in gstreamer-java, and there was a bug in JNA wrt String
members of Structure.
So you need the latest gstreamer-java from mercurial and JNA 3.0.7
so Colin as you're the jna fedora maintainer would you update the jna at
least in koji?
and Wayne could you make a 0.9 release? i attached the up-to-date spec
file for 0.9.
and then i can test it on fedora 9, 10 and rhel/centos-5.
anyway libffi version on rhel: libffi-3.0.1-1.el5 while on fedora-9:
libffi-3.0.5-1.fc9.i386.
it's 3.0.4, but Wayne said it's only in 3.0.7!
is there a reason you not step to the latest upstream?
Ignore the 3.0.4 - it's actually a SVN snapshot.
ok. then please update the release tag to 3.0.7 at the next build (and
push it to f9 and f10 too).
i modify the gstreamer-java spec file to requires >= 3.0.7.
i now test it again with these jna and the current mercurial
gstreamer-java together and the results (using the system jars not the
included ones):
fedora:
- OK on f9 (it's build and the test also runs with a few warning),
- OK on f10 (it's build and the test also runs with a few warning),
- OK on f11 (it's build and the test also runs with a few warning),
rhel/centos-5:
i've to rebuild all gstreamer packages included in fedora,
because gstreamer-java requires newer version then the system ones:
gstreamer-0.10.20-1
gstreamer-plugins-base-0.10.19-2
gstreamer-plugins-good-0.10.8-9
which also requires:
flac-1.2.1-4
at the same time rebuild (cause it's requires by gstreamer-java):
jna-3.0.4-9.svn729
but even then gstreamer-java tests failed segfault, so i rebuild:
libffi-3.0.5-1
and and after then jna again with this libffi, and after that the
current mercurial gstreamer-java build and the test also runs with a few
warning on rhel too:-))))
all rpm for fedora and rhel/centos can be found at:
http://www.lfarkas.org/linux/packages/
so i check in the new spec file ready to 1.0 (commented the
fedora/rhel/centos specific patch to use system jar files).