Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on OS X against libc++ with current freetype: max undefined #6223

Closed
DorpsGek opened this issue Jan 31, 2015 · 1 comment
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

neverpanic opened the ticket and wrote:

Hi,

on OS X 10.10.2 when building openttd 1.4.0 from source with clang and libc++ (rather than the older libstdc++), the build fails in src/fontcache.cpp because it cannot find the std::max() template for the given parameters.

The problem occurs because std::max() is called with the literal "1", which is an integer literal, and "slot->bitmap.width + BOOLEAN_EXPRESSION", which is unsigned int because the width field in FT_Bitmap is unsigned int. std::max(), however, is only defined as a template with two parameters of the same type, which "int" and "unsigned int" are not. I'm not sure whether this works with libstdc++, but this looks wrong to me.

This can be fixed by changing the integer literal to an unsigned integer literal by appending an "u". I'm attaching a patch to do this.

Attachments

Reported version: 1.4.4
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/6223
@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 3, 2015

planetmaker closed the ticket.

Reason for closing: Duplicate

of #6185. Thanks for the patch anyway.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6223

@DorpsGek DorpsGek closed this as completed Feb 3, 2015
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant