I’m trying to write a formula for the DXX-Rebirth project now that it’s able to be compiled just with resources out of Homebrew. However, I’m running into a strange issue that I’m not sure how to track down, so I’m wondering whether anybody here has ever seen something similar.
Building the project can be done with Homebrew-provided resources by installing the scons, sdl, sdl_image, sdl_mixer, libpng, and physfs packages, and then running the following:
Doing that from the terminal builds just fine. However, when I try to do that with a formula using a line that looks like this:
system "scons", "macos_add_frameworks=False"
it fails with a linker error when attempting to link the object files together. Specifically:
Undefined symbols for architecture x86_64: "dxx_error_object_type_mismatch()", referenced from: bump_this_object(valptridx<d1x::object>::ptridx<valptridx<d1x::object>::vm>, valptridx<d1x::object>::ptridx<valptridx<d1x::object>::vm>, dcx::vms_vector const&, int) in .d1x-rebirth.collide.o "valptridx<d1x::wall>::null_pointer_exception::report(char const*, unsigned int)", referenced from: valptridx<d1x::wall>::ptr<valptridx<d1x::wall>::im>::get_nonnull_pointer(char const*, unsigned int) const in .d1x-rebirth.wall.o ld: symbol(s) not found for architecture x86_64
The problem is, I have no idea why it would be missing symbols for this architecture other than maybe some sort of environmental edge case, and I’m not really sure how to track that down. Is there any chance anybody else has run into this?
If anybody’s interested, I set up a tap with the non-working formula at https://github.com/Kreeblah/homebrew-dxx-rebirth-tap. It’s pretty basic, though. Just the dependencies, grabbing the source from Github, applying a patch I’m waiting on being incorporated into the codebase to fix a recent Mac build issue (building from the console with that patch works just fine, though), and then starting the build.