Opened 2 years ago

Closed 23 months ago

#65194 closed defect (fixed)

godot doesn't use the right compiler

Reported by: jmroot (Joshua Root) Owned by: jasonliu-- (Jason Liu)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: godot

Description

For example: https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/188222/steps/install-port/logs/stdio

It's running simply clang++. It looks like clang-14 may need to be added to the list of known compilers, although TBH I don't understand the purpose of having all those variants rather than just setting compiler.cxx_standard 2014 (or whatever) and using whatever configure.compiler ends up being. At the very least, it needs to be made able to cope with new clang versions existing.

Attachments (2)

Portfile.diff (3.7 KB) - added by jmroot (Joshua Root) 2 years ago.
compiler.diff (1.2 KB) - added by jmroot (Joshua Root) 2 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 2 years ago by jasonliu-- (Jason Liu)

The purpose of having all those clang variants is due to the way the Godot devs have written the SCons file. They actually hard-code a clang version to look for on the system, and unfortunately, I don't think they're willing to change how they currently do it to accommodate a generic clang compiler. Perhaps it's due to some limitation in SCons, or just the developers' preference.

I'm currently halfway across the world from home, and my computing resources are somewhat limited here at the moment, so I'll add the new clang variants when I return home next week.

Speaking of clang-14, why is the godot port trying to compile using clang 14 anyway? Was this recently set as MacPorts' default clang version or something? As far as I can remember, I wrote the Portfile in such a way that if no clang variant is set, the build should simply use whatever is currently set as MacPorts' default clang version number.

Changed 2 years ago by jmroot (Joshua Root)

Attachment: Portfile.diff added

Changed 2 years ago by jmroot (Joshua Root)

Attachment: compiler.diff added

comment:2 Changed 2 years ago by jmroot (Joshua Root)

Clang 14 is now the first fallback choice if the system clang isn't suitable, yes. The current godot portfile tries to choose a default variant based on configure.compiler, but that doesn't work if no corresponding variant exists. Suggested fix attached.

comment:3 Changed 23 months ago by jmroot (Joshua Root)

Ping?

comment:4 Changed 23 months ago by jasonliu-- (Jason Liu)

Sorry about that, haven't gotten around to it. Things have been crazy with work since I got home from the other side of the planet. I've taken a look at your suggested fix, and it looks good, for the most part. I'll probably name compiler.diff something a bit more descriptive. I have one more item to take care of for work today, I'll have free time tomorrow to take care of this.

comment:5 Changed 23 months ago by jasonliu-- (Jason Liu)

comment:6 Changed 23 months ago by Jason Liu <jasonliu--@…>

Resolution: fixed
Status: assignedclosed

In 73229d35c227d412616d65b2a95c066255c97977/macports-ports (master):

godot: remove clang variants, always use ${configure.compiler} to find the correct compiler

Closes: #65194

Note: See TracTickets for help on using tickets.