I'm compiling a branch of the Blender 3D modeling program from source (using SCONS), on a Fedora 8 box, and am running into an error that I didn't encounter compiling the same source on a CentOS 5 box, and I'm thinking it has to do with the variable definition. The error is:
source/blender/blenkernel/intern/implicit.c: In function ‘mul_bfmatrix_lfvector’:
source/blender/blenkernel/intern/implicit.c:592: error: ‘CLOTH_OPENMP_LIMIT’ undeclared (first use in this function)
source/blender/blenkernel/intern/implicit.c:592: error: (Each undeclared identifier is reported only once
source/blender/blenkernel/intern/implicit.c:592: error: for each function it appears in.)
source/blender/blenkernel/intern/implicit.c: In function ‘cloth_calc_force’:
source/blender/blenkernel/intern/implicit.c:1700: error: ‘CLOTH_OPENMP_LIMIT’ undeclared (first use in this function)
The file implicit.c
does define that variable; here's the first few lines of the file:
#include "MEM_guardedalloc.h"
#include "BKE_cloth.h"
#include "DNA_object_force.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_utildefines.h"
#include "BLI_threads.h"
#define CLOTH_OPENMP_LIMIT 25
#ifdef _WIN32
#include <windows.h>
static LARGE_INTEGER _itstart, _itend;
static LARGE_INTEGER ifreq;
the two lines that are throwing an error are:
#pragma omp parallel sections private(i) if(vcount > CLOTH_OPENMP_LIMIT)
and
#pragma omp parallel for private(i) if(numverts > CLOTH_OPENMP_LIMIT)
I'm guessing the error is due to the compiler and how it handles when in the compilation that variable gets defined, and since Fedora 8 is a bit outdated, it might have an older version of some compiler that's messing it up. Anyone have an idea how I can get around this variable showing up as "undeclared"?