From: Coleman M. <cm...@uc...> - 2002-01-14 21:16:39
|
Greetings- I am running Yellowdoglinux(a redhat variant for powerpc) and am trying to use Vpython. My version of linux does not have the gtkgl. The FAQs for Vpython point to the redhat site. From a CD of the most recent redhat, I used the gtkglarea.... but that needs the ld.linux.so.2 which is not present. Any suggestions? Is there a version of these libraries that i can use without this dependency? I have downloaded the python 2.2, and found the other modules needed, but cannot seem to get around this one. Thanks. Coleman Mosley |
From: David A. <dm...@an...> - 2002-01-15 13:48:52
|
I don't know anything about Yellow Dog Linux, but perhaps you could compile gtkglarea from source? |
From: Coleman M. <cm...@uc...> - 2002-01-15 17:15:35
|
David- Thanks for the suggestion. As I am new to Linux, how would I do that. Is the source available on the redhat site? Thanks. ocleman David Andersen wrote: > I don't know anything about Yellow Dog Linux, but perhaps you could compile > gtkglarea from source? |
From: David A. <dm...@an...> - 2002-01-15 17:35:48
|
I've never built it myself but I did look to see if it was available: www.rpmfind.net has a gtkglarea-1.2.3-2.src.rpm, which I assume is the latest version. |
From: Andy D. <dou...@la...> - 2002-01-15 17:56:26
|
On Tue, 15 Jan 2002, David Andersen wrote: > I've never built it myself but I did look to see if it was available: > www.rpmfind.net has a gtkglarea-1.2.3-2.src.rpm, which I assume is the > latest version. Does anyone know how to unpack a source rpm if you don't have an rpm command? (E.g. Debian .debs are ar(1) archives containing .tar.gz archives.) Thanks, -- Andy Dougherty dou...@la... Dept. of Physics Lafayette College, Easton PA 18042 |
From: David A. <dm...@an...> - 2002-01-15 18:04:34
|
I've only worked with RedHat and Mandrake distributions - I've no idea what to do with a *.rpm in the absence of rpm .. |
From: Kevin C. <kj...@gr...> - 2002-01-15 18:13:43
|
On Tue, 15 Jan 2002, David Andersen wrote: > I've only worked with RedHat and Mandrake distributions - I've no > idea what to do with a *.rpm in the absence of rpm .. I seem to remember something about cpio... Never used it myself, but I thought that was the animal under RPM's skin. -- Kevin Cole, RHCE, Linux Admin | E-mail: kj...@gr... Gallaudet Research Institute | WWW: http://gri.gallaudet.edu/~kjcole/ Hall Memorial Bldg S-419 | Voice: (202) 651-5135 Washington, D.C. 20002-3695 | FAX: (202) 651-5746 |
From: Kevin C. <kj...@gr...> - 2002-01-15 18:19:34
|
On Tue, 15 Jan 2002, David Andersen wrote: > I've only worked with RedHat and Mandrake distributions - I've no > idea what to do with a *.rpm in the absence of rpm .. Follow-up: I just did a quick check... Apparently there's a program called rpm2cpio that converts for you. The example I've found shows: rpm2cpio package.i386.rpm | cpio -ivd dir/subdir/filename it creates the path structure in your current directory and extracts the file to that (i.e. "filename" ends up in "./dir/subdir" as you'd expect). -- Kevin Cole, RHCE, Linux Admin | E-mail: kj...@gr... Gallaudet Research Institute | WWW: http://gri.gallaudet.edu/~kjcole/ Hall Memorial Bldg S-419 | Voice: (202) 651-5135 Washington, D.C. 20002-3695 | FAX: (202) 651-5746 |
From: dman <ds...@ri...> - 2002-01-15 20:06:16
|
On Tue, Jan 15, 2002 at 12:57:35PM -0500, Andy Dougherty wrote: | On Tue, 15 Jan 2002, David Andersen wrote: | | > I've never built it myself but I did look to see if it was available: | > www.rpmfind.net has a gtkglarea-1.2.3-2.src.rpm, which I assume is the | > latest version. | | Does anyone know how to unpack a source rpm if you don't have an rpm | command? (E.g. Debian .debs are ar(1) archives containing .tar.gz | archives.) Use 'alien' to turn it into a .deb or whatever. Better yet, just go to the upstream site and get the source tarball from them. -D -- Microsoft is to operating systems & security .... .... what McDonald's is to gourmet cooking |
From: Andrew W. <an...@ph...> - 2002-01-15 18:38:35
|
On Tue, 15 Jan 2002 12:35:36 -0500, David Andersen wrote: >I've never built it myself but I did look to see if it was available: >www.rpmfind.net has a gtkglarea-1.2.3-2.src.rpm, which I assume is the >latest version. You can extract, compile, and install directly with the 'rpm' command once you have the archive: rpm --rebuild gtkglarea-1.2.3-2.src.rpm That will not only extract, compile and install it, it will also leave a binary package (gtkglarea-1.2.3-2.rpm) sitting in a directory under /usr/src/redhat somewhere. The extraction and compilation gets done under there too, but I can never remember exactly where, it's not hard to find. Not that I've actually managed to get Visual working under linux - I tried ages ago with older versions of Visual and Redhat, and gave up after hitting a morass of dependencies. I already had it working under windows anyway... On the topic of extracting the contents of RPM's without 'rpm' or 'rpm2cpio', I'd say it would be tricky without digging through source code for the file format. Easiest just to extract a source rpm on a redhat box using rpm, then find and copy the sources off from /usr/src/redhat to wherever you want them. Andrew -- Dr Andrew Williams an...@ph... Perth Observatory, an...@uc... Walnut rd, Bickley, Western Australia. an...@lo... |
From: Coleman M. MD F. <cm...@pa...> - 2002-01-18 20:26:02
|
Thanks to all of you for your replies. I'm closer but is is not working yet. With rpm2cpio, it did not seem to translate. I donwloaded the ...src.rpm and converted it. The original make produced an error that there were stray "\" in the file cvisual.cpp. This was actually a problem listed on the vpython archives from last Nov, unfortunately the solution for that person was to use the binary code. Catch-22 for me. So I edited the file mad delted the stray backslashes. Below is the new error message. I do not know c,c++ beyond minial use so do not know how to correct the source file. Ths current version of this file is also attached. Any suggestions or corrections would be appreciated. It seems that this is a bug for any linux OS (see the nov message if interested) trying to compile from source rather than binary. Thanks for the assistance. Coleman Error message: g++ -g -I. -I./CXX/Include -I/usr/include/python2.1 -I/usr/include/python2.1/Numeric `gtk-config --cflags gtk gthread` -w -c -o cvisual.o cvisual.cpp cvisual.cpp: In method `cvisual_module::cvisual_module()': cvisual.cpp:111: `create_vector' is not a member of type `cvisual_module' cvisual.cpp:112: `create_immutableVector' is not a member of type `cvisual_module' cvisual.cpp:113: `vector_mag' is not a member of type `cvisual_module' cvisual.cpp:114: `vector_norm' is not a member of type `cvisual_module' cvisual.cpp:115: `vector_cross' is not a member of type `cvisual_module' cvisual.cpp:116: `vector_rotate' is not a member of type `cvisual_module' cvisual.cpp:124: `create_box' is not a member of type `cvisual_module' cvisual.cpp:125: `create_sphere' is not a member of type `cvisual_module' cvisual.cpp:126: `create_ring' is not a member of type `cvisual_module' cvisual.cpp:127: `create_cylinder' is not a member of type `cvisual_module' cvisual.cpp:128: `create_cone' is not a member of type `cvisual_module' cvisual.cpp:129: `create_arrow' is not a member of type `cvisual_module' cvisual.cpp:130: `create_hexahedron' is not a member of type `cvisual_module' cvisual.cpp:131: `create_curve' is not a member of type `cvisual_module' cvisual.cpp:132: `create_convex' is not a member of type `cvisual_module' cvisual.cpp:133: `create_frame' is not a member of type `cvisual_module' cvisual.cpp:134: `create_label' is not a member of type `cvisual_module' cvisual.cpp:135: `create_faces' is not a member of type `cvisual_module' make: *** [cvisual.o] Error 1 cvisual.cpp (the stray \ 's removed from the Object what in CALLF): #include "cvisual.h" #include "display.h" #include "mouseobject.h" #include "gldevice.h" #include "prim.h" #include "arrprim.h" #include "label.h" #include "rate.h" const char * copyright = "Copyright 2000 David Scherer. All Rights Reserved."; Object create_sphere(const Tuple& args, const Dict& kwargs); Object create_ring(const Tuple& args, const Dict& kwargs); Object create_box(const Tuple& args, const Dict& kwargs); Object create_cylinder(const Tuple& args, const Dict& kwargs); Object create_cone(const Tuple& args, const Dict& kwargs); Object create_arrow(const Tuple& args, const Dict& kwargs); Object create_hexahedron(const Tuple& args, const Dict& kwargs); Object create_curve(const Tuple& args, const Dict& kwargs); Object create_convex(const Tuple& args, const Dict& kwargs); Object create_frame(const Tuple& args, const Dict& kwargs); Object create_label(const Tuple& args, const Dict& kwargs); Object create_faces(const Tuple& args, const Dict& kwargs); #define CALLF(what) Object what(const Tuple& args, const Dict& kwargs) { return ::what(args,kwargs); } #define CREATEF(what) CALLF(create_##what) class cvisual_module : public ExtensionModule<cvisual_module> { public: cvisual_module(); virtual ~cvisual_module() {} private: Object create_display(const Tuple& args, const Dict& kwargs) { Display *d = new Display(*new GLDevice()); return init(d,args,kwargs); } Object handle_event(const Tuple& args, const Dict& kwargs) { return Int(::handle_event(*args[0])); } Object shutdown(const Tuple& args, const Dict& kwargs) { Display::shutdown(); return Nothing(); } Object waitclose(const Tuple& args, const Dict& kwargs) { Display::waitclose(); return Nothing(); } Object allclosed(const Tuple& args, const Dict& kwargs) { return Int( Display::allclosed() ? 1 : 0 ); } Object rate(const Tuple& args, const Dict& kwargs) { if (args.length() != 1) throw TypeError("Incorrect number of arguments."); float freq = Float(args[0]); if (freq<=0.0) throw ValueError("Frequency must be positive."); static rate_timer *rt; if (!rt) rt = new rate_timer(); rt->delay(1.0 / freq); return Nothing(); } CREATEF(hexahedron); CREATEF(curve); CREATEF(convex); CREATEF(frame); CREATEF(label); CREATEF(box); CREATEF(sphere); CREATEF(ring); CREATEF(cylinder); CREATEF(cone); CREATEF(arrow); CREATEF(faces); CREATEF(vector); CREATEF(immutableVector); CALLF(vector_mag); CALLF(vector_norm); CALLF(vector_cross); CALLF(vector_rotate); }; cvisual_module::cvisual_module() : ExtensionModule<cvisual_module>("cvisual") { init_platform(); import_array(); Vector::init_type(); clickObject::init_type(); mouseObject::init_type(); Display::init_type(); Primitive::init_type(); ArrayPrimitive::init_type(); Label::init_type(); add_keyword_method("vector", &cvisual_module::create_vector, "vector([x,y[,z]]) = [x,y,z]"); add_keyword_method("constant_vector", &cvisual_module::create_immutableVector, "constant_vector([x,y[,z]]) = (x,y,z)"); add_keyword_method("mag", &cvisual_module::vector_mag, "mag(v) = |v|"); add_keyword_method("norm", &cvisual_module::vector_norm, "norm(v) = v/|v|"); add_keyword_method("cross", &cvisual_module::vector_cross, "cross(a,b) = a x b"); add_keyword_method("rotate", &cvisual_module::vector_rotate, "rotate(v, angle=radians, axis=[0,0,1]) rotates v angle radians around axis"); add_keyword_method("shutdown", &cvisual_module::shutdown, ""); add_keyword_method("waitclose", &cvisual_module::waitclose, ""); add_keyword_method("allclosed", &cvisual_module::allclosed, ""); add_keyword_method("rate", &cvisual_module::rate, ""); add_keyword_method("display", &cvisual_module::create_display, ""); add_keyword_method("box", &cvisual_module::create_box, ""); add_keyword_method("sphere", &cvisual_module::create_sphere, ""); add_keyword_method("ring", &cvisual_module::create_ring, ""); add_keyword_method("cylinder", &cvisual_module::create_cylinder, ""); add_keyword_method("cone", &cvisual_module::create_cone, ""); add_keyword_method("arrow", &cvisual_module::create_arrow, ""); add_keyword_method("hexahedron", &cvisual_module::create_hexahedron, ""); add_keyword_method("curve", &cvisual_module::create_curve, ""); add_keyword_method("convex", &cvisual_module::create_convex, ""); add_keyword_method("frame", &cvisual_module::create_frame, ""); add_keyword_method("label", &cvisual_module::create_label, ""); add_keyword_method("faces", &cvisual_module::create_faces, ""); add_keyword_method("_handleevent", &cvisual_module::handle_event, ""); initialize("cvisual module - visual implementation in C++"); Dict d = moduleDictionary(); d["VectorType"] = Type((PyObject*)Vector::type_object()); } extern "C" void cvisual_DLL initcvisual() { new cvisual_module(); } |
From: David S. <dsc...@vi...> - 2002-01-18 20:43:26
|
I do not think the backslashes you deleted were "stray backslashes". They continue a line in a macro expansion by "escaping" the subsequent line feed character. What you are probably seeing is a file with Windows \r\n line terminators. The preprocessor sees "\\\r" and complains. You can probably fix this by replacing the backslashes and fixing the line terminators. There's a script that comes with Python to do it; there are also common tools like 'dos2unix'; and in a pinch you can roll your own with something like x = re.sub(r'\r\n',r'\n',open('cvisual.cpp','rb').read()) open('cvisual.cpp','wb').write(x) In a pinch, just delete the backslashes and cram the whole CALLF macro onto one line. Dave > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Coleman Mosley MD FACP > Sent: Friday, January 18, 2002 3:30 PM > To: David Andersen; Andy Dougherty; Kevin Cole; Andrew > Williams; Konrad Piwowarczyk > Cc: vis...@li... > Subject: Re: [Visualpython-users] gtkgl library > > > Thanks to all of you for your replies. I'm closer but is is > not working yet. > With rpm2cpio, it did not seem to translate. I donwloaded > the ...src.rpm > and converted it. The original make produced an error that > there were stray > "\" in the file cvisual.cpp. This was actually a problem > listed on the > vpython archives from last Nov, unfortunately the solution > for that person > was to use the binary code. Catch-22 for me. > So I edited the file mad delted the stray backslashes. > Below is the new > error message. I do not know c,c++ beyond minial use so do > not know how to > correct the source file. > Ths current version of this file is also attached. > Any suggestions or corrections would be appreciated. It > seems that this is a > bug for any linux OS (see the nov message if interested) > trying to compile > from source rather than binary. > Thanks for the assistance. > Coleman > > > Error message: > g++ -g -I. -I./CXX/Include -I/usr/include/python2.1 > -I/usr/include/python2.1/Numeric `gtk-config --cflags gtk > gthread` -w -c -o > cvisual.o cvisual.cpp > cvisual.cpp: In method `cvisual_module::cvisual_module()': > cvisual.cpp:111: `create_vector' is not a member of type > `cvisual_module' > cvisual.cpp:112: `create_immutableVector' is not a member of type > `cvisual_module' > cvisual.cpp:113: `vector_mag' is not a member of type `cvisual_module' > cvisual.cpp:114: `vector_norm' is not a member of type > `cvisual_module' > cvisual.cpp:115: `vector_cross' is not a member of type > `cvisual_module' > cvisual.cpp:116: `vector_rotate' is not a member of type > `cvisual_module' > cvisual.cpp:124: `create_box' is not a member of type `cvisual_module' > cvisual.cpp:125: `create_sphere' is not a member of type > `cvisual_module' > cvisual.cpp:126: `create_ring' is not a member of type > `cvisual_module' > cvisual.cpp:127: `create_cylinder' is not a member of type > `cvisual_module' > cvisual.cpp:128: `create_cone' is not a member of type > `cvisual_module' > cvisual.cpp:129: `create_arrow' is not a member of type > `cvisual_module' > cvisual.cpp:130: `create_hexahedron' is not a member of type > `cvisual_module' > cvisual.cpp:131: `create_curve' is not a member of type > `cvisual_module' > cvisual.cpp:132: `create_convex' is not a member of type > `cvisual_module' > cvisual.cpp:133: `create_frame' is not a member of type > `cvisual_module' > cvisual.cpp:134: `create_label' is not a member of type > `cvisual_module' > cvisual.cpp:135: `create_faces' is not a member of type > `cvisual_module' > make: *** [cvisual.o] Error 1 > > cvisual.cpp (the stray \ 's removed from the Object what in > CALLF): #include "cvisual.h" #include "display.h" #include > "mouseobject.h" #include "gldevice.h" #include "prim.h" > #include "arrprim.h" #include "label.h" #include "rate.h" > > const char * copyright = "Copyright 2000 David Scherer. All Rights > Reserved."; > > Object create_sphere(const Tuple& args, const Dict& kwargs); > Object create_ring(const Tuple& args, const Dict& kwargs); > Object create_box(const Tuple& args, const Dict& kwargs); > Object create_cylinder(const Tuple& args, const Dict& > kwargs); Object create_cone(const Tuple& args, const Dict& > kwargs); Object create_arrow(const Tuple& args, const Dict& > kwargs); Object create_hexahedron(const Tuple& args, const > Dict& kwargs); Object create_curve(const Tuple& args, const > Dict& kwargs); Object create_convex(const Tuple& args, const > Dict& kwargs); Object create_frame(const Tuple& args, const > Dict& kwargs); Object create_label(const Tuple& args, const > Dict& kwargs); Object create_faces(const Tuple& args, const > Dict& kwargs); > > #define CALLF(what) > Object what(const Tuple& args, const Dict& kwargs) { > return ::what(args,kwargs); > } > > #define CREATEF(what) CALLF(create_##what) > > class cvisual_module : public ExtensionModule<cvisual_module> { > public: > cvisual_module(); > > virtual ~cvisual_module() {} > > private: > Object create_display(const Tuple& args, const Dict& kwargs) { > Display *d = new Display(*new GLDevice()); > return init(d,args,kwargs); > } > > Object handle_event(const Tuple& args, const Dict& kwargs) { > return Int(::handle_event(*args[0])); > } > > Object shutdown(const Tuple& args, const Dict& kwargs) { > Display::shutdown(); > return Nothing(); > } > > Object waitclose(const Tuple& args, const Dict& kwargs) { > Display::waitclose(); > return Nothing(); > } > > Object allclosed(const Tuple& args, const Dict& kwargs) { > return Int( Display::allclosed() ? 1 : 0 ); > } > > Object rate(const Tuple& args, const Dict& kwargs) { > if (args.length() != 1) throw TypeError("Incorrect number of > arguments."); > > float freq = Float(args[0]); > if (freq<=0.0) throw ValueError("Frequency must be positive."); > > static rate_timer *rt; > if (!rt) rt = new rate_timer(); > > rt->delay(1.0 / freq); > > return Nothing(); > } > > CREATEF(hexahedron); > CREATEF(curve); > CREATEF(convex); > CREATEF(frame); > CREATEF(label); > CREATEF(box); > CREATEF(sphere); > CREATEF(ring); > CREATEF(cylinder); > CREATEF(cone); > CREATEF(arrow); > CREATEF(faces); > CREATEF(vector); > CREATEF(immutableVector); > CALLF(vector_mag); > CALLF(vector_norm); > CALLF(vector_cross); > CALLF(vector_rotate); > }; > > cvisual_module::cvisual_module() > : ExtensionModule<cvisual_module>("cvisual") > { > init_platform(); > > import_array(); > > Vector::init_type(); > clickObject::init_type(); > mouseObject::init_type(); > Display::init_type(); > Primitive::init_type(); > ArrayPrimitive::init_type(); > Label::init_type(); > > add_keyword_method("vector", &cvisual_module::create_vector, > "vector([x,y[,z]]) = [x,y,z]"); > add_keyword_method("constant_vector", > &cvisual_module::create_immutableVector, > "constant_vector([x,y[,z]]) = > (x,y,z)"); > add_keyword_method("mag", &cvisual_module::vector_mag, > "mag(v) = |v|"); > add_keyword_method("norm", &cvisual_module::vector_norm, > "norm(v) = v/|v|"); > add_keyword_method("cross", &cvisual_module::vector_cross, > "cross(a,b) = a > x b"); > add_keyword_method("rotate", > &cvisual_module::vector_rotate, "rotate(v, > angle=radians, axis=[0,0,1]) rotates v angle radians around axis"); > > add_keyword_method("shutdown", &cvisual_module::shutdown, ""); > add_keyword_method("waitclose", &cvisual_module::waitclose, ""); > add_keyword_method("allclosed", &cvisual_module::allclosed, ""); > add_keyword_method("rate", &cvisual_module::rate, ""); > > add_keyword_method("display", &cvisual_module::create_display, ""); > add_keyword_method("box", &cvisual_module::create_box, ""); > add_keyword_method("sphere", &cvisual_module::create_sphere, ""); > add_keyword_method("ring", &cvisual_module::create_ring, ""); > add_keyword_method("cylinder", > &cvisual_module::create_cylinder, ""); > add_keyword_method("cone", &cvisual_module::create_cone, ""); > add_keyword_method("arrow", &cvisual_module::create_arrow, ""); > add_keyword_method("hexahedron", > &cvisual_module::create_hexahedron, ""); > add_keyword_method("curve", &cvisual_module::create_curve, ""); > add_keyword_method("convex", &cvisual_module::create_convex, ""); > add_keyword_method("frame", &cvisual_module::create_frame, ""); > add_keyword_method("label", &cvisual_module::create_label, ""); > add_keyword_method("faces", &cvisual_module::create_faces, ""); > add_keyword_method("_handleevent", > &cvisual_module::handle_event, ""); > > initialize("cvisual module - visual implementation in C++"); > > Dict d = moduleDictionary(); > d["VectorType"] = Type((PyObject*)Vector::type_object()); > } > > > extern "C" > void cvisual_DLL initcvisual() { > new cvisual_module(); > } > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |