From thomas.kjosmoen at uis.no Fri Apr 4 05:30:47 2008 From: thomas.kjosmoen at uis.no (Thomas Kjosmoen) Date: Fri, 4 Apr 2008 11:30:47 +0200 Subject: [Tioga-users] Tioga problem with _Init_Font_Dictionary Message-ID: <2A78A829-B4BA-4B21-B107-2B75F2CCA01F@uis.no> > Hello, > > On Feb 19, 2008 3:48 PM, Bill Paxton wrote: > > I just this moment noticed that this message had been sent to me > rather than > > the Tioga-Users. > > (which you should have forwarded to, then ;-)...) > > > From: Jarimatti Valkonen > > Date: February 17, 2008 2:39:47 AM PST > > To: paxton at kitp.ucsb.edu > > Subject: Tioga problem with _Init_Font_Dictionary > > > > > > Hi! > > > > Thanks a lot for Tioga, it really looks nice. And I'd much rather > make > > pictures in Tioga than in MetaPost. However, I'm unable to run it > on my > > computer (Intel MacBook, Mac OS 10.4.11). I've installed it from > Rubygems > > and as far as I can tell the installation went fine. But when I'm > trying to > > run tioga or ctioga I get the following error message: > > > > --SNIP-- > > jarimatti at hal [~] > > (1) % tioga > > dyld: NSLinkModule() error > > dyld: Symbol not found: _Init_Font_Dictionary > > Referenced from: > > /Users/jarimatti/Source/Ruby/gems/gems/tioga-1.7/lib/Tioga/ > FigureMaker.bundle > > Expected in: flat namespace > > Ooops... We will need debugging information. Could you run > > ~ gdb --args =ruby =tioga > > You should get a prompt there. Send us the output of the command bt > in that prompt (along with the rest). > > Could you try replacing > > # define INTERN __private_extern__ > > by > > # define INTERN __attribute__ ((visibility ("hidden"))) > > in the split/namespace.h file and recompile ? (I'm afraid I don't > really know how to do it with Rubygems -- I could provide you with a > modified .gem file if you prefer). > > Cheers, > > Vincent, who thought that these problems had definitely gone... Since there haven't been any news on this, I'll try to follow up. I'm having the same problems when trying to use Tioga (r484) or 1.7 on OS X 10.5.2 (Leopard). Here's the whole gdb session: --->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--- >8--->8--- $>gdb --args =ruby =tioga GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .... done (gdb) run Starting program: /usr/bin/ruby /usr/bin/tioga Reading symbols for shared libraries +++. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done dyld: lazy symbol binding failed: Symbol not found: _Init_Font_Dictionary Referenced from: /Library/Ruby/Gems/1.8/gems/tioga-1.7/lib/Tioga/ FigureMaker.bundle Expected in: dynamic lookup dyld: Symbol not found: _Init_Font_Dictionary Referenced from: /Library/Ruby/Gems/1.8/gems/tioga-1.7/lib/Tioga/ FigureMaker.bundle Expected in: dynamic lookup Program received signal SIGTRAP, Trace/breakpoint trap. 0x8fe01045 in __dyld_dyld_fatal_error () (gdb) bt #0 0x8fe01045 in __dyld_dyld_fatal_error () #1 0x8fe06fa7 in __dyld__ZN4dyld14bindLazySymbolEPK11mach_headerPm () #2 0x8fe18b6f in __dyld_stub_binding_helper_interface2 () #3 0x001839bc in Init_FigureMaker () #4 0x000cc808 in dln_load () #5 0x000e6de1 in rb_require_safe () #6 0x000da18c in rb_eval_string_wrap () #7 0x000dad6a in rb_eval_string_wrap () #8 0x000d80da in rb_eval_string_wrap () #9 0x000d7541 in rb_eval_string_wrap () #10 0x000da95f in rb_eval_string_wrap () #11 0x000dad6a in rb_eval_string_wrap () #12 0x000d80da in rb_eval_string_wrap () #13 0x000e672d in rb_load () #14 0x000e6d8e in rb_require_safe () #15 0x000da18c in rb_eval_string_wrap () #16 0x000dad6a in rb_eval_string_wrap () #17 0x000d80da in rb_eval_string_wrap () #18 0x000d7541 in rb_eval_string_wrap () #19 0x000da95f in rb_eval_string_wrap () #20 0x000dad6a in rb_eval_string_wrap () #21 0x000d80da in rb_eval_string_wrap () #22 0x000e672d in rb_load () #23 0x000e6d8e in rb_require_safe () #24 0x000da18c in rb_eval_string_wrap () #25 0x000dad6a in rb_eval_string_wrap () #26 0x000d80da in rb_eval_string_wrap () #27 0x000d7541 in rb_eval_string_wrap () #28 0x000da95f in rb_eval_string_wrap () #29 0x000dad6a in rb_eval_string_wrap () #30 0x000d80da in rb_eval_string_wrap () #31 0x000e672d in rb_load () #32 0x000e6d8e in rb_require_safe () #33 0x000da18c in rb_eval_string_wrap () #34 0x000dad6a in rb_eval_string_wrap () #35 0x000d80da in rb_eval_string_wrap () #36 0x000d7541 in rb_eval_string_wrap () #37 0x000da95f in rb_eval_string_wrap () #38 0x000dad6a in rb_eval_string_wrap () #39 0x000d80da in rb_eval_string_wrap () #40 0x000e672d in rb_load () #41 0x000e6926 in rb_load () #42 0x000d1057 in rb_with_disable_interrupt () #43 0x000da18c in rb_eval_string_wrap () #44 0x000dad6a in rb_eval_string_wrap () #45 0x000d80da in rb_eval_string_wrap () #46 0x000e706e in rb_load_protect () #47 0x000e709f in ruby_exec () #48 0x000e70cb in ruby_run () #49 0x00001fff in main () ---8 < ---8 <---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- When trying to make your change to the namespace.h file, gem install fails with the following message: --->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--- >8--->8--- $> gem install tioga-1.7.gem Building native extensions. This could take a while... ERROR: Error installing tioga-1.7.gem: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install tioga-1.7.gem creating Makefile make Makefile:219: warning: overriding commands for target `/Library/Ruby/ Gems/1.8/gems/tioga-1.7/lib/Tioga' Makefile:217: warning: ignoring old commands for target `/Library/Ruby/ Gems/1.8/gems/tioga-1.7/lib/Tioga' gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. - fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c figures.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. - fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c generic.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. - fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c init.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. - fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c wrappers.c cc -arch ppc -arch i386 -pipe -bundle -undefined dynamic_lookup -o FigureMaker.bundle figures.o generic.o init.o wrappers.o -L"." -L"/ System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. - arch ppc -arch i386 -lruby -lpthread -ldl -lm ld: duplicate symbol _Dvector_Data_for_Read in generic.o and figures.o for architecture i386 collect2: ld returned 1 exit status ld: duplicate symbol _Dvector_Data_for_Read in generic.o and figures.o for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc6LoMaF.out (No such file or directory) make: *** [FigureMaker.bundle] Error 1 Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ tioga-1.7 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/tioga-1.7/split/Tioga/ gem_make.out ---8 < ---8 <---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- I hope this has been useful and that you can find a solution. I really, really want to use Tioga ;-) --Thomas From fourmond at gmail.com Fri Apr 4 11:16:34 2008 From: fourmond at gmail.com (Vincent Fourmond) Date: Fri, 4 Apr 2008 17:16:34 +0200 Subject: [Tioga-users] Tioga problem with _Init_Font_Dictionary In-Reply-To: <2A78A829-B4BA-4B21-B107-2B75F2CCA01F@uis.no> References: <2A78A829-B4BA-4B21-B107-2B75F2CCA01F@uis.no> Message-ID: <2e474d6f0804040816o6aa1e77fieb87b6ad25fc6eed@mail.gmail.com> Hello, On Fri, Apr 4, 2008 at 11:30 AM, Thomas Kjosmoen wrote: > > Could you try replacing > > > > # define INTERN __private_extern__ > > > > by > > > > # define INTERN __attribute__ ((visibility ("hidden"))) > > > > in the split/namespace.h file and recompile ? > ld: duplicate symbol _Dvector_Data_for_Read in generic.o and figures.o > for architecture i386 OK, I think I get the point. Could you try then with # define INTERN __attribute__ ((visibility ("hidden"))) extern (or the other way round, I'm not quite sure:) # define INTERN extern __attribute__ ((visibility ("hidden"))) Thanks Vincent From fourmond at gmail.com Fri Apr 4 15:06:26 2008 From: fourmond at gmail.com (Vincent Fourmond) Date: Fri, 04 Apr 2008 21:06:26 +0200 Subject: [Tioga-users] Tioga problem with _Init_Font_Dictionary In-Reply-To: References: <2A78A829-B4BA-4B21-B107-2B75F2CCA01F@uis.no> <2e474d6f0804040816o6aa1e77fieb87b6ad25fc6eed@mail.gmail.com> Message-ID: <47F67C32.3000009@gmail.com> Hello, Thomas Kjosmoen wrote: >> # define INTERN __attribute__ ((visibility ("hidden"))) extern >> (or the other way round, I'm not quite sure:) >> # define INTERN extern __attribute__ ((visibility ("hidden"))) > > Neither of these made any difference. I still got the same error: > > dyld: lazy symbol binding failed: Symbol not found: _Init_Font_Dictionary > Referenced from: > /Library/Ruby/Gems/1.8/gems/tioga-1.7/lib/Tioga/FigureMaker.bundle > Expected in: dynamic lookup > > dyld: Symbol not found: _Init_Font_Dictionary > Referenced from: > /Library/Ruby/Gems/1.8/gems/tioga-1.7/lib/Tioga/FigureMaker.bundle > Expected in: dynamic lookup OK, I looked on the wrong side. I think I'm finally starting to see the problem: the part that is shared between the Ruby version and the Python version is apparently not built with the gem... So, there is no code in FigureMaker.bundle :-<... This will require quite some tweaking. Expect a new release of Tioga reasonably soon that fixes that. Cheers, Vincent From vincent.fourmond at 9online.fr Sat Apr 5 17:22:29 2008 From: vincent.fourmond at 9online.fr (Vincent Fourmond) Date: Sat, 05 Apr 2008 23:22:29 +0200 Subject: [Tioga-users] Tioga 1.8 is out Message-ID: <47F7ED95.2010104@9online.fr> Hello, dear Tioga users ! Tioga 1.8 is out. Quoting the Tioga_README file: Version 1.8 is essentially a cleanup/bug fix release. Tioga now compiles with hardly any warnings, thanks to the work by Taro Sato. show_axis can now take a hash instead of a simple location, and can draw axes basically anywhere. See the axes_fun function in samples/plots/plots.rb and show_axis documentation. Few bugs were fixed, in particular the position of ticks with ticks_inside/ticks_outside, and the installation via Rubygems which was broken for such a long time we are ashamed of it. I apologize for having kept gems broken for so long, and I thank Thomas Kjosmoen who helped me realize what was broken. rdoc documentation at http://tioga.rubyforge.org/rdoc will be updated reasonably soon. Enjoy ! Vincent -- Vincent Fourmond, Doctor in Physics http://vince-debian.blogspot.com/ From paxton at kitp.ucsb.edu Wed Apr 23 09:41:50 2008 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Wed, 23 Apr 2008 06:41:50 -0700 Subject: [Tioga-users] Fwd: tioga gem install and repreview References: <367932D8-AC64-4E64-B2CF-EBFF49CB8E9A@astro.berkeley.edu> Message-ID: <815BEB85-9B70-4FF3-B5DA-50C9BE904075@kitp.ucsb.edu> Hi Dave, Thanks for the info. I'm forwarding your message to the tioga-users list since it may be of wider interest. Sorry about the Mac rubygems problem -- I'm glad you were able to work around it. Concerning NArray -- we are currently going through a reworking of the tioga implementation prompted by Taro Sato's project to make a Python version. Taro's version of tioga doesn't use Dvectors -- it uses the standard python analog of NArray. So, if you're willing to help Taro get some new software working, you might want to give "PyTioga" a try! Here are the links: http://pytioga.sourceforge.net/ and http:// sourceforge.net/projects/pytioga For the ruby Tioga, the NArray to Array to Dvector hack is probably the best work around for the short term. Cheers, Bill Begin forwarded message: > From: David MacMahon > Date: April 23, 2008 12:12:26 AM PDT > To: paxton at kitp.ucsb.edu > Subject: tioga gem install and repreview > > Hi, Bill, > > I've just discovered Tioga and am looking forward to great looking > plots. I installed in on my Mac using rubygems and discovered that > repreview did not get installed. I think it and > Reload_Preview_Document.scpt are omitted from the gemfile. :- > ( Anyway, I got the from the tarball and all is well now. :-) > > One thing that would be really helpful (for me at least) would be > if Tioga could use NArray (http://narray.rubyforge.org/) in > addition to DVector. NArray has many of the same features as > DVector, plus it can do complex numbers (which are a necessity for > my work on the radio interferometer for the Allen Telescope > Array). I suspect that they are somewhat similar in nature > underneath (i.e. basically a pointer to a block of memory), so it > should, in theory, be easy to convert from one to the other without > too much fussing (just tricky to make sure one doesn't free the > memory out from underneath the other!). Anyway, worst case is that > I can convert from NArray to Array and then to DVector. Not the > rosiest of prospects, but at least there is a straightforward (if > not speedy) solution. > > Perhaps a better approach would be to add missing (Ruby) functions > to NArray so that it would be indistinguishable from DVector. Do > you think that would be feasible or does Tioga depend on DVector's > underlying C implementation in a way that would make that approach > unworkable? > > Thanks again for Tioga! > > Dave > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/tioga-users/attachments/20080423/0fa1e188/attachment.html From paxton at kitp.ucsb.edu Fri Apr 25 10:00:34 2008 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Fri, 25 Apr 2008 07:00:34 -0700 Subject: [Tioga-users] QUICK_INSTALL for Tioga ver. 1.8 on Mac G4 under OS 10.4.11 fails In-Reply-To: <48116B73.4010809@speakeasy.net> References: <48116B73.4010809@speakeasy.net> Message-ID: <3252314B-D62C-4B7B-B7B6-4D46FDB50F27@kitp.ucsb.edu> Hi Sam, Vincent Fourmond is the tioga install guru, so he'll have to figure this one out for us. The zlib message might be a false alarm. What happens if you ignore it and try to continue with the installation? Or does the install stop at that point? Vincent, help! Thanks, Bill On Apr 24, 2008, at 10:26 PM, Samuel H. Dupree, Jr. wrote: > Bill, > > I'm attempting to install Tioga ver. 1.8 on a Mac G4 under Mac OS > 10.4.11. When I ran the QUICK_INSTALL file from my > home directory I got the following messages: > > > checking for zlib.h... yes > checking for compress() in -lz... no > Error: you should have zlib (including development files) installed to > build and run Tioga. You can get it there: > > http://www.zlib.net/ > > If that doesn't solve your problem, please report it on the Tioga > tracker: > > http://rubyforge.org/tracker/?group_id=701 > > > To my knowledge I have zlib and the development library installed. > My questions for you are: > > How do I verify that I have the development library installed? > > If it turns out that I need to install the development library, > what specific files do I need to install? > Looking forward to hearing from you. > > > Sam Dupree > -- > > Samuel H. Dupree, > Jr. > sdupree at speakeasy.net > 600 West Harvey Street > Apartment A-703 > http://www.speakeasy.org/~sdupree/ > Philadelphia, PA 19144-4345, USA > > HOME: 215-842-3663 WORK: > 610-354-2533 FAX: 610-354-7436 > > "What does it take to travel in space?" The > will to do it. - Dr. Wernher von Braun > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fourmond at gmail.com Fri Apr 25 10:29:34 2008 From: fourmond at gmail.com (Vincent Fourmond) Date: Fri, 25 Apr 2008 16:29:34 +0200 Subject: [Tioga-users] QUICK_INSTALL for Tioga ver. 1.8 on Mac G4 under OS 10.4.11 fails In-Reply-To: <3252314B-D62C-4B7B-B7B6-4D46FDB50F27@kitp.ucsb.edu> References: <48116B73.4010809@speakeasy.net> <3252314B-D62C-4B7B-B7B6-4D46FDB50F27@kitp.ucsb.edu> Message-ID: <2e474d6f0804250729n4516c848w754b4222f8b33587@mail.gmail.com> Hello, On Fri, Apr 25, 2008 at 4:00 PM, Bill Paxton wrote: > On Apr 24, 2008, at 10:26 PM, Samuel H. Dupree, Jr. wrote: > Bill, > > I'm attempting to install Tioga ver. 1.8 on a Mac G4 under Mac OS 10.4.11. > When I ran the QUICK_INSTALL file from my > home directory I got the following messages: > > > checking for zlib.h... yes > checking for compress() in -lz... no > Error: you should have zlib (including development files) installed to > build and run Tioga. You can get it there: > > http://www.zlib.net/ > > If that doesn't solve your problem, please report it on the Tioga tracker: > > http://rubyforge.org/tracker/?group_id=701 > > > To my knowledge I have zlib and the development library installed. The message says that zlib is not installed, but it might only be that the script was unable to find it - or, possibly, that your Ruby setup is broken in a certain way that prevents executables from being built (which has been seen sometimes on this list). To get more information, could you please post the contents of the split/mkmf2.log (or mkmf.log, I really don't remember) here ? > How do I verify that I have the development library installed? The fact that the header was found seems to indicate that the library is installed, but that for some reason the linking step is failing. Cheers, Vincent, who should really come up with a better installation scheme, but so far has been unable/unwilling/undecided/uncomfortable (pick which better suits your impressions) to do so... From fourmond at gmail.com Sat Apr 26 04:47:16 2008 From: fourmond at gmail.com (Vincent Fourmond) Date: Sat, 26 Apr 2008 10:47:16 +0200 Subject: [Tioga-users] Fwd: *****SPAM***** Re: QUICK_INSTALL for Tioga ver. 1.8 on Mac G4 under OS 10.4.11 fails In-Reply-To: <4812DB39.2060301@speakeasy.net> References: <48116B73.4010809@speakeasy.net> <3252314B-D62C-4B7B-B7B6-4D46FDB50F27@kitp.ucsb.edu> <2e474d6f0804250729n4516c848w754b4222f8b33587@mail.gmail.com> <4812DB39.2060301@speakeasy.net> Message-ID: <2e474d6f0804260147m3938d03craed1da78758db7ba@mail.gmail.com> [Forwarding reply of Samuel Dupree, my reply will follow] ---------- Forwarded message ---------- From: Samuel H. Dupree, Jr. Date: Sat, Apr 26, 2008 at 9:35 AM Subject: Re: *****SPAM***** Re: [Tioga-users] QUICK_INSTALL for Tioga ver. 1.8 on Mac G4 under OS 10.4.11 fails To: Vincent Fourmond Vincent Fourmond wrote: Hello, On Fri, Apr 25, 2008 at 4:00 PM, Bill Paxton wrote: On Apr 24, 2008, at 10:26 PM, Samuel H. Dupree, Jr. wrote: Bill, I'm attempting to install Tioga ver. 1.8 on a Mac G4 under Mac OS 10.4.11. When I ran the QUICK_INSTALL file from my home directory I got the following messages: checking for zlib.h... yes checking for compress() in -lz... no Error: you should have zlib (including development files) installed to build and run Tioga. You can get it there: http://www.zlib.net/ If that doesn't solve your problem, please report it on the Tioga tracker: http://rubyforge.org/tracker/?group_id=701 To my knowledge I have zlib and the development library installed. The message says that zlib is not installed, but it might only be that the script was unable to find it - or, possibly, that your Ruby setup is broken in a certain way that prevents executables from being built (which has been seen sometimes on this list). To get more information, could you please post the contents of the split/mkmf2.log (or mkmf.log, I really don't remember) here ? How do I verify that I have the development library installed? The fact that the header was found seems to indicate that the library is installed, but that for some reason the linking step is failing. Cheers, Vincent, who should really come up with a better installation scheme, but so far has been unable/unwilling/undecided/uncomfortable (pick which better suits your impressions) to do so... Vincent, I've attached a copy of split/mkmf2.log file to this note. I've also posted a copy of the file to the Support Request I filed at RubyForge (ID 19751). Hope this helps. Sam Dupree. -- ________________________________ Samuel H. Dupree, Jr. sdupree at speakeasy.net 600 West Harvey Street Apartment A-703 http://www.speakeasy.org/~sdupree/ Philadelphia, PA 19144-4345, USA HOME: 215-842-3663 WORK: 610-354-2533 FAX: 610-354-7436 "What does it take to travel in space?" The will to do it. - Dr. Wernher von Braun ________________________________ have_header: checking for zlib.h... -------------------- yes "gcc -E -I/usr/local/lib/ruby/1.8 -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I. -I./include -IDvector -IDvector/include -IDtable -IDtable/include -IFlate -IFlate/include -IFunction -IFunction/include -g -O2 -fno-common -pipe -fno-common -O2 -g -Wall -Werror-implicit-function-declaration conftest.c -o conftest.i" ./mkmf2.rb:1435: warning: Insecure world writable dir /Applications/ImageMagick-6.2.8/bin in PATH, mode 040777 checked program was: /* begin */ #include /* end */ -------------------- have_library: checking for compress() in -lz... -------------------- no "gcc -o conftest $INCFLAGS conftest.c -I$hdrdir -g -O2 -fno-common -pipe -fno-common -O2 -g -Wall -Werror-implicit-function-declaration $src $LIBPATH -arch i386 -lpthread -ldl -lobjc -lz" cc1: error: unrecognized command line option "-arch" checked program was: /* begin */ #include /*top*/ int main() { return 0; } int t() { compress(); return 0; } /* end */ "gcc -o conftest $INCFLAGS conftest.c -I$hdrdir -g -O2 -fno-common -pipe -fno-common -O2 -g -Wall -Werror-implicit-function-declaration $src $LIBPATH -arch i386 -lpthread -ldl -lobjc -lz" cc1: error: unrecognized command line option "-arch" checked program was: /* begin */ #include /*top*/ int main() { return 0; } int t() { void ((*volatile p)()); p = (void ((*)()))compress; return 0; } /* end */ -------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mkmf2.log URL: From fourmond at gmail.com Sat Apr 26 04:52:50 2008 From: fourmond at gmail.com (Vincent Fourmond) Date: Sat, 26 Apr 2008 10:52:50 +0200 Subject: [Tioga-users] *****SPAM***** Re: QUICK_INSTALL for Tioga ver. 1.8 on Mac G4 under OS 10.4.11 fails In-Reply-To: <4812DB39.2060301@speakeasy.net> References: <48116B73.4010809@speakeasy.net> <3252314B-D62C-4B7B-B7B6-4D46FDB50F27@kitp.ucsb.edu> <2e474d6f0804250729n4516c848w754b4222f8b33587@mail.gmail.com> <4812DB39.2060301@speakeasy.net> Message-ID: <2e474d6f0804260152r5a4c5925ob98f25ad909166b5@mail.gmail.com> Hello ! On Sat, Apr 26, 2008 at 9:35 AM, Samuel H. Dupree, Jr. wrote: > "gcc -o conftest $INCFLAGS conftest.c -I$hdrdir -g -O2 -fno-common -pipe > -fno-common -O2 -g -Wall -Werror-implicit-function-declaration $src $LIBPATH > -arch i386 -lpthread -ldl -lobjc -lz" > cc1: error: unrecognized command line option "-arch" This is very typical of a broken Ruby setup: compiler options hardcoded into ruby's configuration file are not compatible with the compiler available... Your best luck is to find the rbconfig.rb file; the command locate rbconfig.rb should find it (you might need to run sudo updatedb beforehand). Then, open this file (with administrator privileges, chances are as a normal user you don't have write permissions there), find the line with -arch i386 and remove -arch i386 from this line. That should take you further, hopefully to completion. Cheers, Vincent From sdupree at speakeasy.net Sat Apr 26 16:09:03 2008 From: sdupree at speakeasy.net (Samuel H. Dupree, Jr.) Date: Sat, 26 Apr 2008 16:09:03 -0400 Subject: [Tioga-users] *****SPAM***** Re: *****SPAM***** Re: QUICK_INSTALL for Tioga ver. 1.8 on Mac G4 under OS 10.4.11 fails In-Reply-To: <2e474d6f0804260152r5a4c5925ob98f25ad909166b5@mail.gmail.com> References: <48116B73.4010809@speakeasy.net> <3252314B-D62C-4B7B-B7B6-4D46FDB50F27@kitp.ucsb.edu> <2e474d6f0804250729n4516c848w754b4222f8b33587@mail.gmail.com> <4812DB39.2060301@speakeasy.net> <2e474d6f0804260152r5a4c5925ob98f25ad909166b5@mail.gmail.com> Message-ID: <48138BDF.9030801@speakeasy.net> Vincent Fourmond wrote: > Hello ! > > On Sat, Apr 26, 2008 at 9:35 AM, Samuel H. Dupree, Jr. > wrote: > >> "gcc -o conftest $INCFLAGS conftest.c -I$hdrdir -g -O2 -fno-common -pipe >> -fno-common -O2 -g -Wall -Werror-implicit-function-declaration $src $LIBPATH >> -arch i386 -lpthread -ldl -lobjc -lz" >> cc1: error: unrecognized command line option "-arch" >> > > This is very typical of a broken Ruby setup: compiler options > hardcoded into ruby's configuration file are not compatible with the > compiler available... Your best luck is to find the rbconfig.rb file; > the command > > locate rbconfig.rb > > should find it (you might need to run > > sudo updatedb > > beforehand). > > Then, open this file (with administrator privileges, chances are as > a normal user you don't have write permissions there), find the line > with -arch i386 and remove -arch i386 from this line. That should take > you further, hopefully to completion. > > Cheers, > > Vincent > > > Vincent, What and/or where is updatedb? It does not appear to be on my system: *Last login: Sat Apr 26 15:41:36 on ttyp1* *Welcome to Darwin!* *dsl092-239-159:~ samueldupree$ locate updatedb* */private/tmp/locateQ57vGFIHDB/_updatedb681* */usr/libexec/locate.updatedb* */usr/share/man/man8/locate.updatedb.8* *dsl092-239-159:~ samueldupree$ man updatedb* *No manual entry for updatedb* *dsl092-239-159:~ samueldupree$ * Sam Dupree. -- ------------------------------------------------------------------------ Samuel H. Dupree, Jr. sdupree at speakeasy.net 600 West Harvey Street Apartment A-703 http://www.speakeasy.org/~sdupree/ Philadelphia, PA 19144-4345, USA HOME: 215-842-3663 WORK: 610-354-2533 FAX: 610-354-7436 "What does it take to travel in space?" The will to do it. - Dr. Wernher von Braun ------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mmb_emblem.-2gif Type: image/gif Size: 3793 bytes Desc: not available URL: From fourmond at gmail.com Sat Apr 26 16:47:38 2008 From: fourmond at gmail.com (Vincent Fourmond) Date: Sat, 26 Apr 2008 22:47:38 +0200 Subject: [Tioga-users] *****SPAM***** Re: *****SPAM***** Re: QUICK_INSTALL for Tioga ver. 1.8 on Mac G4 under OS 10.4.11 fails In-Reply-To: <48138BDF.9030801@speakeasy.net> References: <48116B73.4010809@speakeasy.net> <3252314B-D62C-4B7B-B7B6-4D46FDB50F27@kitp.ucsb.edu> <2e474d6f0804250729n4516c848w754b4222f8b33587@mail.gmail.com> <4812DB39.2060301@speakeasy.net> <2e474d6f0804260152r5a4c5925ob98f25ad909166b5@mail.gmail.com> <48138BDF.9030801@speakeasy.net> Message-ID: <481394EA.4060700@gmail.com> Hello, Samuel H. Dupree, Jr. wrote: >> locate rbconfig.rb >> >> should find it (you might need to run >> >> sudo updatedb >> >> beforehand). >> >> Then, open this file (with administrator privileges, chances are as >> a normal user you don't have write permissions there), find the line >> with -arch i386 and remove -arch i386 from this line. That should take >> you further, hopefully to completion. >> >> Cheers, >> >> Vincent >> >> >> > Vincent, > > What and/or where is updatedb? It does not appear to be on my system: > > *Last login: Sat Apr 26 15:41:36 on ttyp1* > *Welcome to Darwin!* > *dsl092-239-159:~ samueldupree$ locate updatedb* > */private/tmp/locateQ57vGFIHDB/_updatedb681* > */usr/libexec/locate.updatedb* > */usr/share/man/man8/locate.updatedb.8* > *dsl092-239-159:~ samueldupree$ man updatedb* > *No manual entry for updatedb* > *dsl092-239-159:~ samueldupree$ * Don't bother so much about updatedb - it is only needed if the locate database is not updated automatically, but that does not seem to be your case. Just get the rbconfig.rb with locate rbconfig.rb and edit it as I've written previously. Cheers, Vincent From davidm at astro.berkeley.edu Mon Apr 28 03:21:11 2008 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 28 Apr 2008 00:21:11 -0700 Subject: [Tioga-users] Tioga and NArray Message-ID: <8CDC1477-DC90-47DD-AFF2-B7257DF40119@astro.berkeley.edu> Thanks for the reply, Bill! > Concerning NArray -- we are currently going through a reworking of > the tioga implementation prompted by Taro Sato's project to make a > Python version. Taro's version of tioga doesn't use Dvectors -- it > uses the standard python analog of NArray. That sounds interesting, though I'm not sure what that means for the future of Ruby Tioga. > So, if you're willing to help Taro get some new software working, you > might want to give "PyTioga" a try! Thanks for the info, but switching to Python is not a palatable option. > For the ruby Tioga, the NArray to Array to Dvector hack is probably > the best work around for the short term. I've had some initial success (very initial) using NArray with the sine.rb sample. Perhaps it was automatically doing the NArray->Array- >Dvector conversion under the covers, but here's a diff of the changes I made... $ diff -U0 sine.rb na_sine.rb --- sine.rb 2008-04-23 12:28:55.000000000 -0700 +++ na_sine.rb 2008-04-27 22:40:21.000000000 -0700 @@ -10,0 +11 @@ +require 'narray' @@ -34,2 +35,2 @@ - xAxis = Dvector.new(num) {|i| 2*PI*i/(num-1) } - yAxis = xAxis.sin + xAxis = NArray.float(num).indgen!.mul!(2*PI/(num-1)) + yAxis = NMath.sin(xAxis) If needed, I can monkey-patch a "from_na" method into the Dvector class... module Dobjects class Dvector def self.from_na(na) _load([1, na.length, na.to_s].pack('CIa*')) end end end I think I can do something similar for Dtable, too. Dave From paxton at kitp.ucsb.edu Mon Apr 28 11:30:20 2008 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Mon, 28 Apr 2008 08:30:20 -0700 Subject: [Tioga-users] Tioga and NArray In-Reply-To: <711C35C1-E61A-4CAC-928B-A728E693377A@astro.berkeley.edu> References: <8CDC1477-DC90-47DD-AFF2-B7257DF40119@astro.berkeley.edu> <711C35C1-E61A-4CAC-928B-A728E693377A@astro.berkeley.edu> Message-ID: <59E0A28C-5667-48B1-9C79-5D650D21B681@kitp.ucsb.edu> Hi Dave, I'm forwarding your message to tioga-users until the mailing list issues get resolved. Thanks for the NArray info. If there are performance concerns, perhaps some of the conversion can move to the Dvector/Dtable c code. If you figure out how to get hold of the NArray pointer, it shouldn't be too hard to do the memcpy. BTW: you asked about the possible impact of a python version of tioga on the ruby version. First, let me say that the ruby version is alive and well and is the version that Vincent and I use on a daily basis. The python version came about because there are python users who wanted to have tioga in their native language. So far, the effort has had a positive effect on the ruby implementation, both in terms of internal cleanup and, even better, in terms of good new ideas about functionality that will eventually show up in both python and ruby versions of tioga. Cheers, Bill On Apr 28, 2008, at 8:09 AM, David MacMahon wrote: > Thanks for the feedback, Bill. I had signed up using > davidm at rubyforge.org, which worked until I tried to post and then > it failed with... > > 550 5.7.1 : Sender address rejected: Mail > server in loopback network > > ...so I reposted from my regular address (which I will sign up with > later this morning, I've got more to say!). > > BTW, the "from_na" scheme does work... > > $ irb -r narray -r Dobjects/Dvector > irb(main):001:0> module Dobjects > irb(main):002:1> class Dvector > irb(main):003:2> def self.from_na(na) > irb(main):004:3> _load([1, na.length, na.to_s].pack('CIa*')) > irb(main):005:3> end > irb(main):006:2> end > irb(main):007:1> end > => nil > irb(main):008:0> na=NArray.dfloat(4).randomn > => NArray(ref).float(4): > [ 0.437404, 1.90081, -1.23652, -0.832147 ] > irb(main):009:0> dv=Dobjects::Dvector.fr > Dobjects::Dvector.freeze Dobjects::Dvector.from_na > Dobjects::Dvector.frozen? > irb(main):009:0> dv=Dobjects::Dvector.from_na(na) > => 0.437404 1.90081 -1.23652 -0.832147 > > That's probably about the fastest conversion possible without > getting the NArray structure from the Ruby VALUE in C and doing a > memcpy of its data. I'm also close to a similar technique for a > "to_na" instance method using _dump. > > Something similar should be possible with Dtable, though there > might need to be a transpose involved. > > Dave > > On Apr 28, 2008, at 7:29 , Bill Paxton wrote: >> Hi Dave, >> >> Good progress! If the "from_na" scheme works, it should become a >> part of tioga, so keep everyone informed. >> >> --Bill >> >> p.s. It would probably be a good idea for you to sign up for the >> tioga mailing lists! >> >> >> On Apr 28, 2008, at 12:21 AM, David MacMahon wrote: >> >>> Thanks for the reply, Bill! >>> >>>> Concerning NArray -- we are currently going through a reworking of >>>> the tioga implementation prompted by Taro Sato's project to make a >>>> Python version. Taro's version of tioga doesn't use Dvectors -- it >>>> uses the standard python analog of NArray. >>> >>> That sounds interesting, though I'm not sure what that means for >>> the future of Ruby Tioga. >>> >>> >>>> So, if you're willing to help Taro get some new software >>>> working, you >>>> might want to give "PyTioga" a try! >>> >>> Thanks for the info, but switching to Python is not a palatable >>> option. >>> >>>> For the ruby Tioga, the NArray to Array to Dvector hack is probably >>>> the best work around for the short term. >>> >>> I've had some initial success (very initial) using NArray with >>> the sine.rb sample. Perhaps it was automatically doing the >>> NArray->Array->Dvector conversion under the covers, but here's a >>> diff of the changes I made... >>> >>> $ diff -U0 sine.rb na_sine.rb >>> --- sine.rb 2008-04-23 12:28:55.000000000 -0700 >>> +++ na_sine.rb 2008-04-27 22:40:21.000000000 -0700 >>> @@ -10,0 +11 @@ >>> +require 'narray' >>> @@ -34,2 +35,2 @@ >>> - xAxis = Dvector.new(num) {|i| 2*PI*i/(num-1) } >>> - yAxis = xAxis.sin >>> + xAxis = NArray.float(num).indgen!.mul!(2*PI/(num-1)) >>> + yAxis = NMath.sin(xAxis) >>> >>> If needed, I can monkey-patch a "from_na" method into the Dvector >>> class... >>> >>> module Dobjects >>> class Dvector >>> def self.from_na(na) >>> _load([1, na.length, na.to_s].pack('CIa*')) >>> end >>> end >>> end >>> >>> I think I can do something similar for Dtable, too. >>> >>> Dave >>> >>> _______________________________________________ >>> Tioga-users mailing list >>> Tioga-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/tioga-users >>> >> > > From davidm at astro.berkeley.edu Mon Apr 28 14:02:46 2008 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 28 Apr 2008 11:02:46 -0700 Subject: [Tioga-users] Tioga and NArray Message-ID: <3291863A-7C84-4E8E-AB39-92322D636213@astro.berkeley.edu> Here is a short "monkey-patch" to make is possible to convert Dvector from/to NArray... module Dobjects class Dvector # Create a Dvector from an NArray. def self.from_na(na) _load([1, na.length, na.to_s].pack('CIa*')) end # Create an NArray with the same length and contents as +self+. def to_na ::NArray.to_na(_dump(nil)[5..-1], ::NArray::DFLOAT) end end # Dvector end # Dobjects Here is an example (assuming the above is in "dobjects_ext.rb")... $ irb -r Dobjects/Dvector -r narray -r dobjects_ext.rb irb(main):001:0> Dobjects::Dvector[1,2,3,4].to_na => NArray.float(4): [ 1.0, 2.0, 3.0, 4.0 ] irb(main):002:0> Dobjects::Dvector.from_na(NArray.dfloat(4).indgen!) => 0 1 2 3 Here is the (not unexpected) behavior if NArray is not loaded... $ irb -r Dobjects/Dvector -r dobjects_ext.rb irb(main):001:0> Dobjects::Dvector[1,2,3,4].to_na NameError: uninitialized constant NArray from ./dobjects_ext.rb:9:in `to_na' from (irb):1 I'm working on Dtable next... Dave From davidm at astro.berkeley.edu Mon Apr 28 16:01:31 2008 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 28 Apr 2008 13:01:31 -0700 Subject: [Tioga-users] Generating Tioga plots from within Ruby Message-ID: <3C7F2600-7DAA-4A80-9B20-59C249CD1CBF@astro.berkeley.edu> I'm still learning Tioga, but after looking through most of the tutorial (thanks!) it seems that the typical use pattern for Tioga is this... # Setup stuff class MyClass def initalize() # save reference to FigureMaker.default # setup defaults # define figure with name and block end end MyClass.new Then, to make the pdf from within Ruby (i.e. not from the command line), I need to call... FigureMaker.default.make_pdf(figure_name_or_number) ...which will then do some initializing stuff, call my figure's block, and then do some finishing stuff. What I would find convenient is a more "immediate" version of make_pdf that could be called like this... FigureMaker.default.make_pdf_immediately() do |t| # whatever the block that I passed to def_figure would have done end In fact, make_pdf could behave this way if a block is given and behave the original way of a block is not given. Note that the FigureMaker instance would pass itself into the block (as alluded to with the "|t|" parameter in the pseudo-code). Even better still, FigureMaker.make_pdf could forward the call and block to the FigureMaker.default so that one could just say... FigureMaker.make_pdf() do |t| # t will be FigureMaker.default # whatever the block that I passed to def_figure would have done end I think this can all be accomplished with one small change and one small addition. Here is the change... --- split/Tioga/lib/FigMkr.rb 2008-04-28 12:51:40.000000000 -0700 +++ split/Tioga/lib/FigMkr.patched.rb 2008-04-28 12:52:07.000000000 -0700 @@ -2332 +2332 @@ - cmd.call + cmd.call(self) ...and here is the addition... module Tioga class FigureMaker def self.make_pdf(name='immediate', &block) self.default.def_figure(name, &block) self.default.make_pdf(name) end end end With these in place, one can so something like... require 'rubygems' require 'Tioga/FigureMaker' include Tioga include FigureConstants FigureMaker.make_pdf('blue') do |t| t.fill_color = Blue t.fill_frame end Any chance these changes (possibly fleshed out a little more vis a vis the FigureMaker#make_pdf instance method) could be incorporated in the next Tioga version? Thanks, Dave