From: Rob S. <rs...@MI...> - 2010-04-08 23:38:13
|
> You can set compiler options by setting the CFLAGS variable, e.g. : > > % CFLAGS='-O0' python setup.py build > > See http://docs.python.org/install/#building-extensions-tips-and-tricks > > I'm using the gcc from http://hpc.sf.net which seems to be setting > those options automatically. Well, I couldn't fix it with the compiler options. I don't know why hpc's and Apple's compilers are so different here, but they apparently are. But I could fix it by googling for recommendations on how to avoid duplicate symbol errors, which basically involves defining the thing shared between a bunch of modules (in this case, "SPMATRIX_UNIQUE_SYMBOL") as extern in the .h file, and defining it for real in one of the .c files. I might have broken something else by doing this, but it now installs out of the box and passes the tests I need it for. I'm attaching this as a very short patch file. -- Rob |