Bug 280195 - emulators/zsnes: Fix build by using an older C++ standard
Summary: emulators/zsnes: Fix build by using an older C++ standard
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-08 20:46 UTC by Naram Qashat
Modified: 2024-07-30 22:51 UTC (History)
1 user (show)

See Also:


Attachments
zsnes-1.51.patch (3.67 KB, patch)
2024-07-08 20:46 UTC, Naram Qashat
cyberbotx: maintainer-approval+
Details | Diff
Failure log for poudriere build on FreeBSD 14.0 i386 (15.39 KB, text/plain)
2024-07-14 07:22 UTC, Torsten Zuehlsdorff
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Naram Qashat 2024-07-08 20:46:03 UTC
Created attachment 251941 [details]
zsnes-1.51.patch

Since ZSNES is not in active development, with the last release being in 2007, the code is not designed to be compiled with more recent C++ standards. Thus, this patch makes it use an older standard to make it compile.

- Updated Makefile (cleaned up through portclippy and portfmt), adding a CONFIGURE_ENV to set the C++ standard through CXXFLAGS.
- Updated files/patch-configure as the above CXXFLAGS were being ignored due to one line using CFLAGS instead of CXXFLAGS.
Comment 1 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2024-07-14 07:21:36 UTC
I can't compile it on FreeBSD 14.0 i386. Can you check the log? Since i am using the default without any change: how did you test it? how could you compile it?
Comment 2 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2024-07-14 07:22:21 UTC
Created attachment 252035 [details]
Failure log for poudriere build on FreeBSD 14.0 i386
Comment 3 Naram Qashat 2024-07-14 15:25:55 UTC
That's rather strange, but I tested with 14.1:

https://poudriere.cyberbotx.com:8766/data/local_i386-default/2024-07-08_15h57m22s/logs/zsnes-1.51_12,1.log

If it needs to compile with 14.0 as well, then I'll have to look into that, as I don't have a poudriere jail for that currently.
Comment 4 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2024-07-16 11:38:44 UTC
> If it needs to compile with 14.0 as well, then I'll have to look into that, as I don't have a poudriere jail for that currently.

Currently, it is needed, since 14.0 is still supported. But the support runs out in around a month. So in the worst case, we can sit it out. :D Have you tested it with 13.x also?
Comment 5 Naram Qashat 2024-07-17 01:11:04 UTC
(In reply to Torsten Zuehlsdorff from comment #4)

I hadn't tested with 13.3, but did a test build just now and it builds fine with the patch I provided: https://poudriere.cyberbotx.com:8766/data/13i386-default/2024-07-16_21h08m36s/logs/zsnes-1.51_12,1.log
Comment 6 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2024-07-30 13:08:29 UTC
It build fine yesterday on 13.3, 14.0 and 14.1 :) Going to commit it later :)
Comment 7 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2024-07-30 13:43:46 UTC
Ah, sorry, i looked at the wrong port (i did some parallel testing). -.-

It still fails on 14.0. The error still is:  

checking for zlib - version >= 1.2.3... 1.3, bad version string given
	by zlib, sometimes due to very old zlibs that didnt correctly
	define their version. Please upgrade if you are running an
	old zlib... no
configure: error: zlib >= 1.2.3 is required
Comment 8 Naram Qashat 2024-07-30 13:48:17 UTC
(In reply to Torsten Zuehlsdorff from comment #7)

Since it compiles with 13.3 and 14.1, would it be possible to get it committed anyways, or would you rather wait until support for 14.0 runs out? I don't really see a need to patch it to work with 14.0 if it is going out the door. Plus I doubt very many people will be using this port outside of people looking at it for nostalgia purposes, there are vastly better SNES emulators out there.
Comment 9 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2024-07-30 13:55:16 UTC
Since you are the maintainer: what option is best?

* Sit it out until and commit it 2024-09-05 when 14.0 is EOL
* Just commit it and I will ignore the warning about 14.0 until then :D
* Add an ignore clause for 14.0 so it is committed but will remove the port from the default build for all 14.0 users.
Comment 10 Naram Qashat 2024-07-30 14:26:51 UTC
Perhaps the last option would be the best one.
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-07-30 22:26:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=09bbcc173a47febddd0e82f14f43c971a90c5008

commit 09bbcc173a47febddd0e82f14f43c971a90c5008
Author:     Torsten Zuehlsdorff <tz@FreeBSD.org>
AuthorDate: 2024-07-30 22:19:10 +0000
Commit:     Torsten Zuehlsdorff <tz@FreeBSD.org>
CommitDate: 2024-07-30 22:24:29 +0000

    emulators/zsnes: Ignore on FreeBSD 14.0 and use older C++ Standard for compilation

      Since ZSNES is not in active development, with the last release being in 2007,
       the code is not designed to be compiled with more recent C++ standards. Thus,
       this patch makes it use an older standard to make it compile.

      - Updated Makefile (cleaned up through portclippy and portfmt), adding a
       CONFIGURE_ENV to set the C++ standard through CXXFLAGS.

      - Updated files/patch-configure as the above CXXFLAGS were being ignored due
       to one line using CFLAGS instead of CXXFLAGS.

      - Add IGNORE for FreeBSD 14.0, because of build failures on this
      plattform. Since it builds fine on 14.1 and 14.0 is EOL soon, we decided to
      IGNORE it for this version. The error is:

      checking for zlib - version >= 1.2.3... 1.3, bad version string given
            by zlib, sometimes due to very old zlibs that didnt correctly
            define their version. Please upgrade if you are running an
            old zlib... no
      configure: error: zlib >= 1.2.3 is required

    PR:             280195
    Approved by:    Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)

 emulators/zsnes/Makefile              | 50 ++++++++++++++++++++---------------
 emulators/zsnes/files/patch-configure | 24 ++++++++++++-----
 2 files changed, 47 insertions(+), 27 deletions(-)
Comment 12 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2024-07-30 22:51:38 UTC
Committed. Thank you Naram! :)