Re: POI-Ruby
did you try ldd on poi4r.so? or put libgcj in LD_LIBRARY_PATH? Also, the version of Swig i used was, i believe, 1.3.27. Which is not to say other versions wont work... we need to do some more experimentation... On Thursday 22 Mar 2007 10:08:25 pm Jeff Swensen wrote: I'm working on getting the SWIG included version running. I had to edit the Makefile to set some paths (GCJ_HOME, SWIG) to point to the compatible versions and everything compiles correctly. The problem is: irb(main):001:0 require 'release/poi4r' LoadError: libgcj.so.7: cannot open shared object file: No such file or directory - /home/jswensen/poi/trunk/src/contrib/poi-ruby/release/poi4r.so from /home/jswensen/poi/trunk/src/contrib/poi-ruby/release/poi4r.so from (irb):1 I have the path to libgcj.so.7 included in my RUBYLIB variable so I'm at a loss for what the issue is. Any ideas? Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: POI-Ruby
Please forgive my inexperience. I added libgcj to LD_LIBRARY_PATH and it now will run properly but segfaults. I'm working on figuring out exactly where the segfault occurs. At this point I know it's during JvCreateJavaVM(). Thanks again. Avik Sengupta wrote: did you try ldd on poi4r.so? or put libgcj in LD_LIBRARY_PATH? Also, the version of Swig i used was, i believe, 1.3.27. Which is not to say other versions wont work... we need to do some more experimentation... On Thursday 22 Mar 2007 10:08:25 pm Jeff Swensen wrote: I'm working on getting the SWIG included version running. I had to edit the Makefile to set some paths (GCJ_HOME, SWIG) to point to the compatible versions and everything compiles correctly. The problem is: irb(main):001:0 require 'release/poi4r' LoadError: libgcj.so.7: cannot open shared object file: No such file or directory - /home/jswensen/poi/trunk/src/contrib/poi-ruby/release/poi4r.so from /home/jswensen/poi/trunk/src/contrib/poi-ruby/release/poi4r.so from (irb):1 I have the path to libgcj.so.7 included in my RUBYLIB variable so I'm at a loss for what the issue is. Any ideas? Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ -- Jeffery S. Swensen Software Engineer Merrill Lextranet Legal Computer Solutions, Inc. 107 Union Wharf Boston, MA 02109 t. 617-227-4469 x234 [EMAIL PROTECTED] THE INFORMATION IN THIS MESSAGE IS INTENDED ONLY FOR THE PERSONAL AND CONFIDENTIAL USE OF THE DESIGNATED RECIPIENTS NAMED ABOVE AND MAY CONTAIN LEGALLY PRIVILEGED INFORMATION. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone at 617-227-4469 Ext. 200. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
POI-ruby - ruby hangs
I'm able to create xls files with poi4r just fine but for some reason any ruby script that requires poi4r hangs at the end. Has anyone ever experienced this? Or possibly have some ideas as to what causes it. b.rb: require 'release/poi4r' puts 'test' strace ruby b.rb: ... write(1, test\n, 5test ) = 5 rt_sigaction(SIGINT, {SIG_DFL}, {0x80a1f1c, [], SA_RESTORER|SA_RESTART, 0x400994f8}, 8) = 0 write(5, \240\20\271A\2\0\0\0\0\0\0\0\4\317\6\0\220\357\377\277..., 148) = 148 rt_sigprocmask(SIG_SETMASK, NULL, [CHLD RTMIN], 8) = 0 rt_sigsuspend([CHLD] unfinished ... --- SIGRTMIN (Unknown signal 32) @ 0 (0) --- ... rt_sigsuspend resumed ) = -1 EINTR (Interrupted system call) sigreturn() = ? (mask now [CHLD RTMIN]) wait4(5842, NULL, __WCLONE, NULL) = 5842 write(5, \240\20\271A\7\0\0\0\260\277\270A`\356\377\277\300q\32..., 148) = 148 rt_sigprocmask(SIG_SETMASK, NULL, [CHLD RTMIN], 8) = 0 rt_sigsuspend([CHLD] Thanks, Jeff Incidentally, one test fails (although I don't think this is related): 1) Failure: test_base(TC_base_tests) [./tests/tc_base_tests.rb:70]: hour. 15 expected but was 19. 3 tests, 10 assertions, 1 failures, 0 errors - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: POI-Ruby
Jeff You can certainly wrap stuff on your own, but I would figure it will be a lot of work, which is reason I started on swig. I wouldnt start on it unless you either have a lot of time, or some significant experience writing C extensions for ruby (neither of which is true for me) You'l have to declare the function signatures to call from ruby, convert objects (eg ruby strings to gcj string objects) and handle memory allocation and de-allocation on either side. Both ruby and java being garbage collected, not only will you have to worry about leaks, but also premature collection. http://www.rubycentral.com/book/ext_ruby.html has the basics. You've probably already seen this. With swig, you still have to worry about all this, but a lot of the boilerplate is generated. For eg, you'll have to write the object wrapping code once, and not worry about calling it every time an object is referenced. As for segfaults, the whole thing, i've found, is quite sensitive to swig version. Maybe you can try with an older swig version? Regards - Avik On Thursday 22 Mar 2007 3:03:11 am Andrew C. Oliver wrote: Okay from Ruby on Linux...yes POI-ruby is probably your best option I thought you were doing from C on Linux Hopefully Avik is around and he can help... I'll ping him if he doesn't answer. Jeff Swensen wrote: I might be stating my intention incorrectly. I have the relevant bits from poi-ruby compiled with gcj, and am attempting to wrap that myself instead of using SWIG. As far as open office and gnumeric, I have been unable to find a fully featured discrete library for writing XLS files from ruby on linux. Would be most appreciative if you could point me to one. Andrew C. Oliver wrote: Why? Why not just compile with GCJ and then wrap that? Seems weird to go 3 techs deep... Also there are C utils for OLE and XLS. Check out open office and gnumeric...use those...doesn't make sense to use C-Ruby-POI Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: POI-Ruby
Thanks for the responses. Avik, What version of SWIG has worked the best for you? The version installed here is 1.1 (patch 5). I see that is the most recent stable release. Thanks, Jeff Avik Sengupta wrote: Jeff You can certainly wrap stuff on your own, but I would figure it will be a lot of work, which is reason I started on swig. I wouldnt start on it unless you either have a lot of time, or some significant experience writing C extensions for ruby (neither of which is true for me) You'l have to declare the function signatures to call from ruby, convert objects (eg ruby strings to gcj string objects) and handle memory allocation and de-allocation on either side. Both ruby and java being garbage collected, not only will you have to worry about leaks, but also premature collection. http://www.rubycentral.com/book/ext_ruby.html has the basics. You've probably already seen this. With swig, you still have to worry about all this, but a lot of the boilerplate is generated. For eg, you'll have to write the object wrapping code once, and not worry about calling it every time an object is referenced. As for segfaults, the whole thing, i've found, is quite sensitive to swig version. Maybe you can try with an older swig version? Regards - Avik On Thursday 22 Mar 2007 3:03:11 am Andrew C. Oliver wrote: Okay from Ruby on Linux...yes POI-ruby is probably your best option I thought you were doing from C on Linux Hopefully Avik is around and he can help... I'll ping him if he doesn't answer. Jeff Swensen wrote: I might be stating my intention incorrectly. I have the relevant bits from poi-ruby compiled with gcj, and am attempting to wrap that myself instead of using SWIG. As far as open office and gnumeric, I have been unable to find a fully featured discrete library for writing XLS files from ruby on linux. Would be most appreciative if you could point me to one. Andrew C. Oliver wrote: Why? Why not just compile with GCJ and then wrap that? Seems weird to go 3 techs deep... Also there are C utils for OLE and XLS. Check out open office and gnumeric...use those...doesn't make sense to use C-Ruby-POI Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ -- Jeffery S. Swensen Software Engineer Merrill Lextranet Legal Computer Solutions, Inc. 107 Union Wharf Boston, MA 02109 t. 617-227-4469 x234 [EMAIL PROTECTED] THE INFORMATION IN THIS MESSAGE IS INTENDED ONLY FOR THE PERSONAL AND CONFIDENTIAL USE OF THE DESIGNATED RECIPIENTS NAMED ABOVE AND MAY CONTAIN LEGALLY PRIVILEGED INFORMATION. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone at 617-227-4469 Ext. 200. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: POI-Ruby
My mistake, I'm using 1.3.31. Jeff Swensen wrote: Thanks for the responses. Avik, What version of SWIG has worked the best for you? The version installed here is 1.1 (patch 5). I see that is the most recent stable release. Thanks, Jeff Avik Sengupta wrote: Jeff You can certainly wrap stuff on your own, but I would figure it will be a lot of work, which is reason I started on swig. I wouldnt start on it unless you either have a lot of time, or some significant experience writing C extensions for ruby (neither of which is true for me) You'l have to declare the function signatures to call from ruby, convert objects (eg ruby strings to gcj string objects) and handle memory allocation and de-allocation on either side. Both ruby and java being garbage collected, not only will you have to worry about leaks, but also premature collection. http://www.rubycentral.com/book/ext_ruby.html has the basics. You've probably already seen this. With swig, you still have to worry about all this, but a lot of the boilerplate is generated. For eg, you'll have to write the object wrapping code once, and not worry about calling it every time an object is referenced. As for segfaults, the whole thing, i've found, is quite sensitive to swig version. Maybe you can try with an older swig version? Regards - Avik On Thursday 22 Mar 2007 3:03:11 am Andrew C. Oliver wrote: Okay from Ruby on Linux...yes POI-ruby is probably your best option I thought you were doing from C on Linux Hopefully Avik is around and he can help... I'll ping him if he doesn't answer. Jeff Swensen wrote: I might be stating my intention incorrectly. I have the relevant bits from poi-ruby compiled with gcj, and am attempting to wrap that myself instead of using SWIG. As far as open office and gnumeric, I have been unable to find a fully featured discrete library for writing XLS files from ruby on linux. Would be most appreciative if you could point me to one. Andrew C. Oliver wrote: Why? Why not just compile with GCJ and then wrap that? Seems weird to go 3 techs deep... Also there are C utils for OLE and XLS. Check out open office and gnumeric...use those...doesn't make sense to use C-Ruby-POI Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ -- Jeffery S. Swensen Software Engineer Merrill Lextranet Legal Computer Solutions, Inc. 107 Union Wharf Boston, MA 02109 t. 617-227-4469 x234 [EMAIL PROTECTED] THE INFORMATION IN THIS MESSAGE IS INTENDED ONLY FOR THE PERSONAL AND CONFIDENTIAL USE OF THE DESIGNATED RECIPIENTS NAMED ABOVE AND MAY CONTAIN LEGALLY PRIVILEGED INFORMATION. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone at 617-227-4469 Ext. 200. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: POI-Ruby
Why? Why not just compile with GCJ and then wrap that? Seems weird to go 3 techs deep... Also there are C utils for OLE and XLS. Check out open office and gnumeric...use those...doesn't make sense to use C-Ruby-POI Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ -- From Windows/Exchange to Linux/Meldware Buni Meldware Communication Suite Email, Calendaring, ease of configuration/administration http://buni.org - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: POI-Ruby
I might be stating my intention incorrectly. I have the relevant bits from poi-ruby compiled with gcj, and am attempting to wrap that myself instead of using SWIG. As far as open office and gnumeric, I have been unable to find a fully featured discrete library for writing XLS files from ruby on linux. Would be most appreciative if you could point me to one. Andrew C. Oliver wrote: Why? Why not just compile with GCJ and then wrap that? Seems weird to go 3 techs deep... Also there are C utils for OLE and XLS. Check out open office and gnumeric...use those...doesn't make sense to use C-Ruby-POI Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: POI-Ruby
Okay from Ruby on Linux...yes POI-ruby is probably your best option I thought you were doing from C on Linux Hopefully Avik is around and he can help... I'll ping him if he doesn't answer. Jeff Swensen wrote: I might be stating my intention incorrectly. I have the relevant bits from poi-ruby compiled with gcj, and am attempting to wrap that myself instead of using SWIG. As far as open office and gnumeric, I have been unable to find a fully featured discrete library for writing XLS files from ruby on linux. Would be most appreciative if you could point me to one. Andrew C. Oliver wrote: Why? Why not just compile with GCJ and then wrap that? Seems weird to go 3 techs deep... Also there are C utils for OLE and XLS. Check out open office and gnumeric...use those...doesn't make sense to use C-Ruby-POI Jeff Swensen wrote: I am attempting to write my own C wrapper for the POI Ruby bindings and am looking for some guidance. I compiled poi4r using the swig wrapper only to result in a segfault which I'm unable to track down. It also seems that swig generates a lot of unnecessary bloat while creating the wrapper, which is why I decided to try to replace it with my own version (also partly due to some feedback from my boss who seems to dislike swig quite a bit). Are there any resources you could point me to for writing the ruby interface? I understand that at the most basic level I need to define all of the Java classes and public methods, but after that I'm at a loss. I've tried googling but I can't find any examples of writing a c extension to wrap compiled java for ruby. Thanks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ -- From Windows/Exchange to Linux/Meldware Buni Meldware Communication Suite Email, Calendaring, ease of configuration/administration http://buni.org - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/