[Semi-solved] Make and CMake builds on Arch Linux, x86_64

Hello,

I'm trying to build box2d on my x86_64, 64-bit machine that runs Arch Linux, as the physics library is a dependency of LÖVE and it is not included in Arch's package system.

After the 'make'-build failed, I got the cmake release, which unfortunately failed to build as well. I attached the 'cmake .' and 'make' output in this forum post.

Maybe I don't have some dependency? (I didn't see any list of dependencies for box2d btw.)

Note: It's impossible to search for "64 bit" on these forums and "x86_64" gave no useful resluts 😐

Hope you can help.

PS: box2d version is 2.0.1
So this might be a weak solution, but instead of fixing the cmake build, Firebird helped me fixing the normal, make-build (from the default 2.0.1 zip):

The errors indicated that functions from stdio.h and string.h were missing in some files, so I simply added #include <stdio.h> and #include <string.h> to the affected files and ran make again and added the lines to the error-ing files again etc etc.

Finally, box2d finished building.

I think it has something to do with an update to gcc or g++ or whatever compilers are used. I think they now require stdio and string to be included in all files in which they are used.


Regarding the cmake build: apparently it's missing glui.

However, there is no glui included in the .tgz and even if I copy it from the normal 2.0.1 zip, it won't help compiling.

I have freeglut installed (no idea if glui ships with it, I assume not).


So at least I got what I wanted 🙂 box2d is compiled and as there is no 'make install', I hope I'll figure out how to parse the build loaction to LÖVE.

Original thread: https://box2d.org/forum/viewtopic.php?t=1863