Opened 6 months ago

Last modified 6 months ago

#72769 new defect

simutrans @112.0: error: expected expression

Reported by: MrFish486 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.11.3
Keywords: monterey Cc:
Port: simutrans

Description

I tried to install Simutrans with port, and it failed while compiling.

I got the following error:

Error: Failed to build simutrans: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_simutrans/simutrans/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port simutrans failed

Attachments (1)

err.log (200.3 KB) - added by MrFish486 6 months ago.
The log file (/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_simutrans/simutrans/main.log)

Download all attachments as: .zip

Change History (4)

Changed 6 months ago by MrFish486

Attachment: err.log added

The log file (/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_simutrans/simutrans/main.log)

comment:1 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: monterey added
Summary: Simutrans installation fails on Monterey 12.7.6simutrans @112.0: error: expected expression

The problem is that the simultans file sqobject.h defines a macro type which conflicts with the macOS system headers:

:info:build In file included from squirrel/squirrel/sqvm.cc:5:
:info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/math.h:310:
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/limits:149:85: error: expected expression
:info:build     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();}
:info:build                                                                                     ^
:info:build squirrel/squirrel/sqobject.h:131:24: note: expanded from macro 'type'
:info:build #define type(obj) ((obj)._type)
:info:build                        ^

Our port is outdated, using version 112.0 released in 2012. This bug was fixed in 2017 in version 120.3 by changing the name of the macro from type to sqtype so updating the port should fix this. The current version upstream is 124.3.1.

comment:2 Changed 6 months ago by MrFish486

I changed the Portfile's version from 112.0 to 124.3.1, and then ran sudo port clean simutrans to clean up the files, and then I tried to install simutrans again, but it said that the checksums didn't match.

Error: Checksum (rmd160) mismatch for simupak64-124-3.zip
Error: Checksum (sha256) mismatch for simupak64-124-3.zip
Error: Failed to checksum simutrans-pak64: Unable to verify file checksums
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_simutrans/simutrans-pak64/main.log for details.
Error: Unable to execute port simutrans: upgrade simutrans-pak64 failed

Maybe some of the old files are still laying around somewhere? I am not very experienced with port, so I don't know.

comment:3 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Naturally the checksums won't match if you change the distfile. The checksums are there to ensure you get the same version 112.0 distfile that we tested with. If you're trying to update a port to a new version, you'll need to put the new distfile's checksums into the Portfile, in addition to whatever other changes are needed to update to that version. For example, this port has patchfiles; the patches may need to be updated for this new version or may no longer be necessary. Since it has been so many years since we last updated the port, many changes may be needed.

Note: See TracTickets for help on using tickets.