Re: [classlib] porting to other platforms
Hi Hi, I'm interested in the task of porting classlib to the 64bit platform (em64t/amd64). At this moment, classlib's source structure and build system doesn't support the diversity of platforms. Let's discuss what changes have to be made to support other platforms. One way is to move platform-dependent to the appropriate directory. For example, port--linux --ia32 --em64t --ipf makefile and to add platform determination and proper files selection to the makefile. I always do this way when it comes to write multi platform code because I like to keep everything clean and organized. The other way is to select the platform-dependent code by the preprocessor difine directives and to include the platform determination and the difines setting to the top-level build files (unfortunatly it doesn't work with asm files). That taints the code but it's the most used way, and of course, assembly code should reside in separate files. Multi-platform code forces you to deal with the triplet: CPU, OS, Compiler Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE] Acceptance of HARMONY-438 : DRL Virtual Machine Contribution
+ 1 I have received the ACQs and the BCC for Harmony-438, so I can assert that the critical provenance paperwork is in order and in SVN. Please vote to accept or reject this codebase into the Apache Harmony class library : [ ] + 1 Accept [ ] -1 Reject (provide reason below) Lets let this run a minimum of 3 days unless a) someone states they need more time or b) we get all committer votes before then. I think that getting this into SVN and letting people supply patches against SVN will be productive... geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Happy Birthday Harmony!
Today is Harmony's 1st birthday :) geir Happy birthday from Italy :-) Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DRLVM contribution - try this out!
Hi Andrey, I took a brief look at the code and the documentation, and noticed that DRLVM is written in C++ instead of plain C. Is there any particular reason for using C++? Could you briefly tell us the story of DRLVM? Enrico Dear All, I'm happy to announce the contribution of the DRL Virtual Machine on behalf of Intel.. - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [msvs] signals Re: Starting my next round on BootJVM
Does any onw know if newer editions of MSVS libraries handle more than these few signals? Dan Lydick Hi Dan, here are two interesting posts: http://archives.postgresql.org/pgsql-hackers-win32/2003-10/msg00025.php http://openvpn.net/archive/openvpn-devel/2004-08/msg00012.html Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[port library] windows manager
Tim Ellison wrote: Enrico Migliore wrote: snip problem 4: Native code dependancies --- The Harmony class library depends on the port layer: http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/classlib/trunk/doc/vm_doc/html/index.html Is this layer available for MSVC? Yes it is written using MSVC (and in fact would require some modification to make it work with gcc on Windows). Regards, Tim Hi Tim, does the MSVC port library support the windowing system of Windows? And yet, what happened to the proposal of using the Apache Portable Runtime as an interface to the native layer? Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [port library] windows manager
Hi Tim, Enrico Migliore wrote: does the MSVC port library support the windowing system of Windows? No (but I can recommend SWT as a cross-platform windowing model ;-) ) the consequence of that is that, at the moment, the Harmony Class Library can only support console based applications, right? I don't get exactly how and in which terms we can use the SWT (cross-platform GUI develiped by IBM) Does instead, the port library for UNIX support any windows manager? And yet, what happened to the proposal of using the Apache Portable Runtime as an interface to the native layer? I believe it remains a proposal. Artem Aliev did some work on using APR as a portability layer (by coding the Harmony portlib to APR) in late February, and reported his findings to the list[1]. AFAIK nobody has continued this work. [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200602.mbox/[EMAIL PROTECTED] Regards, Tim I see ciao, Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sablevm] SIGSEGV signal received from Cygwin
Hi Etienne, Enrico Migliore wrote: I debugged the classical HelloWorld class with DDD and found the problem in the following function: _svmf_init(void) { pthread_once(...); SEGSEGV signal That's definitely a cygwin bug. I see. The SEGSEGV signal is issued by Windows when the program does an Illegal storage access. The following simple example does receive the signal: void my_function (char *pippo) { pippo[0] = '\0'; } int main (int argc, char** argv) { my_function(Hello World); return 0; } Yet, I remember, that in JCHEVM I had to remove the POPT_AUTOHELP string in a struct in order not to receive that signal, therefore, I'm pretty much sure that somewhere in the Pthread library there's an access to an area used to initialize constants: something that maybe GCC likes but Windows doesn't. That's just a guess. In any case, before starting the port, I think that I and the people who would like to help, will have analyze the code file by file. Actually, you should really start looking at: src/libsablevm/include/jni_system_specific.h src/libsablevm/system.c src/libsablevm/system.h These are the files which contain system-specific code. Outside of these files, the only real dependencies are POSIX calls. [I think there's some exception in System.getCurrentMillis() implementation that shouldn't even be in the VM to start with, as there's no VM-specific functionality in it... I had to live with Classpath's decisions on their VM interface.] If you really want to read every single source file (!), then you should definitely: 0.1) [prerequisite] read the JVMS fully, a few times over 0.2) [prerequisite] read the JNI spec fully, a few times over 1) read my Ph.D. thesis 2) read the documents in doc/ 3) ask questions on sablevm-devel@ for clarifications Going that deep shouldn't be necessary, though. Identifying POSIX dependencies and replacing them with VMI-port calls should be sufficient to start with. Etienne The documentation included in SableVM trunk is more than good. Therefore, I would like to try do this job. I'm not sure I'll succeed but I want to As far as the port is concerned, there are 3 things to talk about: build system in MSVC --- to my knowledge, MSVC doesn't have a build system like UNIX (autotool + configure) therefore, I think that the config.h file will have to be built manually. how to modify the source files? -- Let's say that removing a POSIX dependancy in a SableVM file means: replacing some lines of codes and replacing some include files. How am I suppost to deal with this kind of thing? Should I modify the trunk or my sandbox? how to track source modifications -- Let's say that one source file gets modified by one of SableVM developers, and another is added to the trunk. Should I rely on SVN to know where the modifications were done? ciao, Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [port library] windows manager
Hi Tim, Of course, the plan is for Harmony to have AWT and Swing code. Ok Does instead, the port library for UNIX support any windows manager? AFAIK you generally choose a windowing manager and code to it -- I'm unaware of any cross-manager port libraries (but I'm not a UI person so there may well be such a thing). Regards, Tim I see what you are saying: all windowing native issues are managed by SWT or AWT, therefore the port library dosen't include and windowing native functions. Right? Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sablevm] SIGSEGV signal received from Cygwin
Hi, I'm doing some testing on SableVM, and noticed that is receives the very same segmentation fault signal that JCHEVM does, from pthread_key_create() which is embedded in: /usr/bin/cygwin1.dll I read around that this problem could be fixed, but the error means that the Cygwin platform can only be used for developing, studying and testing and not for real world use. Let me recap the problems we face when trying to port JCHEVM and SableVM on Windows: problem 1: POSIX dependancy - The code contains a certain number of POSIX calls (dependancies). Much of them can be easily replaced, but some might be hard to replace. problem 2: GCC extensions - The code contains some GCC extensions which are not ANSI. problem 3: Which compiler? - GCC seems to be the best candidate but MSVC is more popular. problem 4: Native code dependancies --- The Harmony class library depends on the port layer: http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/classlib/trunk/doc/vm_doc/html/index.html Is this layer available for MSVC? Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting my next round on BootJVM
Hi Dan, Enrico, Are you able to compile this latest source level? I'm busy at the moment and didn't download your latest snapshot. Sorry :-( Whether you can or not, would you mind to send me your MS project and MS workspace files (I forget if this is the right name on VS. Maybe this is just Eclipse nomenclature.) I would like to look at using your settings as the starting point for MSVS compilations. Dan Lydick Yes, I can send you the source and the workspace files. E-mail is fine? The tag used for commenting out the code are: (four slashes) enrico: (my name) I just checked and notice that the number of modifications I did is really little. The major work was moving the declarations of a certain number of stack variables up to the top of the body of the function, as shown in the follwing example: old_function: int my_func (void) { printf(Ciao); int i; i=0; return i; } new_function: int my_func (void) { int i; printf(Ciao); i=0; return i; } Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sablevm] SIGSEGV signal received from Cygwin
Hi Etienne, Enrico Migliore wrote: I'm doing some testing on SableVM, and noticed that is receives the very same segmentation fault signal that JCHEVM does, from pthread_key_create() which is embedded in: /usr/bin/cygwin1.dll I read around that this problem could be fixed, but the error means that the Cygwin platform can only be used for developing, studying and testing and not for real world use. Can you expand a little on this. I am not sure what you mean. I debugged the classical HelloWorld class with DDD and found the problem in the following function: _svmf_init(void) { pthread_once(...); SEGSEGV signal } problem 1: POSIX dependancy - The code contains a certain number of POSIX calls (dependancies). Much of them can be easily replaced, but some might be hard to replace. I think that moving to Harmony's port library should solve this. I agree that it shouldn't be hard to fix. Are you referring to the work-in-progress that is adapting SableVM to the VMI? problem 2: GCC extensions - The code contains some GCC extensions which are not ANSI. When compiling a switch interpreter (--with-treading=switch), there shouldn't be GCC extensions. The only exception is atomic operations which cannot be expressed in C. Yet, I've found an elegant solution to this: use Hans Boehm's atomic_ops library to get this code out of SableVM. See: http://sablevm.org/bugs/179 Ok problem 3: Which compiler? - GCC seems to be the best candidate but MSVC is more popular. Ideally, I'd like both to work. Getting the faster direct/inlined interpreters to work with MSVC might be tricky (require inline assembly or linking to an asm library), but the switch interpreter shouldn't be a problem. I see what you're saying problem 4: Native code dependancies --- The Harmony class library depends on the port layer: http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/classlib/trunk/doc/vm_doc/html/index.html Yep, using this layer and atomic_ops should hopefully be sufficient to remove all system-specific dependencies. If anything is missing, we should probably abstract it into the port layer. In any case, before starting the port, I think that I and the people who would like to help, will have analyze the code file by file. Now, the interesting thing would be for Harmony native code to compile and work on something other than ia32. SableVM already works on pretty much anything (using gcc, so far), as long as libffi and GNU classpath compiles on the target. The only other limitation is 2 operations that cannot be expressed in C: compare_and_swap and clear_cache. Etienne That's another reasonable goal :-) Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting my next round on BootJVM
Hi As far as I can say, the main problem of porting a JVM, designed for UNIX, to the Windows environment are the ANSI signals: Windows, in fact, doesn't honor not even a fourth of all ANSI signals, therefore, the JVM signals handler WILL NOT be called by Windows. I am not an MSVS expert, but my previous MS C/C++ work has had no problem using the signal library, which was in any case borrowed from Unix, so I don't think this will be a problem. The only signal I really need is SIGALRM for the time slicer. If nothing changed since MSVC 6.0 (1999), the signals available in Windows are: SIGABRT,SIGFPE,SIGILL,SIGINT,SIGSEGV,SIGTERM Yet: The SIGILL, SIGSEGV, and SIGTERM signals are not generated under Windows NT. They are included for ANSI compatibility I don't know yet if and how Cygwin deals with this kind of problem... Those who have compiled it had misc. header files to adjust, but nobody has so far complained about signals. Thanks, Dan Lydick snip ... Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting my next round on BootJVM
bootjvm wrote: All, After some piecemeal fits and starts on the BootJVM code, I am about ready to get started on another round. I am checking in the opcode work that brings this JVM to a place of basic functioning except for the ATHROW opcode, which is my first order of business with this round of work. Once that is done, this program should be functional JVM that run simple classes. At this point, I will have a list of enhancements to make it work properly with a class library, with non-local native code, etc. This checkin involves extensive changes to only a few source files. The others are enhancements, comments, white space, function prototypes, and the like. Dan Lydick Hi Dan, I would like to remark that BootJVM can be built with the Microsoft Visual C compiler. Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting my next round on BootJVM
Hi Dan, I built BootJVM with MSVC in November 2005 but, as you told me, bootJVM couldn't run any Java application because it was not completed yet. Enrico, That is great news! Could you work with me to produce MSVS project and workspace files for this, please? At the moment I'm working on JCHEVM and SableVM on Cygwin therefore I'm a bit busy, but I rembember that the port was easy (even though I had to comment out a few lines of code which will have eventually be replaced by Windows functions). I still have the project files and I also marked with tags the point where I commented out the code. I would like to begin a general migration into this environment and I will need to ask you a few questions so as to be able to run the configurator (perhaps once on CygWin or Linix and checked in to SVN) to generate these automagically so that VS users do not have to run the Unix-ish configuration utility. As far as I can say, the main problem of porting a JVM, designed for UNIX, to the Windows environment are the ANSI signals: Windows, in fact, doesn't honor not even a fourth of all ANSI signals, therefore, the JVM signals handler WILL NOT be called by Windows. I don't know yet if and how Cygwin deals with this kind of problem... Thanks for your research on this platform. Dan Lydick P.S. Has anyone yet tried to build BootJVM on a Mac or other PPC platform? If you are interested, I can show you how to hack up the configurator to get started. Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SableVM on Cygwin
hi folks, I've just built SableVM and Classpath-0.20 on Cygwin without problems and the HelloWorld console application runs perfectly :-) While waiting for the VMI interface to be ready, I'm gonna do the following steps: 1. Try to enable the -no-cygwin GCC flag 2. Try to setup the mingw environment for building JCHEVM and SableVM without Cygwin 3. Make some experimentations with the help of DDD. Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SableVM or JCHEVM?
Hi Etienne, 2 things: 1- SableVM has, from the beginning, put portability as one of its main objectives. This is why we went all the way to write an inline-threaded interpreter engine, as to get as much speed without sacrificing portability and requiring knowledge of intimate details of the target platform (assembly language, ABI, etc.). We also kept easier to port interpreters (switch and direct threaded). Good. The switch-threaded interpreter is a pure ISO C interpreter, does not emit a single gcc warning with -pedantic on. That's what I like most: source code that compiles clean :-) I bet that the -ansi flag does the same. The other two interpreters require gcc extensions (and/or a little inline-assembly code). 2- The SableVM project will not be abandoned any time soon. It is one of my main research vehicles, and I am a relatively young tenured professor at UQAM. Unlike many other open source JVMs which are primarily the project of students, SableVM is a project driven by a paid professor. I see... You should chose to work on the project that you feel most comfortable to contribute to. I don't know of any open-source VM that would reject contributions (at least, without a good reason). :-) Have fun! Etienne I'll download and build the SableVM source code and play a little with it. ciao, Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JCHEVM
Mark Hindess wrote: On 4/1/06, Enrico Migliore [EMAIL PROTECTED] wrote: I, and others, ported JCHEVM to Cygwin, during the past 2 months; there are still a couple of things to fix, but the main work is done. The port was made in order to be able to study JCHEVM on the Windows platform. I understand, in fact, that having the Cygwin layer running on top of Windows may compromise speed performances of any JVM. In principle, the -no-cygwin option of GCC should allow us to produce an executable that doesn't need the cygwin1.dll library, but: 1. I haven't yet tried to enable it 2. The functionality of cygwin1.dll might be embedded in the executable file (in this case the Cygwin layer is hidden in the .exe) I don't think it does include cygwin in any form. It builds against the mingw libraries instead. Regards, Mark. -- Mark Hindess [EMAIL PROTECTED] IBM Java Technology Centre, UK. Hi Mark, that's interesting and I think it's worth trying to build JCHEVM in that way. I don't know though if Windows issues the signals that JCHEVM needs Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SableVM or JCHEVM?
Hi, I've followed the discussion about the SableVM code donation to the Apache foundation, but I still need to understand a couple of things: SableVM or JCHEVM? At the moment there two virutual machines: which of the two should one choose to work on? SableVM svn access - I can't find the SableVM repository in the Harmony site, can somebody address me where to find it? Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SableVM or JCHEVM?
Hi Etienne, Hi Enrico, SableVM's trunk ( svn co svn://svn.sablevm.org/sablevm/trunk ) is now licensed under the Apache License 2.0. As SableVM is maintained by a number of developers, but is also used by many of my students to develop new VM components and do research, it was deemed more appropriate not to put SableVM in Harmony's repository for the following reasons: 1- Harmony's repository is not the appropriate place for creating many, many branches to do academic research on VMs. 2- Keeping a clear Intellectual Property trail would be a nightmare if SableVM's development and maintenance was spread over two distinct repositories. 3- According to Geir, integration of the VM into Harmony's repository is not a preriquisite for J2SE certification. ok, got it :-) The SableVM project has chosen to integrate our VM with Harmony's class library. In particular, I have started with a student to implement Harmony's VMI. Our objective is to fully adapt SableVM to work with Harmony's VMI as is. If I understand JCHEVM's approach, they are going in a different direction; they are developing a GNU Classpath compatibility layer so that Classpath-based VMs could migrate to Harmony with little effort. ok SableVM's goal is to become entirely dependent on Harmony's LUNI packages, as we do like Harmony's VMI. This will have the consequence of breaking SableVM's compatibility to Classpath's LUNI packages. Yet we do not see this as a problem; you will still be able to use Classpath other packages with SableVM (awt, swing, etc.). So, if you wish to contribute to SableVM for helping with the Harmony integration, please join us at http://sablevm.org. If you are interested, we'll use the SableVM developer mailing-list to coordonate the Harmony adaptation effort. I, and others, ported JCHEVM to Cygwin, during the past 2 months; there are still a couple of things to fix, but the main work is done. The port was made in order to be able to study JCHEVM on the Windows platform. I understand, in fact, that having the Cygwin layer running on top of Windows may compromise speed performances of any JVM. In principle, the -no-cygwin option of GCC should allow us to produce an executable that doesn't need the cygwin1.dll library, but: 1. I haven't yet tried to enable it 2. The functionality of cygwin1.dll might be embedded in the executable file (in this case the Cygwin layer is hidden in the .exe) My ultimate goal, is contributing to the development of a reliable JVM which will run on the ARM platform, because I work in the embedded systems area. I don't care if such a goal will be achieved in 2 or 3 years, the only thing I care is not to waste my time in volunteering on a thing that may be abandoned. Enrico - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SableVM and Harmony Class library
Hi, The main document on porting is at: http://tinyurl.com/jfljq The VM Interface is described at: http://tinyurl.com/gtd64 and the required kernel classes are described at: http://tinyurl.com/hawkl Regards, Mark. Hi all, I'm reading the documentation above and, at first glance, it seems to me that interfacing the SableVM to the Harmony Class Library is a task that involves the following steps: step 1 -- The SableVM /has to/ implement the VM interface, in order for the Harmony Class Library to find the entry points of a certain number of native functions. The entry points are documented here: http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/classlib/trunk/doc/vm_doc/html/group__VMInterface.html step 2 -- The SableVM has to implement a Java interface, which means that is /has to/ implement in C a small set of Java classes, documented in the following link: http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/classlib/trunk/doc/kernel_doc/html/index.html#KernelJavaClasses step 3 -- The SableVM, in terms of native functions, /should/ call only the native functions of the port layer, used by the Harmony Class Library: http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/classlib/trunk/doc/vm_doc/html/group__Port.html#CreatePortLib Comments are welcome :-) Enrico
Re: VMI Questions
Etienne Gagnon wrote: Hi Weldon, I've started reading about the VMI. While my initial goal would be to get SableVM to work with Harmony as a drop-in replacement for IBM's VM, I have some questions about some assumptions of the VMI. Hi Etienne, could you tell me where I can find the documentation of the VMI? thanks a bunch, Enrico
Re: SableVM / Harmony Collaboration
Etienne Gagnon wrote: Hi All, Good news! I have received all the necessary permissions to license SableVM under the Apache License 2.0 (AL2). See: http://sablevm.org/lists/sablevm-devel/2006-March/000620.html I hope that licensing SableVM under the AL2 will mark the start of a nice collaboration between the Harmony and SableVM projects. I think that a model of collaboration has been shaping up in recent discussions: - SableVM development stays on http://sablevm.org . Some individual Harmony developers will hopefully submit patches and gain commit privileges, but must then do so under SableVM's traditions and contribution policy. - Some SableVM individual contributors will hopefully want to contribute patches and code to the Harmony class libraries. They will have to do so under Harmony's traditions and contribution policy. [I will most probably be in this category. Feel rested; I won't ask for any special treatment just for submitting a patch now and then!] - Discussions continue to happen on the appropriate dev@ mailing list (no cross-posting please!). - Everyone smiles and is happy! The world is beautiful. :-) Hmmm... Have I got something wrong? Cheers, Etienne PS: Please be patient. It will probably take a little time to double check everything before making the official license change in our repository. We certainly don't want to have any license conflict in code we distribute. Great! Enrico
Re: Contributing SableVM?
Geir Magnusson Jr wrote: Second, we need to discuss here in Harmony the approach we want to take with adopting the community of committers. We have many people here that are not committers that have been working hard earning commit status, so we need to be careful not to discourage anyone. On the other hand, to me, when someone brings a large chunk of software with the intention of continuing to work on it in a community, that shows a reasonable amount of commitment, one of the things we look for in committers. What we don't know are technical competency of the people, and how they fit into the community, both in working with others as well as alignment of vision. Possibilities : 1) Donate the code, submit patches, earn commit. 2) Donate the code, and some number of people come in with it with commit granted to the sableVM part of the repository, and interaction with the other parts of the codebase are done via patch until earned. All existing committers have full access, but simple manners would dictate we wouldn't go barging into code we don't understand. 3) Donate the code, some # of people come in w/ full commit. My personal preference is #2, #1, #3. While I don't like balkanization of #2, but it has some balance to it - people don't just get full commit by bringing some code, but still have to earn ot. Yet, they continue to work on the code they know. I like #3 the least, because we have others in the community working hard to earn their full commit and it is something to be earned... Comments all? geir Hi, I think option #2 is more than reasonable. Yet, having a large number of programmers (Harmony + SableVM) involved in the development of JC is a promising step. As far as I am concerned, it will take time to study the SableVM code and its build system before being productive, but that's not a problem. Enrico
Re: [resolved] Re: JCHEVM SVN access temporarily blocked
Hi Geir, I've just removed the blocks on SVN and viewcvs as the claim has been resolved to everyone's satisfaction. ok, good. I'd like to thank everyone involved for approaching this earnestly and in good faith, working together to get this problem fixed. As a benefit, we've built a bridge between our Harmony community and members of the SableVM community, and I look forward to working with them in the future. wouldn't it be possible to unify Harmony and SableVM contributors' efforts, in order to have just one JVM and one group of work? geir Enrico
Re: [resolved] Re: JCHEVM SVN access temporarily blocked
Hi Etienne, Hi Enrico, I have started a public discussion on the SableVM developer list, and also got in private contact with various SableVM authors (as most are very shy, when it comes to writing in English) to prepare a donation to the Harmony project. See: http://sablevm.org/lists/sablevm-devel/2006-March/000608.html I read the thread you are referring to and kindly reported here an excerpt: Also, contributing the SableVM code base to Harmony would not mean the end of the SableVM project, far from that! It would simply lead to the following development model: 1- The day to day maintenance of the general usage virtual machine would be happen within the Harmony project. 2- The SableVM code repository would keep a synchronized copy of the Harmony trunk as a root for developing new features and doing research, and for development in sandboxes. Personally, I am quite excited at the opportunities. I think that the opportunity, in terms of number of programmers involved and knowledge share, that we all are facing is great. You (and all Harmony developers) are welcome to join the discussion. :-) Etienne thanks :-) Enrico Migliore wrote: wouldn't it be possible to unify Harmony and SableVM contributors' efforts, in order to have just one JVM and one group of work? Enrico
Re: [jchevm] Harmony Class Lib does Hello World on a GNU Classpath JVM
Weldon Washburn wrote: Archie, I can now run the below multithread Hello.java on JCHEVM using Apache Harmony Class Library. The output toggles between clumps of Hello World and clumps of * as WindowsXP schedules the two application threads. This is behavior I would expect. I use System.out.write() because System.out.println() does not work yet. A summary follows: Mods to JCHEVM to get it to work 1) I was not able to find the _JC_LIB_ENTRY that is intended for read/writing files. I gave up and borrowed JCNI_java_lang_VMThread_nativeSetPriority(). Instead of actually changing thread priority, it now does a fprintf(stdout, %s, priority); fflush(stdout); Perhaps you can tell me what native method I should be using. 2) I commented out some stuff in bootstrap.c that was dragging in specific gnu classpath *.class files like Lgnu/classpath/Pointer; We should discuss the best solution for this item. Harmony Class Lib that were modified to get it to work: Runtime.java -- expected wrapper code. e.g., add VMRuntime.exit() to Runtime.exit() Method.java, Field.java, Constructor.java -- minor mods System.java -- added VMSystem.setOut, setErr... etc ThreadGroup.java -- wrappers Class.java -- wrappers Object.java -- wrappers String.java -- implemented a very simple intern() Thread.java -- added a bunch of fields that JCHEVM accesses, added code to start() to create ThreadGroup.root if it does not already exist Throwable.java -- wrappers ClassLoader.java -- commented out abstract keyword on class definition (too lazy to create a sub-class), added fields that JCHEVM accesses, added code getSystemClassLoader to actually create an object and stuff it in systemClassLoader if it does not already exist. added a bunch of wrapper code. OSMemory -- hacked out a bunch of stuff that was in the way OSFileSystem -- add an ugly hack in writeImpl() to revector chars to Thread.setPriority() One last item. I don't know which SVN repository to place this work in. Any suggestions? Thanks Weldon ## class Hello extends Thread { public static void main(String args[]) { byte [] ba = new byte[64]; ba [0] = 'H'; ba [1] = 'e'; ba [2] = 'l'; ba [3] = 'l'; ba [4] = 'o'; ba [5] = ' '; ba [6] = 'W'; ba [7] = 'o'; ba [8] = 'r'; ba [9] = 'l'; ba[10] = 'd'; ba[11] = ' '; Thread tr = new Hello(); tr.start(); while (true) { for (int qq = 0; qq 12; qq++) { System.out.write(ba[qq]); } } } public void run() { while(true) { System.out.write('*'); } } } -- Weldon Washburn Intel Middleware Products Division Hi Weldon, Well done! Where did you actually run the test: Cygwin, Linux, or both? Enrico
Re: [jchevm] configuring gdb to ignore SIGSEGV
Weldon Washburn wrote: Enrico, I am able to run hello world at the prompt line on Cywin. But when I run it under gdb, it hits a SIGSEGV. The error messages don't hint that signals need to be configured. The uninformed can spend lots of time trying figure out these details. It might be useful to put this info in the HOWTO document you are writing. The following configuration allows JCHEVM to run properly under gdb: $ gdb --args ./jc.exe --classpath=. --bootclasspath=/usr/local/unzipped_glibj :/usr/local/unzipped_jc:. hello (gdb) handle SIGSEGV nostop (gdb) handle SIGSEGV noprint (gdb) run -- Weldon Washburn Intel Middleware Products Division Hi Weldon, thanks for pointing that out. When I debugged JCHEVM, I noticed that SIGSEV signal was issued by the PTHREAD library and I rembember that one guy, a month ago, told me to read a document regarding this problem on Cygwin. Therefore, for now, I'll write your suggestion in the document, but we'll have to fix it soon. I'll try also to run GCC with the -no-cygwin option, which should instruct the compiler to build a Windows executable that doesn't need the cygwin1.dll to run. Enrico
Re: [jchevm] workarounds for Cygwin zip/jar problems that makes hello world work
Weldon Washburn wrote: Archie, I finally got JCHEVM to compile and run hello world with gnu classpath. My next step is to replace gnu classpath with harmony class lib. For anyone interested, below is the workarounds I used: 1) Unzip /usr/local/classpath/share/classpath/glibj.zip to /usr/local/unzipped_glibj 2) Unzip ../jchevm/java/jc.zip to /usr/local/unzipped_jc 3) In .../jchevm/libjc/native/Makefile, replace the line: JAVAH_CMD = $(JAVAH) -classpath $(top_srcdir)/java/jc.zip:$(cpdir)/glibj.zip with: JAVAH_CMD = $(JAVAH) -classpath /usr/local/unzipped_jc:/usr/local/unzipped_glibj The above now allows ./jchevm/Makefile to build jc.exe. In specific, jcjavah.exe generates the expected *.h files and no longer causes the build to abort. 4) Running jc.exe with jc.zip and glibj.zip does not work, however, running jc.exe with unzipped classes does work. I put hello.class in the same directory as jc.exe and use the following invocation line: ./jc.exe --classpath=. --bootclasspath=/usr/local/unzipped_glibj:/usr/local/unzipped_jc:. hello I don't know what the specific problem is. But it probably has something to do with how zip.c is making Cygwin calls. -- Weldon Washburn Intel Middleware Products Division Hi Waldon, Ivan and Archie since I'm writing a brief but detailed HOWTO document that explains how to get JCHEVM + Classpath-0.20 running on Cygwin, I need to know a few things: Waldon: 1. How come you had to make the workaround? Ivan built JCHEVM without it. I need to know that because I would like the HOWTO to be as universal as possible. 2. How long would it take to you to adapt JCHEVM to interface Classlib? 3. I figure that once you're done with the port, we'll have to build Classlib on Cygwin. Right? - Archie: I noticed that Ivan introduced the macro __CYGWIN__. Did you merge the macro in the source tree, or it exists only in Ivan's code? Enrico
Re: [jchevm] workarounds for Cygwin zip/jar problems that makes hello world work
Archie Cobbs wrote: Enrico Migliore wrote: I noticed that Ivan introduced the macro __CYGWIN__. Did you merge the macro in the source tree, or it exists only in Ivan's code? All of the Cygwin fixes that I know of (except unzipping the zip files) should be merged into the source now. If there's one I missed, let me know and I'll add it. -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com Hi Archie, let's do this way: during the weekend, starting from my, your, Ivan's, Waldon's threads, and from the current source tree of JCHEVM, I'll write (and test, of course) the HOWTO. Then, on monday, I'll submit it to the list for discussion, so that you can evaluate which fixes to apply to the source. Enrico
[jchevm] runtime performance
Hi Ivan and Archie, After applying your fix it no more crashes. Just tested this with QuickSort algorithm. It's running OK. (but a bit slow under cygwin in comparison to SUN's JVM under Win) Great job! JCHEVM will definitely be slower right now because there's no JIT yet, i.e., it always operates in interpreter mode. It would be interestesting to run the same test on Sun's JVM, configured not to use the JIT (interpeted mode) Archie: I read an article that said that the performance of the SableVM, in terms of speed, was quite impressive. What's the difference between JCHEVM and the SableVM? Enrico
Re: [jchevm] APR issues
Hi, So what we'd need now is a mechanism to override the automatic choice of platform. I wouldn't be too surprised if someone decided to create platforms for the other two (?) choices of windows implementation - cygwin native and cygwin w/o cygwin.dll. ??? native windoze and cygwin, or do I miss something? The cygwin.dll acts as an emulation layer for all those POSIX functions that Windows doesn't have. If a program doesn't call any of the functions provided by cygwin.dll, then, this library is not needed and, I guess, it's not even loaded. GCC, when used on Cygwin, produces always a native executable file for Windows, and the extension is .exe. Enrico
Re: [jchevm] APR issues
The cygwin.dll acts as an emulation layer for all those POSIX functions that Windows doesn't have. If a program doesn't call any of the functions provided by cygwin.dll, then, this library is not needed and, I guess, it's not even loaded. GCC, when used on Cygwin, produces always a native executable file for Windows, and the extension is .exe. Actually you have a choice now. Cygwin gcc can build for cygwin.dll or, with gcc -mno-cygwin, for the native msvcrt.dll. The latter does not require cygwin.dll. Regards, Mark. Hi Mark, thanks for pointing that out. I'll try to build JCHEVM with that option enabled. I figure that if I try to build a program that makes use of POSIX functions, with gcc -mno-cygwin, there are two options: 1. Those functions will be embedded in the executable file (.exe) 2. GCC refuses to build Enrico
Re: [jchevm] problems with gnu classpath and also jchevm builds
snowdosker wrote: Archie, Ivan, I am following the email that Ivan Snowdosker sent on Monday, Feb 20 that describes how to build and run JCHEVM. I have hit a couple of bewildering snags. I installed the latest version of cygwin from the net but there still seems to be build problems. I need to build classpath-0.20 to get the native methods. ./configure --with-jikes --enable-jni seems to run OK. But when I type, make for classpath-0.20, it somehow sets top_srcdir=.. instead of top_srcdir=. The Makefile sets it to top_srcdir=. but it somehow gets reset to ... I can't find where it gets reset. Yes, I was also surprized by such behaviour. This was with jikes downloaded and installed from cygwin site. If I remember right the problem magically gone when I got jikes sources from here http://prdownloads.sourceforge.net/jikes/jikes-1.22.tar.bz2?download and build jikes from sources after applying this patch http://sourceforge.net/tracker/index.php?func=detailaid=1202863group_id=128803atid=712760 Ivan Hi Ivan, I confirm that. In order to proceed, one must apply the patch you mention to Jikes. Enrico
Re: [jchevm] APR issues
Hi Tim, Enrico Migliore wrote: Archie, Geir and Stefano, could you please take a look at the following assertion and correct it if it's wrong: It's worth to remember, that the goal of porting JCHEVM to Cygwin/Windows, is to enable us, and the people interested, to have a development environment on Windows, in order to start working on the APR. I'm not sure what you mean by 'in order to start working on the APR'? I meant, modifying JCHEVM in order to call, where applicable, the APR functions. In principle, after adapting jchevm to the APR, jchevm will be buildable with: 1. GCC native - build on Linux an executable for Linux 2. GCC cross native - build on Linux an executable for Windows (without Cygwin) 3. MSVC native - build on Windows an executable for Windows The same thing applies to the Harmony Classlib The class library native code uses the Harmony portlib to access much of the OS-specific code covered in APR. Rather than rewrite those natives, and loose the additional characteristics of the portlib, it would make more sense to implement the portlib on APR if that were desirable. I think I'm missing something: last week, we all agreed on adopting the APR library for the native stuff, except for the windowing subsystem. That means to me that all the functions of JCHEVM and the Harmony, that need to access an OS/platform service (filesystem, network, etc.) should call the APR library. Regards, Tim Enrico
[jchevm] Cygwin issues
Hi Archie and Ivan, Archie Cobbs wrote: Today I've made changes to eliminate the requirement that _JC_FULL_ALIGNMENT be at most sizeof(_jc_word), so this will fix the assertion in heap.c. hope that doesn't sacrifice any of the features of jchevm As for the failure to exit properly, this is probably related to the assertion on line 1023 of thread.c (which you said was failing in a previous email on Cygwin). This will take some further debugging.. there may be a bug in the handing of the vm_destruction condition variable but since I don't see the assertion it may be easier for you guys to debug it. I'll try a visual inspection though. -Archie ok Ivan wrote: It's probably related to my incorrect definition of extern inline const void * _jc_jmpbuf_sp(const sigjmp_buf buf) in file \jchevm\libjc\arch\i386\i386_libjc.h which I added few days ago as cygwin specific branch. in order to proceed Ivan, 1) I'd suggest you to set up the DDD visual debugger in order to run step by step jchevm and use breakpoints. DDD works perfectly on Cygwin: all you need to do is to install the X libraries, and from a shell, run $startx and then, from the windows that appears, $ddd 2) in order to proceed, let's align our development environment in terms of source code modifications. In fact, to build jchevm, just like you, I had to add some declarations in some header files, and modify the pread() call into a read(). My proposal is the following: let's install the new versions of Cygwin, Classpath, and jchevm, build them from scratch, produce a written document with all the steps and modifications, and post it this mailing list. Afterwards, we will be able to write and debug some test cases. what do you think? Enrico
Re: [jchevm] Cygwin issues
snowdosker wrote: Hello, Enrico 2) in order to proceed, let's align our development environment in terms of source code modifications. In fact, to build jchevm, just like you, I had to add some declarations in some header files, and modify the pread() call into a read(). My proposal is the following: let's install the new versions of Cygwin, Classpath, and jchevm, build them from scratch, produce a written document with all the steps and modifications, and post it this mailing list. Afterwards, we will be able to write and debug some test cases. what do you think? I think that I already did this since started.. Just recorded all (or I hope all) I did Below is copy of my records Install Cygwin ( http://developer.classpath.org/mediation/ClasspathOnCygwin ) + gcc-core + gcc-g++ + gcc-java + make + zip + GTK + pkgconfig + autocofig + automake + libtool (not sure that I recorded all optional packages I installed) Download jikes from http://prdownloads.sourceforge.net/jikes/jikes-1.22.tar.bz2?download Apply this patch http://sourceforge.net/tracker/index.php?func=detailaid=1202863group_id=128803atid=712760 build jikes ( cygwin version ) - $ tar -xjf jikes-1.22.tar.bz2 $ cd jikes-1.22 $ ./configure $ make make install Build Classpth-0.20 - $ ./configure --with-jikes --enable-gtk-peer --enable-jni $ make $install Build JCHEVM - $ ./configure --with-classpath=/usr/local/classpath Add cache clean to autogen.sh before each call automake or autoconfig -- rm -rf autom4te*.cache echo running automake rm -rf autom4te*.cache echo running autoconf --- libjc/definitions.hADD #if defined (__CYGWIN__) #define PTHREAD_STACK_MIN 1024 #endif libjc/properties.cADD #if defined(__CYGWIN__) if (_jc_set_property(env, user.timezone, _tzname[0]) != JNI_OK) return JNI_ERR; #else if (_jc_set_property(env, user.timezone, localtime(now)-tm_zone) != JNI_OK) return JNI_ERR; #endif libjc/os_functions.c ADD / *CYGWIN* / #elif defined(__CYGWIN__) #include unistd.h int _jc_num_cpus(_jc_env *env) { return (int)sysconf(_SC_NPROCESSORS_ONLN); } in libjc/zip.c replace - pread(3) with lseek,read libjc/arch/arch_definitions.h --- Remove: #define _JC_LIBRARY_FMTlib%s.so Add: #define _JC_LIBRARY_FMTlib%s.dll.a libjc/arch/i386/i386_libjc.h( not sure for this is correct! ) --- #elif defined(__CYGWIN__) extern inline const void * _jc_jmpbuf_sp(const sigjmp_buf buf) { return (const void *)buf[7]; } libjc\native\java_lang_VMThread.c ADD /* Cygwin pthread_create() with supplied attributes is completely broken! */ #ifdef __CYGWIN__ #define _JC_NO_THREAD_ATTRIBUTES1 #endif libjc\jc_invoke.c - in static const struct poptOption jc_popt_options[] = { remove POPT_AUTOHELP in libjc\arch\arch_definitions.h redefine dll name format for cygwin #if defined(__CYGWIN__) #define _JC_LIBRARY_FMTcyg%s-0.dll #elif #define _JC_LIBRARY_FMTlib%s.dll.a #endif Hi Ivan, ok, in order to double check these guidelines, I'll do the whole build from scratch and see if they lead me to the point where you are now. I'll have the time to do it tomorrow or wednsday, though. In the mean time, could you try to: apply the latest Archie's patch, enable the assertions, and see where jchevm exits? Enrico
[jchevm] APR issues
Archie, Geir and Stefano, could you please take a look at the following assertion and correct it if it's wrong: It's worth to remember, that the goal of porting JCHEVM to Cygwin/Windows, is to enable us, and the people interested, to have a development environment on Windows, in order to start working on the APR. In principle, after adapting jchevm to the APR, jchevm will be buildable with: 1. GCC native - build on Linux an executable for Linux 2. GCC cross native - build on Linux an executable for Windows (without Cygwin) 3. MSVC native - build on Windows an executable for Windows The same thing applies to the Harmony Classlib Enrico
Re: Classpath on Cygwin: failed to open native library error
snowdosker wrote: Hi, Enrico Finally HelloWorld is working! in libjc\arch\arch_definitions.h redefine dll name format for cygwin #if defined(__CYGWIN__) #define _JC_LIBRARY_FMTcyg%s-0.dll #elif #define _JC_LIBRARY_FMTlib%s.dll.a #endif Hmm but jc do not exit after executing I do not call System.exit in my test class, but Sun's java exit without it ok. Hello Ivan, great! I'll try it tomorrow on my PC. I think there are still quite a few things to fix on Cygwin, because, for example, if we enable the assertions, JCHEVM exits. The results we've got are encouraging though :-) Archie: what are we supposed to do now? Two weeks ago, we spoke about using the APR for the C code of Classlib and JHHEVM Enrico
Re: Classpath on Cygwin: failed to open native library error
snowdosker wrote: Hi, Enrico. Just figured out the roots of the problem. It comes from dlopen() function on cygwin. *JCHEVM* use the following code for loading native shared libraries in \cygwin\home\ivan\jchevm\libjc\native_lib.c line:330 else if ((handle = dlopen(dlname, RTLD_NOW)) == NULL) { _JC_EX_STORE(env, UnsatisfiedLinkError, failed to open native library `%s': %s, name, dlerror()); goto fail; } Exactly what we see in error output So I just wrote simple test if ((handle = dlopen(/usr/local/classpath/lib/classpath/*libjavanio.dll.a*, RTLD_NOW)) == NULL) { printf(fail %s, dlerror()); } else { printf(loaded); } And it's failed Well, then I tried to if ((handle = dlopen(/usr/local/classpath/lib/classpath/*cygjavanio-0.dll*, RTLD_NOW)) == NULL) { printf(fail %s, dlerror()); } else { printf(loaded); } And got success ...! -- I also had found some interesting articles related to libtool , dlopen and LoadLibrary API function and thier behaviours under cygwin.. Probably this will help to solve problem soon. Well, if you will be more lucky in finding solution , just let me know Ivan Hi Ivan, good boy! Let's browse the Cygwin documentation and see how dlopen() works. Please share the link you've found :-) dlopen() is a POSIX function. Enrico
Re: compiling JCHEVM with GCC/Cygwin
snowdosker wrote: Thank you Enrico and Archie. So now with assertions disabled I faced next problem, Enrico mentioned in his email. The same failed to open native library /usr/local/classpath/lib/classpath/libjavanio.dll.a: permission denied I'm trying to run it under XP professional so I had no problem to set exec flags in permissions but this do not help. Still the same problem. Please, let me know if you will find solution. Thanks, Ivan Hi Ivan, are you saying that, even though the permissions of libjavanio.dll.a are -r-xr-xr-x, you got the same message? Please, let me know. If so, then I think we have to ask for help in the Classpath mailing list, because I really got no clue :-) In the mean time, I'm studying the JCHEVM source code, in order to figure out: 1. JCHEVM' OS dependancies 2. the way JCHEVM access the Classpath library The study would much easies if I could use the debugger, and I think I'm gonna have to set up a Linux machine. Enrico
Re: compiling JCHEVM with GCC/Cygwin
Hi Salikh , Do you have cygwin1.dll in the PATH? yes you may want to use 'depends.exe' or 'dumpbin.exe /dependents' from Microsoft SDK or 'objdump --private-headers' from Cygwin distribution to find out what specific dynamic libraries jc.exe depends on. Thanks for the suggestion. I'll use them during the weekend. Enrico
Re: compiling JCHEVM with GCC/Cygwin
snowdosker wrote: Hi, Enrico. Thank you for your help. Looks like I am following you step by step and now have the same error which you discussed with Archie few days ago =) assertion failure 1 - vm.c - line 46 message = assertion failure: _JC_FULL_ALIGNMENT = (sizeof(_jc_word)) When I add the following: printf(_JC_FULL_ALIGNMENT=%u\n, _JC_FULL_ALIGNMENT); jchevm prints: 8 But unfortunately this mail-list do not contain solution for it. I can not figure out how to solve it. Can you help me, please? Ivan Hi Ivan, try this, in the autogen.sh file: CONFIGFLAGS= --disable-assertions After disabling the assertions, you should be face the same problem where I'm currently stuck at: http://cygwin.com/ml/cygwin/2006-02/msg00570.html That problem, I think, should disappear on a WindowsXP Professional Edition. Let me know how it goes. Enrico
Re: compiling JCHEVM with GCC/Cygwin
snowdosker wrote: Hello Enrico I'm trying to build JCHEVM following your steps described at http://www.mail-archive.com/harmony-dev@incubator.apache.org/msg03212.html I was able to build Classpath sucsesfuly, but fail making JCHEVM In result I have native/java_lang_VMThread.c: In function `JCNI_java_lang_VMThread_start': native/java_lang_VMThread.c:388: warning: implicit declaration of function `pthread_attr_setstackaddr' native/java_lang_VMThread.c:388: warning: nested extern declaration of `pthread_attr_setstackaddr' make[2]: *** [java_lang_VMThread.o] Error 1 make[2]: Leaving directory `/home/ivan/jchevm/libjc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ivan/jchevm/libjc' make: *** [all-recursive] Error 1 Can you help me, please. Thanks, Ivan Hi Ivan, if you're building JCHEVM with Cygwin, modify the following file: .\libjc\arch\arch_definitions.h at line 95. Remove: #define _JC_LIBRARY_FMTlib%s.so Add: #define _JC_LIBRARY_FMTlib%s.dll.a In order to achieve a successfull build, I had to change a few other things. Before I post them here, let's see how it goes your build. Are you using a Home or a Professional Windows edition? Enrico
Re: Using APR for Harmony's native link to the OS?
Ryan Bloom wrote: As one of the original authors of APR, I would like to suggest that instead of using OS dependant native code, when we get to the point of writing awt, we should create an apr-window project, and create the library for the abstraction layer. I have had enough conversations with other APR developers to be relatively certain that this idea would be well received. Ryan Hi Ryan, that would be nice! Especially if it could run on top of the most used windows manager like GTK+, Windows, etc. Enrico
Re: Using APR for Harmony's native link to the OS?
Stefano wrote: I think we would gain a lot of value by using APR instead of reinventing something that 5 years from now will look just like it. Hi Stefano, I took a look at the documentation of the APR project: http://apr.apache.org/docs/apr/modules.html http://apr.apache.org/docs/apr-util/modules.html http://apr.apache.org/docs/apr-iconv/files.html and this in an excerpt from the apr.h file, which shows the main features of APR: #define APR_HAS_SHARED_MEMORY 1 #define APR_HAS_THREADS 1 #define APR_HAS_MMAP1 #define APR_HAS_FORK 0 #define APR_HAS_RANDOM 1 #define APR_HAS_OTHER_CHILD 1 #define APR_HAS_DSO 1 #define APR_HAS_SO_ACCEPTFILTER 0 #define APR_HAS_UNICODE_FS 1 #define APR_HAS_PROC_INVOKED 1 #ifndef _WIN32_WCE #define APR_HAS_SENDFILE 1 #define APR_HAS_USER 1 #define APR_HAS_LARGE_FILES1 #define APR_HAS_XTHREAD_FILES 1 #else #define APR_HAS_SENDFILE 0 #define APR_HAS_USER 0 #define APR_HAS_LARGE_FILES 0 #define APR_HAS_XTHREAD_FILES 0 #endif #define APR_HAS_OS_UUID 1 I noticed also that the following macros are present: WIN64, APR_HAVE_IPV6 I downloaded the project and built on Win32 without warnings, and the footprint of apr-1.lib is 1 Mbyte. I think I'm leaning to your idea :-) The last 2 problems I see here are: 1. APR doesn't cover is the Windowing subsystem 2. An APR port to the ARM embedded platform doesn't exist Enrico
Re: Using APR for Harmony's native link to the OS?
Enrico Migliore wrote: 2. An APR port to the ARM embedded platform doesn't exist Tom wrote: Thanks for checking that out! About (2): From what I am seeing these days it is important to support ARM. BTW, where did you get this information about ports not being available please? I did not find a porting page. Hi Tom, if the Linux API's of the port to the ARM platform are 100% identical to the ufficial Linux ones, then APR can be GCC cross-built without problems. Enrico
Re: Using APR for Harmony's native link to the OS?
Mladen Turk wrote: Enrico Migliore wrote: I took a look at the documentation of the APR project: 1. APR doesn't cover is the Windowing subsystem Sure, APR is something POSIX is meant to be. 2. An APR port to the ARM embedded platform doesn't exist If someone wishes to build a GNU/Classpath like system under Apache license, with APR instead POSIX as OS abstraction layer (or any other), will you object? I think this is the ultimate question of the entire thread. Seems to me that when ever someone says something in the direction of replacing GNU/Classpath with something else, the voices are up. From ground up I'm opposed to this artificial synergy of ASF and GNU code, and until it gets resolved the Harmony project will never become a true ASF project. The reason is pretty simple, we are two different communities, and just like in the real world, it's hard to merge the things with different views. So at the end of the day, you have a simple question: Is Harmony a way to give a JVM to the GNU/Classpath, or is a Harmony a project that will some day have option to choose between different 'classpath' libraries. If it's the first, the entire thing has nothing to do with ASF, and if it's a second, then I don't understand why all the fuzz about a different perspective proposals. Regards, Mladen. Hi Mladen, I'm not a fan of GNU/Classpath, in fact, after reading the documentation of the APR project and understood the potential of it, I've changed my mind, as said in my previous thread. As far as the windowing system is concerned, I just pointed out that if the APR had the interface to the native windowing system, it would save quite a bit of work to us. Enrico
Re: Using APR for Harmony's native link to the OS?
Stefano Mazzocchi wrote: [EMAIL PROTECTED] wrote: Author: tellison Date: Fri Feb 10 05:57:38 2006 New Revision: 376690 URL: http://svn.apache.org/viewcvs?rev=376690view=rev Log: Applying patches received as HARMONY-42 (com.ibm.io.nio.FileChannel is not fully implemented) - refactoring of some java platform code - additional behavior on NIO file channels - refactoring of some IO code - work in progress on memory mapping Tim's commits made me think about something that I thought about a loong time ago (probably 1999) in the would be awesome kind of department but I put off for a future where we would have a project to work on a JVM. turns out we do have one now and turns out that APR[1] is a library that is now very solid and reached API stability over years of work by a lot of people. so, here it is, does it make sense to have harmony depend on APR and therefore abstract away all those OS-specificities? (I'm talking about both the VM and the native part of the class library). It also has a major social side effects: it would create the ultimate social bridge between the HTTPD/APR side of the foundation and the java side of the foundation, maybe allowing people from one side to contribute to the other, or, at least to help out in the interface between them which naturally is the JVM. What do you think? [1] http://apr.apache.org/ I haven't gone through the APR library therefore I don't know how many layers (i.e. function calls) it puts between Apache and the underlying OS. As far as the the native code of the Classlib and the VM is concerned, I think that we should keep it as thinner as possible in order to: 1. have Java programs run fast 2. ease portability to different OS's and platforms (embedded systems included) The GNU/Classpath guys, for example, have defined a standard interface to underlying OS and that's it. Therefore I don't think we really need the APR layer. Enrico
Re: Using APR for Harmony's native link to the OS?
Mladen Turk wrote: Enrico Migliore wrote: Stefano Mazzocchi wrote: The GNU/Classpath guys, for example, have defined a standard interface to underlying OS and that's it. Therefore I don't think we really need the APR layer. Well, perhaps some day, someone will just 'brake' and instead of loosing hair decide simply to build a better thing then GNU/Classpath is. The only reason why it's still there is because no one wrote something different, but the same thing applies to the JVM thought. Regards, Mladen. I wouldn't mind at all using a rock solid library like APR between the JVM and the OS. The only problem I see here is: performance, in terms of execution speed. Enrico
Re: [jchevm] building jchevm on Cygwin
Archie Cobbs wrote: What does this program print? /* * Compile me from the top jchevm directory like this: * * cc -I libjc -I include -I libjc/native -I libjc/arch -o xx xx.c */ #include libjc.h int main(int ac, char **av) { printf(_JC_FULL_ALIGNMENT=%u\n, _JC_FULL_ALIGNMENT); return 0; } -Archie Hi Archie, here are the messages and the value of ALIGNMENT. As far as the Classpath problem is concerned, I posted a thread on the Classpath mailing list. Keep in mind that I haven't yet merged your latest pacth (replacement of the ucontext functions with setjmp() - longjmp). with my source tree. assertion failure 1 - vm.c - line 46 message = assertion failure: _JC_FULL_ALIGNMENT = (sizeof(_jc_word)) When I add the following: printf(_JC_FULL_ALIGNMENT=%u\n, _JC_FULL_ALIGNMENT); jchevm prints: 8 assertion failure 2 - vm.c - line 176 message = assertion failure: vm-threads.pro_min = assertion failure:vm-threads.pro_max assertion failure 3 - heap.c - line 238 message = assertion failure: bs-hint == NULL || (((_jc_word) bs-hint (_JC_PAGE_SIZE - 1) % bs-size) == _JC_HEAP_BLCOK_OFFSET) assertion failure 4 - thread.c - line 1023 /* _JC_COND_SIGNAL(vm-vm_destruction);*/ message = assertion failure: _r == 0 Your comments are welcome :-) Enrico
Re: JCHEVM built on GCC/Cygwin
Hi Geir, Now lets get JCHEVM to also use the Harmony Classlib :) It will be great for A/B testing. It's a task that Archie and I would like to accomplish in the near future, when time permits. Enrico
JCHEVM built on GCC/Cygwin
Hi folks, I've finally built JCHEVM and Classpath 0.20 on GCC/Cygwin/Windows. There are still a few things to fix and port but the main job is done. At the moment, when calling: $jc HelloWorld.class jc throws an exception because it can't find a .so library in Classpath. ciao, Enrico
compiling JCHEVM with GCC/Cygwin
Hi Archie In order to build JCHEVM with Cygwin I took the following steps: 1. Built Classpath 0.20 with Cygwin, with the following options: $./configure --with-jikes gtk-peer-enable 2. Downloaded JCHEVM and read Apache.README and INSTALL 3. Ran successfully the following script: $sh autogen.sh 4. Ran the following command: $make After compiling some C source files, thoug, it stopped saying: jcjavah: can't load class 'gnu/classpath/VMStackWalker': java/io/IOException: error reading entry 'gnu/classpath/VMStackWalker.class' in ZIP file 'usr/local/classpath/share/classpath/glibj.zip': No error make[2]: *** [gnu_classpath_VMStackWalker.h] Error 1 (Note that VMStackWalker.class is present in my zip file: /usr/local/classpath/share/classpath/glibj.zip) Can anybody help me out? ciao, Enrico P.S. During the compilation phase, that is, before stopping on the mentioned error, the compiler issues the following warning: gcc: unrecognized option '-pthread' P.S. I put the ucontext.h file in the dirs: /include and /include/sys at the moment they are empty
Re: [VOTE] Accept JIRA contribution HARMONY-16 (Intel's contrib of security code for classlib)
+1 Enrico Intel has offered an addition to the classlib effort in the form of security code to the project under the Apache License to Apache Harmony. It can be found here : http://issues.apache.org/jira/browse/HARMONY-16 The paperwork (Bulk Contribution Checklist and supporting documentation) has been received and all documentation is in place. Therefore : [ ] +1 Accept the code into the project sandbox [ ] -1 Don't accept the code. Reason : This vote will close 72 hours from now. (+1 from me, of course...) geir
Re: ApacheCon - notes from the field
Hi Tim, As you likely know, ApacheCon is underway this week in San Diego. Here are a few scratchings from the Harmony related meetings so far. The talk was well attended, a very rough guess would be 60 - 70 people in the room. Questions from the floor were few, and included what if Sun open source their codebase? and how quickly will Harmony be able to track new releases of the Sun code?. What were the answers to those questions? Regards, Tim Enrico
Re: [jchevm] Porting JCHEVM to OSX/PPC
The good news first: it compiles now. The problem I described in the previous mail was that libjc was linked with the option -module (so it can be dlopen()ed) and this is not portable. I removed the -module and now it compiles. I stripped out lots of ELF specific stuff, so my version could be interesting for a port to windows too. I just don't want to commit it to trunk yet because it's completely untested. Hi David, I'm trying to compile JCHEVM with MSVC but, at the moment, the work, as underlined by Archie, last week, is not trivial and in fact, I'm having a noticeable number of compiling errors. Next week, I'm gonna try to use the native port of the GNU chain, MinGW, as suggested by Ashish Ranjan and compile JCHEVM with GCC. Since you have successfully compiled the code with GCC, could you tell/send me the modifications you did, in order for me to speed up the job? Has anybody tried to use the U/WIN project by ATT instead of MinGW? The U/WIN project is a DLL (posix.dll) that seats on top of Windows and allows the programmer to call all POSIX APIs Enrico
Re: [vote] accept JIRA contribution HARMONY-14 (IBMs contribution of core classlib, native support and vm/classlib interface)
Geir Magnusson Jr. wrote: IBM has offered a core to a class library, native support and vm/ classlib interface to the project under the Apache License to Apache Harmony. It can be found here : http://issues.apache.org/jira/browse/HARMONY-14 The paperwork (Bulk Contribution Checklist) has been received, and while the entire codebase hasn't been written by people that can satisfactorily execute an Authorized Contributor Questionnaire, new code has been, the contributor asserts that all code was written under a process designed and executed to prevent access to other implementations, and various examinations have turned up nothing of material concern. Therefore : [ ] +1 Accept the code into the project sandbox [ ] -1 Don't accept the code. Reason : This vote will close 72 hours from now. (+1 from me, of course...) geir +1 -- Cordiali Saluti Enrico Migliore /* ** * * Enrico Migliore - co-founder and senior electronics engineer * * FATTI srl - OSGi, GPRS, and GSM systems * * Via Donatello 48 - 20020 - Solaro - Milano - Italy * Phone: +39 (0)2 9679 1836 * Fax: +39 (0)2 9679 9373 * http://www.fatti.com * * e-mail: [EMAIL PROTECTED] * ** */
Re: Snapshots (was Re: compiling JCHEVM with MSVC)
Geir Magnusson Jr. wrote: Instead of distributing from freebsd.org, we should think about making binary snapshots of Harmony stuff available for people to run and play with. This isn't a release, of course, but just a binary snapshot of where we are for those that don't have the toolchains installed... geir Hi, This is a good idea to foster the project. Enrico
Re: JCHEVM builds and runs
Archie Cobbs wrote: For anyone who wants to play with the JCHEVM contribution, the code in https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm should now be buildable and runnable (on x86 machines only). The file APACHE.README contains some general info as well as instructions on how to build it. Please report any problems, questions, etc. to this mailing list. Cheers, -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com Hi Archie, I would like to compile JCHEVM. I got Cygwin and MSVC installed on Win2000 professional. Could you give me any suggestion before I start this work? ciao, Enrico
bootJVM successfully compiled and linked with MSVC
Hi, I finally compiled and linked the source tree ..\bootJVM\\jvm\src, with MSVC, and using the pthreadVC2.dll library. To produce a successfull build, I had to slightly adapt the source code and comment out, at the moment, the getwd( ) UNIX function, located in classfile.c Since, tomorrow I'm going to do some debugging, I wanted know if someone can address me where to start from. Should I debug something like java HelloWorld.class? Am I supposed to define a sort of CLASSPATH environment variable where the bootJVM will look for system classes? I've got another question. I've noticed that, along with bootJVM, there is more than one source code contribution: am I compiling and debugging the right source code? thanks for any help, Enrico
bootJVM compiled with MSVC
hi, I finally compiled bootJVM with MSVC 6.0 but still have 13 problems when linking. The most common problems I faced, during in the compilation process, were: 1. *.c In many files, some variables are defined after a certain number of C statements. I had to move the definition of those variables to the beginning of the block where they belong. 2. *.c #include unistd.h is not defined in MSVC 3. timeslice.c The structure struct itimerval is not defined in MSVC, 4. timeslice.c SIGHUP and SIGALRM signals are not defined in MSVC. 5. opcode.c The following function definition: static void dummy1(void) { char *p, *dummy2; dummy2 = p; dummy1(); } were placed within the funcion opcode_run( ) I got some other smaller problems which I don't report here. I got now the following linking problems: - Linking... bytegames.obj : error LNK2001: unresolved external symbol _swap2 bytegames.obj : error LNK2001: unresolved external symbol _swap4 classfile.obj : error LNK2001: unresolved external symbol _getwd jvm.obj : error LNK2001: unresolved external symbol _sleep threadutil.obj : error LNK2001: unresolved external symbol __imp__pthread_mutex_unlock timeslice.obj : error LNK2001: unresolved external symbol __imp__pthread_mutex_unlock threadutil.obj : error LNK2001: unresolved external symbol __imp__pthread_mutex_lock timeslice.obj : error LNK2001: unresolved external symbol __imp__pthread_mutex_lock timeslice.obj : error LNK2001: unresolved external symbol __imp__pthread_create timeslice.obj : error LNK2001: unresolved external symbol __imp__pthread_mutex_init timeslice.obj : error LNK2001: unresolved external symbol _yield timeslice.obj : error LNK2001: unresolved external symbol __imp__pthread_cancel Debug/harmony.exe : fatal error LNK1120: 10 unresolved externals Error executing link.exe. Creating browse info file... harmony.exe - 13 error(s), 2 warning(s) - Apart from _sleep, which I assume can be replaced by the Sleep( ) function, I need to know how to proceed. Can anybody help me out? Enrico
compiling bootJVM with MSVC
Enrico, Did Tim's comment help? Did this resolve it? Have you had any other porting issues in either compilation or configuration? I would like for us to keep up with these sorts of issues because it would be great if we could support MSVC as one of the development _and_ target type environments for bootJVM. Are you by chance familiar with doing InstallShield scripts? This would give us an alternative for Windows platforms for doing configuration and installation. Please let everyone know what all you find as you work with the MSVC environment so that that source can be adjusted for portability when all the issues are resolved. Just by the way, I'm still working on the final bit of basic functionality of the JVM runtime engine and should have something available soon. Thanks for your help and interest. Dan Lydick Hi Dan, I'm trying to compille bootJVM with MSVC 6.0. Tim's. suggestion (long long = __int64) works fine. I didn't translate the configuration and build scripts into .bat files for Windows, I just ran the scripts in Cygwin, in order to have the source tree available and made a console application in MSVC. I'm not much familiar with InstallShield scripts and honestly I'd prefer to dedicate my spare time to work on the source code side (C is my daily bread). Right now I got some problems which I'm planning to solve during the weekend, here are two examples: -- rvoid argv_init(int argc, char **argv, char **envp) { rchar *chkjh; chkjh = (rchar *) rnull; rchar *chkcp; --- MSVC flags this as a compilation error ..\jvm\src\argv.c(127) : error C2275: 'rchar' : illegal use of this type as an expression -- -- typedef struct { u1 tag; u2 string_index; struct LOCAL_String_binding { -- MSVC doesn't like an empty struct } LOCAL_String_binding; } CONSTANT_String_info; ..\jvm\src\classfile.h(1031) : error C2059: syntax error : '}' I have to add int foo; in order to proceed -- Certainly, the code will have to be slightly adjusted for portability. Let me proceed and after the weekend I'll write a report. ciao, Enrico
Re: compiling bootJVM with MSVC
--- Enrico Migliore [EMAIL PROTECTED] wrote: For a win32 pthread implementation, try this: http://sources.redhat.com/pthreads-win32/ There are two libraries I downloaded this one: pthreadVC2.lib Shouldn't more care to be taken RE pointing people to LGPL resources on this list as the compatibility issues between the LGPL and Apache licenses are AFAIK still unresolved? (back to lurking) -Matt Hi Matt, you're right. Right now I just need to successfully compile bootJVM with MSVC. Enrico
long long type problem when compiling with MSVC
hi guys, I'm trying to compile bootJVM with MSVC but I can't proceed because the 'long long' type (Java long types are 8 bytes wide) is not supported. Can any body help? Enrico
Re: C compilers comparison: MSVC vs GCC vs DevCpp
Florian Weimer wrote: * Enrico Migliore: the code is a simple function that gets called 3 times. There's an explicit check in GCC that prevents the removal of empty loops (because they are sometimes used for their timing effect on embedded targets, IIRC). Therefore, your test is bogus. Hi Florian, to make an exhaustive comparison of the various tool chains I'd need a test suite. and yet, I never pretended that the test proposed was the one to use to select a compiler rather than another. I just wanted to see how the tested compilers build up the stack frame of function calls, with and without optimization and the impact on the execution speed. Enrico
C compilers comparison: MSVC vs GCC vs DevCpp
Hi, I did some tests in order to see which, among MSVC,GCC and DevCpp compilers yield the code with the best speed performance. The test is a function that contains pure ANSI C code (no __fastcall or similar) and doesn't call any system call of the underlying OS. MSVC GCC DevCpp ArchPentium PentiumPentium OS Win2000Linux (Knoppix) Win2000 Compiler 6.0 3.4 5.0 version speed 13.4 sec 14.27 sec14.61 sec optimization off speed 6.48 sec 0.9 sec 1.43 sec optimization on command line cl /O2 main.c gcc -O3 main.c(*) when optimiz. on (*) I didn't write it down when I did the tests Unless I'm doing something wrong with MSVC, it seems that DevCpp and GCC are almost an order of magnitude faster than MSVC. Enrico
Re: C compilers comparison: MSVC vs GCC vs DevCpp
Tanuj Mathur wrote: Hi Enrico, Could you provide a link to the code you used to perform these tests? i'd like to replicate the results for MSVC6, and then compare it with MSVC 7.1 and 8 (VS 2003 and VS 2005 Beta respectively). MSVC6 is a very old compiler (1997/98), and since the C++ compiler for MSVC 2003 (7.1) is available free of cost, that would be a way better compiler to target. Thanks, Tanuj Hi Tanuj, the code is a simple function that gets called 3 times. - #include stdio.h #include time.h int my_function (int a, char *buf) { int int_1 = 1987; char char_1 = 'a'; long long_1 = 123456789L; long long_2 = long_1; if (a 0) { a++; } else { a--; } if (int_1 9) { char_1++; } else { char_1--; } *long_2++; if (buf == NULL) { return -1; } buf++; return a; } void main (void) { long i; int result; char buf[8]; clock_t start; clock_t stop; double duration; buf[0] = 0; start = clock(); for (i = 0; i 3; i++) { result = my_function(10,buf); } stop = clock(); duration = (double) (stop - start) / CLOCKS_PER_SEC; printf(the test lasted for %2.4f seconds\n\r,duration); } - Enrico
Re: C compilers comparison: MSVC vs GCC vs DevCpp
Hi Enrico, For what it's worth, here is the data you wanted :) OS: Windows XP Prof. with SP2 Processor: Intel P4 3 GHz with HT RAM: 512 MB, ~155 MB free Tested against the code supplied in your earlier mail. Compilers Tested: 1. MingW with GCC 3.4.2 2. MS Visual C++ 2003 (7.1) 3. MS Visual C++ 2005 (8.0) BETA MingW MSVC7.1 MSVC8.0 Default 3.5310 3.10903.0930 Maximize Speed0.1560 0.0. [-O3] [\O2] [\O2] All the tests were run 5 times, and the lowest execution time was noted. Hope this helps :) Tanuj Hi Tanuj, thanks for the test, that proves that MSVC got improved a lot since version 6.0 The only compiler that we haven't tested yet is the Intel's one. regards, Enrico
optimization for speed in win32
Hi, I did some tests in order to see which, among __fastcall, __stdcall, __cdecl, __inline, gives the fastest execution time: my_functions() was called 3 times Processor = Intel Pentium 1.4 GHz OS = Windows 2000 Compiler = Microsoft Visual C Executable type = release -- code -- #include stdio.h #include time.h /* * qualifier: __fastcall, __stdcall, __cdecl, __inline */ qualifier int my_function (int a, char *buf) { int int_1 = 1987; char char_1 = 'a'; long long_1 = 123456789L; long long_2 = long_1; if (a 0) { a++; } else { a--; } if (int_1 9) { char_1++; } else { char_1--; } *long_2++; if (buf == NULL) { return -1; } buf++; return a; } double test (void) { long i; int result; char buf[8]; clock_t start; clock_t stop; double duration; buf[0] = 0; start = clock(); for (i = 0; i 3; i++) { result = my_function(10,buf); } stop = clock(); duration = (double) (stop - start) / CLOCKS_PER_SEC; return duration; } Results: qualifier | test duration (maximize for speed = OFF) __fastcall | 14.3900 seconds __stdcall| 12.9700 seconds __cdecl (**) | 13.6200 seconds __inline | 12.9600 seconds qualifier | test duration (maximize for speed = ON) __fastcall| 5.9400 seconds __stdcall | 6.5300 seconds __cdecl (**) | 6.4800 seconds __inline | 0. seconds (*) (*) suspicious (**) __cdecl is the default qualifier Conclusion: __inline and __fastcall give the best results when the compiler is instructed to generate code with the flag optimize for speed enabled. I also noticed that parameters marshalling is not an issue because the compiler will link the appropriate static library according to the optimization selected. Therefore, in win32, we should be able to optimize our C code for speed without problems. Enrico
Re: opinions on structure packing in C?
I'm working with Dan's bootVM to get to run on Windows, and have been thinking about the use of -fpack-struct vs #pragm pack() vs just not packing and writing code that is a little slower, and a little more verbose, but seemingly more robust and maintainable due to less information about context needed to avoid surprises. I've reconfirmed that packing structs is deadly when you want to call into standard libs struct stat foo; stat(foo.txt, foo); does some bizarre things :) So how do people deal with this these days? I know fashions change, and I haven't done C in anger for 6 years... (I still have the shakes when looking at it - I'm past the screaming stage...) geir hi, We should compile the code using the same C flags that the libc uses. Parameter marshalling is another source of problems: if we want to optimize our C code for speed (parameters passed through registers), we will have to recompile the libc. Enrico
Re: [vote] Accept JIRA contribution HARMONY-5 : David Tanzer's proof-of-concept component model
+1 David Tanzer has offered his proof-of-concept component model to the project. It can be found here : http://issues.apache.org/jira/browse/HARMONY-5 [ ] +1 Accept the code into the project [ ] -1 Don't accept the code. Reason : -- Notes : 1) Yes, this is formal, but we want a clear audit trail into the project, and clear acceptance decisions 2) I normally would put a 3 day review period, but this code is small and I want to use this to test the process 3) Once we accept (I expect we will) ( and if David gets his Bulk Contrib Agreement and Software Grant in!) we'll put in sandbox and away we go... Thanks for the patience geir
Re: GNU Classpath 0.16 Harmony! released
Can we reach a concensus on getting something started on Windows/ x86 and Linux/i386 initially (as the popular development platforms)? Then... That works for me, but we'll be adding OS X as that's my platform, and I suspect for now will be my problem :) Don't forget Solaris, which seems to have been on the list during most of the platform discussions. Dan Lydick Hi, I'd suggest to create a group of people working on the ARM (9 and 11) architecture, because it is very popular in the world of the embedded systems. Enrico
Re: JSR277 (Modules and the OSGi)
Richard S. Hall wrote: Stefano Mazzocchi wrote: do you plan to add support for class versioning? how does this impact service frameworks like OSGi and friends? That is a good question. So far, the JSR does not comment on OSGi R4, which basically addresses all of the issues raised. Perhaps it is not mentioned because it is not publicly released yet, but Sun is a member of OSGi, so they know what is coming. It is a very interesting development to say the least. - richard Hi, All new releases of the OSGi framework are, by design, back compatible with the previous versions. Therefore, as far as the OSGi framework is concerned, the adoption or not of the JSR277 by Sun will be a problem of the OSGi consortium. Enrico
Re: some ideas (the end)
Hi Swen, ok, you've convinced me. Enrico Hello, First off, you should read the actual Harmony proposal, footnote #2. Historically, there has been wide exposure to VM and class-library- specific source code that is the property of Sun Microsystems as well as others, as it is common for commercial J2SE implementations to be based on licensed Sun code. We wish to make every effort to ensure that the licenses and rights of external projects and efforts is properly respected. That means that looking at Sun's sources for 'inspiration' is hardly likely to be allowed. Personally I'm hoping for, and think it's likely, that Harmony will go with a strict clean-room requirement, like GNU classpath already does. Legal or not. If you've looked at Sun's sources, and the commited code turns out to be similar to code in the JDK (and some of it invariably will, intentionally or not) the burden of proof is on your side to prove you didn't copy it. That is a a very hard thing to prove. Monitoring all commited code for similarities to Sun's isn't practical either. Clean-room is IMHO the only viable option. If you are going to contribute source code to GNU Classpath we must make sure that you have not studied the source code of the JDK/JRE or decompiled any of its classes If we don't study how a solid implementation has been built, how can we make a better implementation? I question the sanity of this statement. Plenty of faster VMs than Sun's have been written without ever looking at their code. I doubt Sun themselves looked at anyone else's code either. As for the class library, well I can speak for my own experience there. For instance, I implemented the java.awt.color.* package in GNU Classpath. I have benchmarked it. On transforms between the predefined color spaces it is about 20x faster. It is also much more accurate. (as benchmarked against the well-regarded LCMS library) It also uses less memory. Why should we copy their bad designs? Plus, you do not need to look at Sun's code to get a pretty good picture of how their implementation works. They've been poor enough at seperating implementation and specification for that. All you need is to look carefully at the API docs and have a modicum of deductive reasoning. /Sven -- /* * * * Enrico Migliore - co-founder and senior software engineer * * FATTI srl - OSGi, GPRS, and GSM systems * * Via Donatello 48 - 20020 - Solaro - Milano - Italy * Phone: +39 (0)2 9679 9655 * Fax: +39 (0)2 9679 9373 * http://www.fatti.com * * e-mail: [EMAIL PROTECTED] * * */
Re: some ideas
Dear Steven, Please refer to this: http://www.gnu.org/software/classpath/faq/faq.html#faq3_2 It may be beneficial to learn the lib source of Sun JDK, but I think it's better to start from a clearer point. I read the FAQ you mentioned, and this the excerpt, I think, you are referring to: "If you are going to contribute source code to GNU Classpath we must make sure that you have not studied the source code of the JDK/JRE or decompiled any of its classes" If we don't study how a solid implementation has been built, how can we make a better implementation? Nobody here wants to infringe any license, but taking inspiration from someone's else work is legal. By taking inspiration I don't mean copying or refurbishing Sun's code, I mean studying the strategies and the solutions adopted. ciao, Enrico
Re: some ideas
dear theuserbl The sourcecode of Suns JVM is public, but not OpenSource. The reason why Harmony exists is the disaffection/discontent/discontentment/dissatisfaction/ discontentedness with Suns license. If you use Suns code, you have at the end something line Blackdown. And that don't make sense. I never said I wanted to borrow or copy Sun's code. I just said that we can take inspiration from Sun's code, in terms of solutions adopted to the various problems. ciao, Enrico
how to get involved
Hi guys, I've got a few questions, regarding the Harmony project: 1. How can one get involved? 2. How many hours a week, on the average, is it required? 3. What kind of background is it needed? thanks, Enrico
When will the Harmony project start?
Hi guys, when will the Harmony project start? thanks, Enrico