Package: ogre
Version: 1.0.6-1.3
Severity: important

Your package fails to build on MIPS with GCC 4.1.

Note that this is not the same as the last bug I filed about GCC 4.1
problems.  This one is MIPS specific.  I tested the patch I submitted
on AMD64 and it works fine.  However, there's another complication on
mips.

> Automatic build of ogre_1.0.6-1.3 on bigsur by sbuild/mips 1.106
...
>  mips-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../OgreMain/include 
> -I/usr/include/freetype2 -I../../OgreMain/include -DOGRE_NONCLIENT_BUILD -g 
> -O2 -MT OgreMaterialSerializer.lo -MD -MP -MF 
> .deps/OgreMaterialSerializer.Tpo -c OgreMaterialSerializer.cpp  -fPIC -DPIC 
> -o .libs/OgreMaterialSerializer.o
> OgreMaterialSerializer.cpp: In function 'bool 
> Ogre::parseTexture(Ogre::String&, Ogre::MaterialScriptContext&)':
> OgreMaterialSerializer.cpp:609: error: expected unqualified-id before numeric 
> constant
> OgreMaterialSerializer.cpp:640: error: invalid lvalue in assignment
> OgreMaterialSerializer.cpp:644: error: invalid lvalue in assignment
> OgreMaterialSerializer.cpp: In function 'bool 
> Ogre::parseDepthBias(Ogre::String&, Ogre::MaterialScriptContext&)':
> OgreMaterialSerializer.cpp:1223: warning: passing 'Ogre::Real' for argument 1 
> to 'void Ogre::Pass::setDepthBias(Ogre::ushort)'
> OgreMaterialSerializer.cpp: In function 'void 
> Ogre::processManualProgramParam(size_t, const Ogre::String&, 
> Ogre::StringVector&, Ogre::MaterialScriptContext&)':
> OgreMaterialSerializer.cpp:1346: warning: passing 'double' for argument 3 to 
> 'void Ogre::GpuProgramParameters::setConstant(size_t, const float*, size_t)'
> OgreMaterialSerializer.cpp:1363: warning: passing 'double' for argument 3 to 
> 'void Ogre::GpuProgramParameters::setConstant(size_t, const int*, size_t)'
> make[3]: *** [OgreMaterialSerializer.lo] Error 1

Line 609 is:

    int mips = -1; // When passed to TextureManager::load, this means default 
to default number of mipmaps

Looking at the code generated by GCC shows that it tries to compile:
   int 1 = -1;

Further investigation shows that on MIPS the constant "mips" is
defined as 1.  I have no idea who thought this was a good idea, but
the compiler does it - so please use a different variable name.
Apparently GCC on i386 defines i386=1 too... *shakes head*



(sid)859:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] cat test.c
int main() {
    printf("%d\n", mips);
}
(sid)860:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] gcc test.c
test.c: In function ‘main’:
test.c:2: warning: incompatible implicit declaration of built-in
function ‘printf’
(sid)861:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] ./a.out
1
zsh: exit 2     ./a.out
(sid)872:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] uname -m
mips64
(sid)873:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] gcc -E -x c /dev/null -Wp,-dM 
| grep " mips "
#define mips 1


-- 
Martin Michlmayr
http://www.cyrius.com/

Reply via email to