undeclared here (not in a function)

Dear Boardsters,


I've installed a Matrox Parhelia PCIx 256 into a PCIX slot in an HP DL580 G4. (PCIX video cards seem to bee like rocking horse poo these days). 16 x 2.4gHz x86-64 cores, 8g RAM, c.0.65TB HDD RAID 0 SAS. The OS is Mandriva Linux 2011.0.

Then the driver code was downloaded from the Matrox site, installed and compiled. I have already debugged some other issues whose problems were happily solved and the remaining issue seems to be:

mtx_os.c:35:37: error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)


The offending line of code in mtx_os.c is given as a "global variable declaration" thus:
static spinlock_t g_oMtxInterlock = SPIN_LOCK_UNLOCKED;

Can someone please help and tell me what's going on here and how to fix it if possible.

Thank you
Peter
Last edited on
And while I wish them all the best in their endeavours my poser is a real-world problem.

That doesn't make those problems any less real or the solutions any less applicable to your problem.

Can someone please help and tell me what's going on here and how to fix it.

Your compiler is unable to find either a declaration or definition for SPIN_LOCK_UNLOCKED (likely because it wasn't replaced during pre-processing with a macro substitution.) Supply one or make sure the appropriate #defines are enabled for your environment. Grepping the source for the term might be a decent place to start, if documentation for the driver code isn't available.

Then the driver code was downloaded from the Matrox site, installed and compiled.

If you have an error in the code, how was it compiled?
Last edited on
That doesn't make those problems any less real or the solutions any less applicable to your problem.
. Of course, Thank you. Where would we be if it weren't for people courageously learning how to do all of that? We'd be up the baiyou shooting Pukeko's.

The top-level dir has three Makefiles. The output log says the installer calls make and gcc. I'm just looking for the script that get's it all going...

Here you go, it's at http://pastebin.com/f35yCBR2

Intersting that you should ask those questions. Matrox only supports suse and RH so they won't answer any questions from users on anything other than those two :-(
Topic archived. No new replies allowed.