nem0 / OpenFBX

Lightweight open source FBX importer
MIT License
1.15k stars 135 forks source link

Fix build on 32-bit archs #72

Closed coldtobi closed 2 years ago

coldtobi commented 2 years ago

The typedefs for the 64bit vars are not correct on 32 bit archs, triggering the static asserts. Intead use C++11 standard types.

(Argubably, a global s/u64/uint64_t/g reps a s/i64/int64_t/g would do the job as well, but this patch would be much more intrusive).

Note: uintXX_t is a C++11 feature, this might (did not check) bump the language standard requirments.)

Example problem caused by this is the build error on darkradiant for Debian, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001110 An example build log can be found here: https://buildd.debian.org/status/fetch.php?pkg=darkradiant&arch=i386&ver=2.14.0-1&stamp=1638612147&raw=0

nem0 commented 2 years ago

this leaks cstdint header, we should just fix the typedefs

coldtobi commented 2 years ago

I disagree here, but this is just my bike shed color: this is made part of the C++ 11 language defining so that this kind of problems are properly solved.... Fixing the typedefs will always be fragile.

nem0 commented 2 years ago

The lib has been used by many people for years, so it's not so fragile and it's super easy to fix

coldtobi commented 2 years ago

The lib has been used by many people for years, so it's not so fragile and it's super easy to fix

And yet, as soon my upstream darkradiant integrated it recently it instantly exploded on the Debian build daemons ....

nem0 commented 2 years ago

Sorry, I'm not merging any PR which introduces includes in ofbx.h

coldtobi commented 2 years ago

You do you, it's your project.... Nothing more I have to say, I guess