I am trying to get zexy running on linux-powerpc since I was just given 8 PowerMac G4-500s and 5 PowerMac 8600 604e 250 to do sound installations. Anyway, everything in zexy compiles, except for the parallel port module, z_lp.c.
At first it balked on compile, because linux-powerpc doesn't use sys/io.h, but rather asm/io.h. So adding this #ifdef made it compile with a few warnings:
#ifdef __powerpc__ #include <asm/io.h> #else #include <sys/io.h> #endif
Here are the warnings: z_lp.c: In function `lp_float': z_lp.c:44: warning: implicit declaration of function `outb' z_lp.c: In function `lp_new': z_lp.c:86: warning: implicit declaration of function `ioperm' z_lp.c:93: warning: implicit declaration of function `iopl'
But now it doesn't load, giving this error: /usr/local/lib/pd/externs/zexy.pd_linux: /usr/local/lib/pd/externs/zexy.pd_linux: undefined symbol: outb /usr/local/lib/pd/externs/zexy: can't load library
So looking at how outb is defined should lead to the answer, but that's about the limits of my knowledge:
sys/io.h: static __inline void outb (unsigned char value, unsigned short int port) { __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port)); }
asm/io.h: #define outb(val, port) out_8((u8 *)((port)+_IO_BASE), (val))
Any pointers, advice, whatever would be appreciated. I don't need the lp object to work, I just need zexy to work, so I can use the rest of those tasty objects.
-Hans
zen \ \ \[D[D[D[D
On Wed, 30 Oct 2002 21:04:01 -0800 (PST) Hans-Christoph wrote:
Anyway, everything in zexy compiles, except for the parallel port module, z_lp.c.
AFAIK, there is no parallel port on a PPC (and no HW support(?)). I've commented out all references to that object from makefile and in the main sources (line 183 and 270 in the zexy.c) to use the lib ... since you don't need it, no use compiling.
regards
On Thu, 31 Oct 2002, Michal Seta wrote:
AFAIK, there is no parallel port on a PPC (and no HW support(?)). I've commented out all references to that object from makefile and in the main sources (line 183 and 270 in the zexy.c) to use the lib ... since you don't need it, no use compiling.
Actually, old PPC machines did have parallel ports. The 8600s and the Beige G3 (which is basically a 7600 with a G3 mobo) both have parallel ports. So in the long run, it would be nice to do a real port.
I did try commenting out and #ifndef'ing the code, but I got an error, which I don't recall at the moment. I'll try again and report back if I have problems.
.hc
zen \ \ \[D[D[D[D
Hans-Christoph Steiner said this at Wed, 30 Oct 2002 21:04:01 -0800:
Any pointers, advice, whatever would be appreciated. I don't need the lp object to work, I just need zexy to work, so I can use the rest of those tasty objects.
Coming from Mac OS X, I'm fairly certain you simply don't want z_lp. When I tried to get it to compile, I eventually put a big #ifndef MACOSX at the beginning, and an #endif at the end of that file. Ugly, yes, but it seemed to be consistent with similar code switches in zexy. :)
I'm still a beginner with makefiles, so I'm trying to work out a way of triggering a definition on both our machines that would trigger that #ifndef (__powerpc__ is not defined by default). Does the command "uname -p" at the prompt give back "powerpc"?
And congratulations on your hardware find!
adam