You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a PowerBook G4 with a PowerPC processor and Mac OS X 10.4.11 Tiger. The binary from openttd.org crashes on startup because of #5694. So I compiled my own binary.
While compiling OpenTTD 1.4.1, I got a compiler error from lzo/lzodefs.h about length of some array being negative. My lzo2 library and headers are from lzo 2.08.
The error happens because src/os/macosx/osx_stdafx.h contains these lines
/* LP64 only exists in 10.5 and higher */
# if defined(APPLE) && !defined(LP64)
# define LP64 0
# endif
OpenTTD has defined LP64 to 0, so defined(LP64) is true. Therefore, lzo makes a compile-time assertion that sizeof(long) == 8. This assertion fails because long has 4 bytes here. When an assertion fails, lzo makes an array of negative length.
If lzo2 is correct, LP64 must be defined or not defined. One should never define LP64 to 0.
To fix this error, I deleted this definition of LP64. I got several compiler warnings about LP64 not being defined, so I then changed OpenTTD to check defined(LP64) instead of LP64. I have attached my patch in the file openttd-lp64.diff.
kernigh2 opened the ticket and wrote:
Attachments
Reported version: 1.4.1
Operating system: Mac OS X
This issue was imported from FlySpray: https://bugs.openttd.org/task/6069
The text was updated successfully, but these errors were encountered: