tmux error during make: compat.h:326: error: conflicting types for ‘forkpty’

146 views
Skip to first unread message

Neil Eldridge

unread,
Sep 11, 2020, 5:38:35 AM9/11/20
to tmux-...@googlegroups.com
I'm hoping you can assist me in a make error on tmux.

I'm trying to compile tmux (on a SLES11.2 server in my homedir, without root access) but getting an error during the make command, and I'm hoping someone an point me in the right direction please!

Steps performed so far:

Downloaded:
* tmux-3.1b.tar.gz
* libevent-2.1.12-stable.tar.gz (prereq)
* ncurses-6.2-20200907 (prereq)
* pkgconfig


All of this seems to work so far:

#LIBEVENT
cd /home/neldrid/lib/libevent-2.1.12-stable
export PKG_CONFIG_PATH=/home/neldrid/lib/pkgconfig
./configure --prefix=/home/neldrid/lib/libevent --enable-shared
make
make install

# NCURSES
export PKG_CONFIG_PATH=/home/neldrid/lib/pkgconfig
./configure --prefix=/home/neldrid/lib/ncurses --with-shared --with-termlib --enable-pc-files --with-pkg-config-libdir=/home/neldrid/lib/pkgconfig

# TMUX
cd /home/neldrid/bin/tmux-3.1b
export PKG_CONFIG_PATH="/home/neldrid/lib/pkgconfig:/home/neldrid/lib/libevent/lib/pkgconfig"
export LIBNCURSES_CFLAGS=/home/neldrid/lib/ncurses/include/ncurses
export LIBNCURSES_LIBS=/home/neldrid/lib/ncurses/lib
export LIBEVENT_CFLAGS=/home/neldrid/lib/libevent/include
export LIBEVENT_LIBS=/home/neldrid/lib/libevent/lib
export LIBTINFO_CFLAGS=/home/neldrid/lib/libtinfo
export LIBTINFO_LIBS=/home/neldrid/lib/libtinfo
export LD_LIBRARY_PATH=/home/neldrid/lib/libevent/lib:/home/neldrid/lib/ncurses/lib:/home/neldrid/lib/libtinfo:/usr/lib:/usr/lib64

./configure --prefix=/home/neldrid/bin/tmux CPPFLAGS="-I/home/neldrid/lib/ncurses/include/ncurses -I/home/neldrid/lib/libevent/include -I/home/neldrid/lib/libtinfo"


So all of the above seems to work fine, but when I try to make, I get this:

> make
depbase=`echo alerts.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        gcc -std=gnu99 -DPACKAGE_NAME=\"tmux\" -DPACKAGE_TARNAME=\"tmux\" -DPACKAGE_VERSION=\"3.1b\" -DPACKAGE_STRING=\"tmux\ 3.1b\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"tmux\" -DVERSION=\"3.1b\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DIRENT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_PATHS_H=1 -DHAVE_PTY_H=1 -DHAVE_STDINT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_DIRFD=1 -DHAVE_FLOCK=1 -DHAVE_PRCTL=1 -DHAVE_SYSCONF=1 -DHAVE_ASPRINTF=1 -DHAVE_CFMAKERAW=1 -DHAVE_MEMMEM=1 -DHAVE_SETENV=1 -DHAVE_STRCASESTR=1 -DHAVE_STRNDUP=1 -DHAVE_STRSEP=1 -DHAVE_NCURSES_H=1 -DHAVE_PR_SET_NAME=1 -DHAVE_PROC_PID=1 -I.  -DTMUX_VERSION="\"3.1b\"" -DTMUX_CONF="\"/etc/tmux.conf:~/.tmux.conf:~/.config/tmux/tmux.conf\""  -iquote.     -I/home/neldrid/lib/ncurses/include/ncurses -I/home/neldrid/lib/libevent/include -I/home/neldrid/lib/libtinfo /home/neldrid/lib/ncurses/include/ncurses /home/neldrid/lib/libtinfo /home/neldrid/lib/libevent/include  -std=gnu99 -O2    -MT alerts.o -MD -MP -MF $depbase.Tpo -c -o alerts.o alerts.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from tmux.h:36,
                 from alerts.c:24:
compat.h:326: error: conflicting types for ‘forkpty’
/usr/include/pty.h:40: error: previous declaration of ‘forkpty’ was here
make: *** [alerts.o] Error 1

I'm not sure what I need to provide but I'm happy to, and hope someone can point me in the right direction on where I'm going wrong!!

Thanks in advance!

Scott Rochford

unread,
Sep 11, 2020, 11:05:45 AM9/11/20
to Neil Eldridge, tmux-users
I did a minimal installation of SLES 11.4 plus the development tools.

The supplied ncurses should be sufficient for tmux, do you really need to compile that?  pkgconfig likewise?

I had to compile libevent2 without openssl support (don't think it's needed for tmux anyway) as I didn't have the media or repo access to install the openssl development packages.

# libevent2
./configure --prefix=/home/anni --disable-openssl
make install

# tmux 3.1b
CFLAGS="-I /home/anni/include" LDFLAGS="-L/home/anni/lib" ./configure --prefix=/home/anni
make install

anni@sles11:~> LD_LIBRARY_PATH=/home/anni/lib tmux -V
tmux 3.1b


Regards,

Scott

Nicholas Marriott

unread,
Sep 11, 2020, 11:08:22 AM9/11/20
to Neil Eldridge, tmux-users
forkpty error almost always means the configure tests are not linking. Look at config.log and see what errors the compiler is giving for the forkpty test.

--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAJnx%3DA17oD3nozV7kRLN21VzeSTTP3%2BO7gHPVhS-XaTi31RAXQ%40mail.gmail.com.

Neil E

unread,
Sep 15, 2020, 11:49:08 AM9/15/20
to tmux-users
Thanks very much for your responses and sorry for the delay. I will try that and let you know!
Reply all
Reply to author
Forward
0 new messages