ebassi / graphene

A thin layer of graphic data types

Home Page:http://ebassi.github.io/graphene

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error : conversion to 'float' from 'double'

vtorri opened this issue · comments

with graphene 1.8.6, cross-compiling on linux and targetting windows 64 bits (using mingw-w64), i get this error when returning INFINITY in graphene-ray.c, lines 285 and 292.

I can provide the cross compilation file, meson output and ninja output if needed

Yes, please: attach the build logs.

here they are :

the cross toolchain file :
cross_toolchain.txt

meson is invoked like that :
meson .. --prefix=$3 --libdir=lib --buildtype=release --strip --cross-file ../cross_toolchain.txt --default-library shared -Dintrospection=false

the output is :

config.log

and ninja output :

make.log

thank you

I tink that i understand what the problem is: in mingw-w64's math.h (on fedora 27), if GNUC is defined (which is the case), INFINITY is defined as __builtin_inf and not __builttin_inff

when I compile on Windows, INFINITY is correctly defined as __builtin_inff

maybe i will do a sed when cross compiling on fedora

Closing as it is not a bug of graphene

may

Right, I was about to leave a reply after looking through mingw's issue tracker. 😃

C99 says that INFINITY is a float value; apparently, mingw used the wrong compiler built-in. It should have been fixed upstream.

on Windows, with MSYS2, INFINITY is correctly defined. I'm upgrading fedora to f30 and i'll see if INFINITY value has been fixed.