Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nifs/common/prim_tty_nif.c:46:10: fatal error: termcap.h: No such file or directory #8025

Closed
psumbera opened this issue Jan 16, 2024 · 4 comments · Fixed by #8074
Closed
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@psumbera
Copy link

Build on Solaris fails with:

/usr/gcc/13/bin/gcc -Werror=undef -Werror=implicit -Werror=return-type  -fno-strict-aliasing -fno-common -m64 -fPIC -DPIC -O3 -ffile-prefix-map=/builds/psumbera/userland-erlang/components/erlang=. -DOPENSSL_NO_MD4 -DOPENSSL_NO_RC2 -DOPENSSL_NO_RC4 -I/builds/psumbera/userland-erlang/components/erlang/build/amd64/erts/x86_64-pc-solaris2.11  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -m64  -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_PTHREAD_SEMANTICS   -DBEAMASM=1 -DLIBSCTP=libsctp.so.1 -Ix86_64-pc-solaris2.11/opt/jit -Ibeam -Isys/unix -Isys/common -Ix86_64-pc-solaris2.11 -Ipcre -Iryu -Iopenssl/include -I../include -I../include/x86_64-pc-solaris2.11 -I../include/internal -I../include/internal/x86_64-pc-solaris2.11 -Ibeam/jit -Ibeam/jit/x86 -Idrivers/common -Idrivers/unix -c drivers/common/ram_file_drv.c -o obj/x86_64-pc-solaris2.11/opt/jit/ram_file_drv.o
/usr/gcc/13/bin/gcc -Werror=undef -Werror=implicit -Werror=return-type  -fno-strict-aliasing -fno-common -m64 -fPIC -DPIC -O3 -ffile-prefix-map=/builds/psumbera/userland-erlang/components/erlang=. -DOPENSSL_NO_MD4 -DOPENSSL_NO_RC2 -DOPENSSL_NO_RC4 -I/builds/psumbera/userland-erlang/components/erlang/build/amd64/erts/x86_64-pc-solaris2.11  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -m64  -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_PTHREAD_SEMANTICS   -DBEAMASM=1 -DLIBSCTP=libsctp.so.1 -Ix86_64-pc-solaris2.11/opt/jit -Ibeam -Isys/unix -Isys/common -Ix86_64-pc-solaris2.11 -Ipcre -Iryu -Iopenssl/include -I../include -I../include/x86_64-pc-solaris2.11 -I../include/internal -I../include/internal/x86_64-pc-solaris2.11 -Ibeam/jit -Ibeam/jit/x86 -Inifs/common -Inifs/unix -c nifs/common/prim_tty_nif.c -o obj/x86_64-pc-solaris2.11/opt/jit/prim_tty_nif.o
nifs/common/prim_tty_nif.c:46:10: fatal error: termcap.h: No such file or directory
   46 | #include <termcap.h>
      |          ^~~~~~~~~~~

This seems to regression from:

#7533

As workaround I can use:

--- otp_src_26.2.1/erts/emulator/nifs/common/prim_tty_nif.c
+++ otp_src_26.2.1/erts/emulator/nifs/common/prim_tty_nif.c
@@ -43,7 +43,8 @@ #include <signal.h>
 #include <locale.h>
 #ifdef HAVE_TERMCAP
 #include <termios.h>
-#include <termcap.h>
+#include <curses.h>
+#include <term.h>
 #endif
 #ifndef __WIN32__
 #include <unistd.h>
@psumbera psumbera added the bug Issue is reported as a bug label Jan 16, 2024
@garazdawi garazdawi self-assigned this Jan 16, 2024
@garazdawi
Copy link
Contributor

What solaris version are you using?

@psumbera
Copy link
Author

What solaris version are you using?

It's latest Solaris 11.4.

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jan 22, 2024
garazdawi added a commit to garazdawi/otp that referenced this issue Jan 31, 2024
@garazdawi garazdawi linked a pull request Jan 31, 2024 that will close this issue
@garazdawi
Copy link
Contributor

Fix available in #8074, please check that it works for you.

@psumbera
Copy link
Author

Fix available in #8074, please check that it works for you.

Yes, it builds fine. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants