Skip to content

fix build of ncurses 5.9 with system compiler on RHEL9#23820

Merged
Micket merged 3 commits intoeasybuilders:developfrom
boegel:20250908175006_new_pr_ncurses59
Sep 10, 2025
Merged

fix build of ncurses 5.9 with system compiler on RHEL9#23820
Micket merged 3 commits intoeasybuilders:developfrom
boegel:20250908175006_new_pr_ncurses59

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Sep 8, 2025

(created using eb --new-pr)
This old ncurses version is still relevant, as dependency for Stata 17.x and 18.x which requires libncurses.so.5 ...

@github-actions github-actions Bot added the change label Sep 8, 2025
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 8, 2025

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node3590.doduo.os - Linux RHEL 9.4, x86_64, AMD EPYC 7552 48-Core Processor (zen2), Python 3.9.18
See https://gist.github.com/boegel/7c4a95768bdf4d617e70730f6d711665 for a full test report.

@boegel boegel added bug fix and removed change labels Sep 8, 2025
@boegel boegel added this to the next release (5.1.2) milestone Sep 8, 2025
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 8, 2025

@boegelbot please test @ jsc-zen3

@boegelbot
Copy link
Copy Markdown
Collaborator

@boegel: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=23820 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_23820 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 7885

Test results coming soon (I hope)...

Details

- notification for comment with ID 3266937931 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.6, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.21
See https://gist.github.com/boegelbot/e8bdc5e1b46fe2834ed3833f589c2c67 for a full test report.

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 8, 2025

Test report by @Thyre
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in total)
Linux - Linux Arch Linux UNKNOWN, x86_64, AMD Ryzen 7 7800X3D 8-Core Processor (zen4), 1 x AMD Navi 48 [Radeon RX 9070/9070 XT/9070 GRE] (device id: 0x7550, gfx: gfx1201, driver: 6.16.5-arch1-1), 1 x AMD Raphael (device id: 0x164e, gfx: gfx1036, driver: 6.16.5-arch1-1), Python 3.13.7
See https://gist.github.com/Thyre/410f21e269883790177f6ac1a00cb823 for a full test report.


Very likely caused by GCC 15 as the system compiler. If no other system shows issues, I would propose to ignore this for now...
We don't set any C standard, so it tries to apply C23.

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 8, 2025

Test report by @Thyre
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in total)
jrc0900.jureca - Linux Rocky Linux 9.6, AArch64, ARM UNKNOWN, 1 x NVIDIA NVIDIA GH200 480GB, 580.65.06, Python 3.9.21
See https://gist.github.com/Thyre/17bf5e06220d9dac81623381887f40c0 for a full test report.


checking build system type... ./config.guess: unable to guess system type
Shouldn't matter too much either, as all dependent packages are for x86 only.

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 8, 2025

Test report by @Thyre
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
ZAM054 - Linux Zorin OS 17, x86_64, 12th Gen Intel(R) Core(TM) i7-1260P, 1 x NVIDIA NVIDIA GeForce MX550, 580.65.06, Python 3.10.12
See https://gist.github.com/Thyre/07a6c40f4283e3f3ef342c81dab91baa for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 8, 2025

Test report by @Thyre FAILED Build succeeded for 0 out of 1 (1 easyconfigs in total) Linux - Linux Arch Linux UNKNOWN, x86_64, AMD Ryzen 7 7800X3D 8-Core Processor (zen4), 1 x AMD Navi 48 [Radeon RX 9070/9070 XT/9070 GRE] (device id: 0x7550, gfx: gfx1201, driver: 6.16.5-arch1-1), 1 x AMD Raphael (device id: 0x164e, gfx: gfx1036, driver: 6.16.5-arch1-1), Python 3.13.7 See https://gist.github.com/Thyre/410f21e269883790177f6ac1a00cb823 for a full test report.

Very likely caused by GCC 15 as the system compiler. If no other system shows issues, I would propose to ignore this for now... We don't set any C standard, so it tries to apply C23.

That's easy to fix though by adding -std=c89 to CFLAGS in buildopts?

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 8, 2025

That's easy to fix though by adding -std=c89 to CFLAGS in buildopts?

Do we know if ncurses is using asm in any places?
If we add this, we should test with a few more systems to make sure that we don't create issues like #22998

Doesn't look like it's using asm:

$ grep -rni "asm"                           
include/curses.h.in:325:#define _HASMOVED       0x20    /* has cursor moved since last refresh? */
misc/terminfo.src:21290:#         tec400, tec500, ubell, wind, wind16, wind40, wind50, plasma, agile,
ncurses/base/lib_pad.c:305:    win->_flags &= ~_HASMOVED;
ncurses/base/lib_getch.c:347:   if ((is_wintouched(win) || (win->_flags & _HASMOVED))
ncurses/base/lib_refresh.c:135:    win->_flags &= ~_HASMOVED;
ncurses/base/lib_move.c:56:     win->_flags |= _HASMOVED;
ncurses/base/lib_getstr.c:108:    if (is_wintouched(win) || (win->_flags & _HASMOVED))
ncurses/widechar/lib_get_wstr.c:119:    if (is_wintouched(win) || (win->_flags & _HASMOVED))

@github-actions github-actions Bot added the change label Sep 9, 2025
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 9, 2025

@Thyre I've added -std=c99 to CFLAGS in 73e6f30, test reports coming from a RHEL9 system and a CentOS 7 container.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 9, 2025

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node3590.doduo.os - Linux CentOS Linux 7.9.2009, x86_64, AMD EPYC 7552 48-Core Processor, Python 3.6.8
See https://gist.github.com/boegel/abae79950150ec075caabda29f5a76c6 for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 9, 2025

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node4006.donphan.os - Linux RHEL 9.4, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz (cascadelake), 1 x NVIDIA NVIDIA A2, 570.133.20, Python 3.9.18
See https://gist.github.com/boegel/65ca7b08eb77a1d88cbe2305d68f8daa for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 9, 2025

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node3590.doduo.os - Linux Rocky Linux 8.10, x86_64, AMD EPYC 7552 48-Core Processor, Python 3.6.8
See https://gist.github.com/boegel/a30ed99d4d1931178e67e9fe7b08fe6d for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 9, 2025

@Thyre Can you upload a new test report from the Arch system?

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 9, 2025

I don't have access to that system at the moment, as I'm at work.
I'll try to get a (failed) test report uploaded for a Fedora 42 container. There's still quite a lot that fails even with C99. Looks like some sources need C99, others need C89 (at least to please GCC 15). There are also some C++ errors..

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 9, 2025

Test report by @Thyre
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in total)
3368d2291aa8 - Linux Fedora Linux 42 (Container Image), x86_64, 12th Gen Intel(R) Core(TM) i7-1260P, Python 3.13.7
See https://gist.github.com/Thyre/3ae5fa23d1f43c927da4709261d2d98e for a full test report.

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 9, 2025

We need to change local_common_configopts a bit:

local_common_configopts = '--with-shared --enable-overwrite --without-ada --enable-symlinks CFLAGS="-std=c99" CXXFLAGS="-std=c++11"'
configopts = [
    # build ncurses: serial build in default paths with shared libraries
    local_common_configopts,
    # build ncursesw: serial with UTF-8
    local_common_configopts + "--enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/",
]

If we add the CFLAGS and CXXFLAGS for the standards here as well, the build succeeds.

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 9, 2025

Test report by @Thyre
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in total)
Linux - Linux Arch Linux UNKNOWN, x86_64, AMD Ryzen 7 7800X3D 8-Core Processor (zen4), 1 x AMD Navi 48 [Radeon RX 9070/9070 XT/9070 GRE] (device id: 0x7550, gfx: gfx1201, driver: 6.16.5-arch1-1), 1 x AMD Raphael (device id: 0x164e, gfx: gfx1036, driver: 6.16.5-arch1-1), Python 3.13.7
See https://gist.github.com/Thyre/f11849dd5aa47613707eb520401d0865 for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 10, 2025

We need to change local_common_configopts a bit:

local_common_configopts = '--with-shared --enable-overwrite --without-ada --enable-symlinks CFLAGS="-std=c99" CXXFLAGS="-std=c++11"'
configopts = [
    # build ncurses: serial build in default paths with shared libraries
    local_common_configopts,
    # build ncursesw: serial with UTF-8
    local_common_configopts + "--enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/",
]

If we add the CFLAGS and CXXFLAGS for the standards here as well, the build succeeds.

@Thyre fixed in c047f11

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 10, 2025

Test report by @Thyre
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
be194d18d855 - Linux Fedora Linux 42 (Container Image), x86_64, 12th Gen Intel(R) Core(TM) i7-1260P, Python 3.13.7
See https://gist.github.com/Thyre/bc46f9a5dd430e38c9f49046084a2a9b for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 10, 2025

@boegelbot please test @ jsc-zen3

@boegelbot
Copy link
Copy Markdown
Collaborator

@boegel: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=23820 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_23820 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 7921

Test results coming soon (I hope)...

Details

- notification for comment with ID 3275021552 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.6, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.21
See https://gist.github.com/boegelbot/a6c3433b375ce1ef9ff196248d1ae38a for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 10, 2025

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node4006.donphan.os - Linux CentOS Linux 7.9.2009, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz, Python 3.6.8
See https://gist.github.com/boegel/53a267ac61c51e958ae270cd0b1350c7 for a full test report.

@boegel boegel removed the change label Sep 10, 2025
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 10, 2025

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node4006.donphan.os - Linux Rocky Linux 8.10, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz, Python 3.6.8
See https://gist.github.com/boegel/9f67fcde35a68c23f0135d16da16b608 for a full test report.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 10, 2025

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node4006.donphan.os - Linux RHEL 9.4, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz (cascadelake), 1 x NVIDIA NVIDIA A2, 570.133.20, Python 3.9.18
See https://gist.github.com/boegel/882b3bf2abd84b36d34efcb95e49e22d for a full test report.

@Thyre
Copy link
Copy Markdown
Collaborator

Thyre commented Sep 10, 2025

Test report by @Thyre
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
ZAM054 - Linux Zorin OS 17, x86_64, 12th Gen Intel(R) Core(TM) i7-1260P, 1 x NVIDIA NVIDIA GeForce MX550, 580.65.06, Python 3.10.12
See https://gist.github.com/Thyre/2306cea31cd485d1c15095e4047a0598 for a full test report.

Copy link
Copy Markdown
Collaborator

@Thyre Thyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Micket Micket merged commit 3b2d252 into easybuilders:develop Sep 10, 2025
8 checks passed
@boegel boegel deleted the 20250908175006_new_pr_ncurses59 branch September 10, 2025 16:52
@boegel boegel changed the title fix build of ncurses/5.9 on RHEL9 fix build of ncurses 5.9 with system compiler on RHEL9 Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants