ierton/empty

undefined reference to `openpty'

Opened this issue · 2 comments

When I issued

make all install clean

I experienced the same problem described at

https://ubuntuforums.org/showthread.php?t=2131632

He was running Ubuntu 11.10 and I run Linux Mint 17 Qiana, based on Ubuntu 14.04 LTS. The solution for both of us was to change a line in makefile from

${CC} ${CFLAGS} -Wall ${LIBS} -o empty empty.c

to
${CC} ${CFLAGS} -Wall -o empty empty.c ${LIBS}

Should you do this in your distribution?

My session follows:

make all install clean
gcc -Wall -lutil -o empty empty.c
/tmp/ccfBSjYQ.o: In function main': empty.c:(.text+0x10e8): undefined reference to openpty'
empty.c:(.text+0x117e): undefined reference to `login_tty'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

I am also affected, running Linux Mint 20.2.

Oh, I nearly forgot about this project. Will look soon, thanks.. At first glance, we need to find some new library to link with..