PDA

View Full Version : ZC 2.53.0 fails to compile Ubuntu 16.04



roracle
09-11-2019, 01:02 PM
As suggested, I have an install of Ubuntu 16.04 (virtual machine, but it's powerful enough here) with all updates and the proper g++, along with cmake and all the rest, and I have this error immediately when doing "make":


roracle@VBox:~/Downloads/ZeldaClassic-2.53/build$ make
Scanning dependencies of target zcsound
[ 1%] Building CXX object CMakeFiles/zcsound.dir/src/zcmusic.cpp.o
In file included from /home/roracle/Downloads/ZeldaClassic-2.53/./allegro/include/allegro/internal/alconfig.h:62:0,
from /home/roracle/Downloads/ZeldaClassic-2.53/./allegro/include/allegro/base.h:41,
from /home/roracle/Downloads/ZeldaClassic-2.53/./allegro/include/allegro.h:25,
from /home/roracle/Downloads/ZeldaClassic-2.53/src/zc_alleg.h:16,
from /home/roracle/Downloads/ZeldaClassic-2.53/src/zcmusic.cpp:13:
/home/roracle/Downloads/ZeldaClassic-2.53/./allegro/include/allegro/platform/alucfg.h:37:39: fatal error: allegro/platform/alunixac.h: No such file or directory
compilation terminated.
CMakeFiles/zcsound.dir/build.make:62: recipe for target 'CMakeFiles/zcsound.dir/src/zcmusic.cpp.o' failed
make[2]: *** [CMakeFiles/zcsound.dir/src/zcmusic.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/zcsound.dir/all' failed
make[1]: *** [CMakeFiles/zcsound.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

There is literally no "platform" directory in the "allegro" directory file, so there's no way it could find "alucfg.h" no matter how hard it tries. I don't know if this was intended, as the GitHub page suggests all changes made to allegro are in the file, or in "all422-fixed.zip" which also does not exist, as the GitHub readme points to a .allegro file directory which also does not exist in the downloaded package.

Any help would be nice here. (I'm baffled as to why people don't build in Linux first as a rule anyway. I figured a free platform with everything you need would be attractive to developers.)

ZoriaRPG
09-20-2019, 09:56 PM
As suggested, I have an install of Ubuntu 16.04 (virtual machine, but it's powerful enough here) with all updates and the proper g++, along with cmake and all the rest, and I have this error immediately when doing "make":



There is literally no "platform" directory in the "allegro" directory file, so there's no way it could find "alucfg.h" no matter how hard it tries. I don't know if this was intended, as the GitHub page suggests all changes made to allegro are in the file, or in "all422-fixed.zip" which also does not exist, as the GitHub readme points to a .allegro file directory which also does not exist in the downloaded package.

Any help would be nice here. (I'm baffled as to why people don't build in Linux first as a rule anyway. I figured a free platform with everything you need would be attractive to developers.)

I have not been able to compile ZC on Linux in a long time. You'll need to set up Allegro 4.4.3 in your include paths; and you may want to look at my current state of Linux fixes, here:

https://github.com/ArmageddonGames/ZeldaClassic/tree/2.53-LINUX

I made several changes in order to fix issues compiling with g++, but my libc and related files for g++ completely took a dive when it came down to linking intermediates, and when I tried to force a patch to my g++ deps, I ended up wrecking my deps trees.

You can also ask about Allegro on Linux on the forums at https://allegro.cc

I ran into this, and was never able to resolve it:



CMakeFiles/zelda.dir/src/qst.cpp.o: In function `check_questpwd(zquestheader*, char*)':

qst.cpp:(.text+0x3cbd): undefined reference to `_alemu_memcmp'
CMakeFiles/zelda.dir/src/qst.cpp.o: In function `readguys(PACKFILE*, zquestheader*, bool)':

roracle
10-03-2019, 10:09 AM
If I'm not mistaken, I believe AG uses a specific build of Allegro, customized to what they're doing. This is why, from what I can tell, they offer their own Allegro as part of the ZC download, but now I'm not so sure that's what's happening here.

ZoriaRPG
10-10-2019, 03:30 AM
If I'm not mistaken, I believe AG uses a specific build of Allegro, customized to what they're doing. This is why, from what I can tell, they offer their own Allegro as part of the ZC download, but now I'm not so sure that's what's happening here.

Our Allegro has one specific fix not in 4.4.3/4.4.4, but it is only a Windows fix.

We package Allegro because MSVC / Windows needs those files to build. On Linux, you can set up Allegro in your normal libs and include paths., and you can use the current full 4.x release from allegro.cc, if you want.

There are other issues in the src that we may need to fix (ZC 2.53 should be safe to compile, but 2.55 neesd some adjustments for g++), but Allegro is not one of them, on Linux. In fact, you will find that most Allegro 4 games still active are on Linux. I strongly advise also joining the forums on allegro.cc. Perhaps over there, we two, with the combined resources of the member-base there, can get some LX builds done.

2.53 R3 is nearing completion, and IIRC, I applied the 2.53 Linux fixes to it. Checkout branch 2.53 and see if you can compile it with some help from allegro.cc.


Please also join our Discord server for ZC Development: https://discord.gg/ZqdG9wM

I'd love to discuss this with you in real-time, over there. ;)

jeffythedragonslayer
01-29-2024, 07:39 AM
(I'm baffled as to why people don't build in Linux first as a rule anyway. I figured a free platform with everything you need would be attractive to developers.)

The answer to this one is that that would require Linux to actually successfully install in a virtual machine close to 100% of the time, which it does not do.