Building RPM's with Java alternatives
by Kenneth Porter
I have the Sun JDK installed on FC2 using the -compat package from JPackage
and I'm trying to rebuild the new subversion-1.3.0-2 SRPM. I get a bunch of
compile errors for the javahl subpackage from what appear to be header
incompatibilities. Has anyone tried this?
(I had to patch the subversion spec file to use the more generic link to
the JDK and to set the BuildRequires to the generic JDK-compat Provides
instead of the gcj-specific one.)
I'll reply back to this thread as I learn more, with more details about
exactly what is happening. I just wanted to see if anyone else has tried
substituting the Sun JDK for gcj and run into something similar.
17 years, 8 months
Re: [fedora-java] RE: Thread registration work-around?
by Tom Tromey
>>>>> "Hans" == Boehm, Hans <hans.boehm(a)hp.com> writes:
Hans> I agree with Tom Tromey's comment that the LD_PRELOAD issue should be
Hans> solvable, at least in this case.
For today we backed out the LD_PRELOAD fix.
This isn't what we want for FC5, but we had to make some decision
today, and this was simplest and let builds work on the s390.
Tom
17 years, 8 months
RE: Thread registration work-around?
by Anthony Green
On Tue, 2006-01-03 at 16:46 -0800, Boehm, Hans wrote:
> As far as I can tell, this looks like a good (hopefully temporary!)
> workaround for this case.
Thanks Hans.
Andrew, could you please try this patched SRPM with the x86-64 Eclipse
to see if it fixes the problem?
http://people.redhat.com/green/java-1.4.2-gcj-compat-1.4.2.0-40jpp_56rh.1...
Tom - here's my java-gcj-compat patch:
006-01-04 Anthony Green <green(a)redhat.com>
* Makefile.am (pr13212.so): Build pr13212.so.
* pr13212.c: New file.
* java.c (main): Set LD_PRELOAD.
* configure.ac: Bump release number to 1.0.46.
Index: Makefile.am
===================================================================
RCS file: /cvs/rhug/java-gcj-compat/Makefile.am,v
retrieving revision 1.24
diff -u -r1.24 Makefile.am
--- Makefile.am 14 Nov 2005 20:58:56 -0000 1.24
+++ Makefile.am 4 Jan 2006 10:53:19 -0000
@@ -15,6 +15,9 @@
$(tools_jar_class_files): %.class: %.java
$(JAVAC) -d . -I . $<
+pr13212.so: pr13212.c
+ $(GCJ_BIN_DIR)/gcc$(gcc_suffix) $(CFLAGS) -shared -o $@ $< -lgcj
+
libjawt.so:
echo | $(GCJ_BIN_DIR)/gcc$(gcc_suffix) -shared -O2 -fpic -o libjawt.so -Wl,-soname,libjawt.so -xc - -lgcjawt
@@ -24,13 +27,14 @@
java: java.c
$(GCJ_BIN_DIR)/gcc$(gcc_suffix) -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" -DARCH="\"$(CPU)\"" -DGCJ_BIN_DIR="\"$(GCJ_BIN_DIR)\"" -o $@ $<
-all-local: java libjawt.so
+all-local: java libjawt.so pr13212.so
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)
$(mkinstalldirs) $(DESTDIR)$(JRE_BIN_DIR)
$(mkinstalldirs) $(DESTDIR)$(SDK_BIN_DIR)
$(INSTALL) -m 755 libjawt.so $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so
+ $(INSTALL) -m 755 pr13212.so $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/pr13212.so
$(INSTALL) -m 755 java $(DESTDIR)$(JRE_BIN_DIR)/java
$(INSTALL) -m 755 java $(DESTDIR)$(SDK_BIN_DIR)/java
@@ -62,6 +66,7 @@
uninstall-local:
rm -f $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so
+ rm -f $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/pr13212.so
rm -f $(DESTDIR)$(JRE_BIN_DIR)/java
rm -f $(DESTDIR)$(SDK_BIN_DIR)/java
@@ -71,6 +76,7 @@
CLEANFILES = \
java \
libjawt.so \
+ pr13212.so \
$(tools_jar_class_files) \
tools.jar \
com/sun/tools/javac/Config.class
Index: java.c
===================================================================
RCS file: /cvs/rhug/java-gcj-compat/java.c,v
retrieving revision 1.1
diff -u -r1.1 java.c
--- java.c 7 Sep 2005 00:19:07 -0000 1.1
+++ java.c 4 Jan 2006 10:53:19 -0000
@@ -1,4 +1,4 @@
-/* java.c -- set LD_LIBRARY_PATH and exec gij
+/* java.c -- set LD_LIBRARY_PATH, LD_PRELOAD and exec gij
Copyright (C) 2005 Red Hat
This file is part of java-gcj-compat.
@@ -45,9 +45,42 @@
{
int error_code = 0;
char *libpath = NULL;
+ char *preload = NULL;
+ char *newpreload = NULL;
char *newpath = NULL;
int newlen = 0;
+ preload = getenv ("LD_PRELOAD");
+
+ if (preload && preload[0] != '\0')
+ {
+ newlen += strlen (preload);
+ // for the separating ' '
+ newlen += 1;
+ }
+
+ newlen += sizeof (JAVA_HOME) - 1;
+ newlen += sizeof ("/lib//pr13212.so") - 1;
+ newlen += sizeof (ARCH) - 1;
+
+ newpreload = (char *) malloc (newlen + 1);
+
+ if (newpreload != NULL)
+ {
+ if (preload && preload[0] != '\0')
+ snprintf (newpreload, newlen + 1,
+ "%s/lib/%s/pr13212.so %s", JAVA_HOME, ARCH, preload);
+ else
+ snprintf (newpreload, newlen + 1, "%s/lib/%s/pr13212.so", JAVA_HOME, ARCH);
+ }
+
+ setenv ("LD_PRELOAD", newpreload, 1);
+
+ free (newpreload);
+
+
+ newlen = 0;
+
libpath = getenv ("LD_LIBRARY_PATH");
if (libpath && libpath[0] != '\0')
Index: pr13212.c
===================================================================
RCS file: pr13212.c
diff -N pr13212.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pr13212.c 4 Jan 2006 10:53:19 -0000
@@ -0,0 +1,87 @@
+/* pr13212.c -- LD_PRELOAD this library to work-around GCC pr 13212.
+ Copyright (C) 2006 Red Hat, Inc.
+
+This file is part of java-gcj-compat.
+
+java-gcj-compat is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+java-gcj-compat is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with java-gcj-compat; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+#define _GNU_SOURCE
+#include <dlfcn.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+// A pointer to the real pthread_create
+
+static int (*pthread_create_) (pthread_t *__restrict __newthread,
+ __const pthread_attr_t *__restrict __attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg);
+
+
+// The Boehm collector's pthread_create wrapper.
+extern int GC_pthread_create (pthread_t *__restrict __newthread,
+ __const pthread_attr_t *__restrict __attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg);
+
+// The start routine used by the Boehm collector. We'll use this to
+// recognize pthread_create calls made by the collector's wrapper.
+extern void *GC_start_routine (void *);
+
+
+/* Force constr to execute prior to main(). */
+static void constr (void) __attribute__ ((constructor));
+
+static void
+constr (void)
+{
+ /* Get a pointer to the real pthread_create(). */
+ pthread_create_ = dlsym (RTLD_NEXT, "pthread_create");
+
+ if (pthread_create_ == NULL)
+ abort ();
+}
+
+/** Wrap the pthread_create function. */
+int pthread_create (pthread_t *__restrict __newthread,
+ __const pthread_attr_t *__restrict __attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg)
+{
+ // Call the real pthread_create() if we're called from boehm's wrapper,
+ // and call boehm's wrapper otherwise.
+ if (__start_routine == GC_start_routine)
+ return pthread_create_ (__newthread, __attr, __start_routine, __arg);
+ else
+ return GC_pthread_create (__newthread, __attr, __start_routine, __arg);
+}
Index: configure.ac
===================================================================
RCS file: /cvs/rhug/java-gcj-compat/configure.ac,v
retrieving revision 1.49
diff -u -r1.49 configure.ac
--- configure.ac 16 Nov 2005 00:09:50 -0000 1.49
+++ configure.ac 4 Jan 2006 10:53:19 -0000
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(java-gcj-compat, 1.0.45, fitzsim(a)redhat.com)
+AC_INIT(java-gcj-compat, 1.0.46, fitzsim(a)redhat.com)
AM_INIT_AUTOMAKE(1.9.2)
AC_CONFIG_SRCDIR(com/sun/tools/javac/Main.java)
AC_CANONICAL_HOST
17 years, 8 months
RE: [fedora-java] Proper way to add user-access to cdrom?
by Dan Thurman
>From: fedora-devel-java-list-bounces(a)redhat.com
>[mailto:fedora-devel-java-list-bounces@redhat.com]On Behalf Of
>Daniel B.
>Thurman
>Sent: Saturday, January 07, 2006 3:28 PM
>To: Fedora Java Development List (E-mail)
>Subject: [fedora-java] Proper way to add user-access to cdrom?
>
>
>
>Hi Folks,
>
>What is the proper way to enable selected users access
>to the CDROM, especially if they log in remotely. I use
>VNC to remote login to my linux box all the time when I
>am even in the same room.
>
>I can get access to the CDROM as root user via VNC
>but I dont want to do that.
>
>I added myself as a user to the 'disk' group file, but that
>does not seem to be the trick.
>
>Any pointers?
>
>Kind regards,
>Dan
>
>--
>No virus found in this outgoing message.
>Checked by AVG Free Edition.
>Version: 7.1.371 / Virus Database: 267.14.15/223 - Release
>Date: 1/6/2006
>
>
DRAT. Sent to the wrong newsgroup. Please ignore.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.15/223 - Release Date: 1/6/2006
17 years, 8 months
Proper way to add user-access to cdrom?
by Dan Thurman
Hi Folks,
What is the proper way to enable selected users access
to the CDROM, especially if they log in remotely. I use
VNC to remote login to my linux box all the time when I
am even in the same room.
I can get access to the CDROM as root user via VNC
but I dont want to do that.
I added myself as a user to the 'disk' group file, but that
does not seem to be the trick.
Any pointers?
Kind regards,
Dan
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.15/223 - Release Date: 1/6/2006
17 years, 8 months
RSSOwl
by Anthony Green
Here's an RSSOwl 1.2 SRPM (and itext dependency SRPM) suitable for
submission to FE:
http://people.redhat.com/green/FE/devel/
This is based on the work that Robin Green and Andrew Overholt did.
I modified itext to not encode images in JPEG (since we don't support
that yet), and rssowl was modified to use standard JCE classes instead
of the bundled BlowfishJ.jar. I also had to tweak the SWT code a little
to work with the version we ship.
It seems to work well for me (with my pr13212.so hack). It would be
nice if others could try it before I go through the submission process.
Thanks,
AG
17 years, 8 months
Problem with find command in rebuild-gcj-db.in
by David Walluck
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
$ find --version
GNU find version 4.2.27
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION
find seems to want find -L and not find ... -follow
Looking at the manpage, these options are slightly different. I didn't
seem to have an error with the same find version on x86_64, but the
problem did pop up on i586, but I don't have the exact message right now.
- --
Sincerely,
David Walluck
<david(a)zarb.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDvap5arJDwJ6gwowRAm+jAJ41w7gpK5gh/6X471mJiynwOk4mnwCfWc5J
2DdhrAq5YmV79l29vVKo6pg=
=z7t/
-----END PGP SIGNATURE-----
17 years, 8 months
RSSOwl, SWT, and table sorting
by Pete Zaitcev
Hi, Anthony,
I have a question for you. What does happen if you click into column
headers to sort them? When I use the SWT from RSSOwl CVS, the sort
indicator in the table headers disappears. Ben Pasero says it's a bug
in SWT. I sent him a patch (attached), but he's not taking it.
So, I'd like to know if it's the same with your SWT.
Greetings,
-- Pete
http://sourceforge.net/tracker/index.php?func=detail&aid=1389434&group_id...
Index: rssowl_linux/src/java/net/sourceforge/rssowl/controller/sort/SortingSelectionAdapter.java
diff -u -r1.5 SortingSelectionAdapter.java
--- rssowl_linux/src/java/net/sourceforge/rssowl/controller/sort/SortingSelectionAdapter.java 6 Nov 2005 18:34:15 -0000 1.5
+++ rssowl_linux/src/java/net/sourceforge/rssowl/controller/sort/SortingSelectionAdapter.java 24 Dec 2005 08:25:00 -0000
@@ -201,6 +201,9 @@
if (table.getSelectionCount() > 0)
selectedNews = table.getSelection()[0].getText(1);
+ /** Remove All tableitems. This clears the Sort Indicator, too. */
+ table.removeAll();
+
/** Show a Sort Indicator inside the selected TableColumn */
if (!tc.getData().equals("TABLE_HEADER_STATUS")) {
table.setSortColumn(tc);
@@ -236,9 +239,6 @@
table.setSortColumn(null);
}
- /** Remove All tableitems */
- table.removeAll();
-
/** Create new, sorted table */
NewsTable.fillTable(table, newsItems, newsItemOrder, newsItemInfos, performSearch, columnWidth);
17 years, 8 months
avalon-framework and doclet classes
by Anthony Green
Gary -
I was trying to build something recently that required
org.apache.avalon.framework.logger.Log4JLogger from avalon-framework.
The avalon-framework.jar file in FC4 appears to be missing this class.
I grabbed the SRPM file from rawhide and attempted to build that
instead. The build failed with this...
[javadoc] java.lang.ClassNotFoundException: com.sun.tools.doclets.standard.Standard not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
I've seen this before. It seems that our com-sun-javadoc or
com-sun-tools-doclets-Taglet jar should be on the default classpath
somehow.
In any case, I noticed that this build of the jar file includes the
proper class, but as far as I can tell, this is the same SRPM that was
used in FC4. Why wouldn't the FC4 jar file contain the Log4JLogger
class?
Thanks!
AG
17 years, 8 months
64-bit java code
by Anthony Green
On x86-64 systems we're building all the java bits as 64-bit. Has
anybody looked at whether or not this is a good idea (vs 32-bit), or is
it just done that way by default?
AG
17 years, 8 months