Skip to content

Fix segfault caused by linking both libncurses and libncursesw - #210

Open
carecodeconnect wants to merge 1 commit into
abishekvashok:masterfrom
carecodeconnect:master
Open

Fix segfault caused by linking both libncurses and libncursesw#210
carecodeconnect wants to merge 1 commit into
abishekvashok:masterfrom
carecodeconnect:master

Conversation

@carecodeconnect

Copy link
Copy Markdown

Summary

  • Removes the redundant AC_CHECK_LIB(ncurses, main) call that unconditionally added -lncurses to LIBS
  • With the ncursesw-preferring check already appending -lncursesw, the linker ended up with both libraries linked simultaneously (LIBS = -lncurses -lncursesw)
  • Since both libraries export identical symbols, this caused runtime symbol conflicts and a segfault on startup

Test plan

  • Run autoreconf -fi && ./configure && make
  • Verify LIBS in the generated Makefile contains only one ncurses library (e.g. -lncursesw)
  • Run ./cmatrix and confirm it no longer segfaults

🤖 Generated with Claude Code

Removed the redundant AC_CHECK_LIB(ncurses, main) call that
unconditionally added -lncurses to LIBS. With the ncursesw-preferring
check already appending -lncursesw, the linker ended up with both
libraries linked simultaneously. Since they export identical symbols,
this caused runtime symbol conflicts and a segfault.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant