screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] not really a screen bug .. but maybe it is : error: undef


From: Dennis Clarke
Subject: [screen-devel] not really a screen bug .. but maybe it is : error: undefined symbol: PATH_MAX
Date: Mon, 9 Jul 2018 14:03:19 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0



So I love screen and who doesn't? Really?  Anyone that doesn't think
"screen" is the UNIX/Linux swiss army knife has rocks in their head.

I sure can not live without it.

However I have been dragging around a binary[1] for years and years and
finally figured that I should maybe cook up a new rev.  Lovely that the
sources are easy to get and so I felt I should try to do all this with
a hard core C99 compiler on Solaris 10 Sparc.  So that would be the
Oracle Studio 12.6 developer tools kit and the c99 therein is ruthless
about compliance. Seemed like a good idea to give that a whirl :

PATH=$PATH:/usr/local/bin /usr/local/bin/aclocal

PATH=$PATH:/usr/local/bin /usr/local/bin/autoreconf -i

That gives me a configure script which seems to run fine :

$ ./configure --prefix=/export/home/dclarke/local \
> --disable-socket-dir --enable-colors256 --with-socket-dir=/var/tmp \
> --with-sys-screenrc=/export/home/dclarke/local/etc
this is screen version 4.6.2
checking for gcc... /opt/developerstudio12.6/bin/c99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /opt/developerstudio12.6/bin/c99 accepts -g... yes
checking for /opt/developerstudio12.6/bin/c99 option to accept ISO C89... none needed checking how to run the C preprocessor... /opt/developerstudio12.6/bin/c99 -E
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for library containing strerror... none required
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gawk... /usr/local/bin/gawk
checking for a BSD-compatible install... ./install.sh -c
configure: checking for buggy tools...
checking if a system-wide socket dir should be used... no. ~/.screen will be used instead.
configure: checking for MIPS...
configure: checking for Ultrix...
configure: checking for butterfly...
configure: checking for POSIX.1...
- you have a POSIX system
configure: checking for System V...
configure: checking for sequent/ptx...
configure: checking SVR4...
checking dwarf.h usability... no
checking dwarf.h presence... no
checking for dwarf.h... no
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
configure: checking for Solaris 2.x...
configure: checking BSD job jontrol...
- you have jobcontrol
configure: checking setresuid...
configure: checking setreuid...
configure: checking seteuid...
configure: checking execvpe...
configure: checking select...
configure: checking fifos...
- your fifos are usable
configure: checking for broken fifo implementation...
- your implementation is ok
configure: checking sockets...
- your sockets are not usable
- select can't count
configure: checking for tgetent...
configure: checking libcurses...
- you use the terminfo database
configure: checking ospeed...
configure: checking for /dev/ptc...
configure: checking for SVR4 ptys...
checking for getpt... no
configure: checking for ptyranges...
configure: checking default tty permissions/group...
checking for write... /usr/bin/write
checking for xterm... /usr/openwin/bin/xterm
- pty mode: 0620, group: 7
configure: checking getutent...
configure: checking ut_host...
checking utempter.h usability... no
checking utempter.h presence... no
checking for utempter.h... no
configure: checking for libutil(s)...
configure: checking getloadavg...
assuming posix signal definition
configure: checking for crypt and sec libraries...
configure: checking crypt...
configure: checking IRIX sun library...
configure: checking syslog...
configure: checking wait union...
configure: checking for termio or termios...
configure: checking getspnam...
configure: checking getttyent...
configure: checking fdwalk...
configure: checking whether memcpy/memmove/bcopy handles overlapping arguments...
checking for long file names... yes
checking for vsprintf... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for setenv... checking for nl_langinfo(CODESET)... yes
checking for library containing gethostname... none required
checking for rename... yes
checking for fchmod... yes
checking for fchown... yes
checking for strerror... yes
checking for lstat... yes
checking for _exit... yes
checking for utimes... yes
checking for vsnprintf... yes
checking for getcwd... yes
checking for setlocale... yes
checking for strftime... yes
checking for the global screenrc file... configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing default commands

Now please check the pathnames in the Makefile and in the user
configuration section in config.h.
Then type 'make' to make screen. Good luck.

$


OKay ... good luck indeed :


$ /usr/local/bin/gmake 2>&1 | tee ../screen-4.6.2_SunOS5.10_sparc64vii+.001.compile.log CPP="/opt/developerstudio12.6/bin/c99 -E -I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -DETCSCREENRC='"/export/home/dclarke/local/etc"' -DSCREENENCODINGS='"/export/home/dclarke/local/share/screen/utf8encodings"'" srcdir=. sh ./osdef.sh AWK=/usr/local/bin/gawk CC="/opt/developerstudio12.6/bin/c99 -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xarch=sparc" srcdir=. sh ./comm.sh
AWK=/usr/local/bin/gawk srcdir=. sh ./term.sh
/opt/developerstudio12.6/bin/c99 -c -I. -I. -I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -DETCSCREENRC='"/export/home/dclarke/local/etc"' -DSCREENENCODINGS='"/export/home/dclarke/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \ -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xarch=sparc screen.c
"layer.h", line 79: warning: nonportable bit-field type
"screen.c", line 688: error: undefined symbol: PATH_MAX
"screen.c", line 1746: warning: implicit function declaration: kill
c99: acomp failed for screen.c
gmake: *** [Makefile:82: screen.o] Error 2
$

That was fast.

Well PATH_MAX should be in limits.h and sure enough it is :

#ifndef PATH_MAX
#define PATH_MAX        1024    /* max # of characters in a path name */
#endif

Hrmmm ... welll this is a Solaris box and Linux boxen may have that as
4096 bytes and who knows what else may be out there.  At the very least
a trap for ENAMETOOLONG may be needed but for now ... quick hack, I will
drop PATH_MAX directly into screen.c as 1024 bytes.  However maybe the
minimum _POSIX_PATH_MAX should be used?  No idea on that.  I could
stuff in the POSIX.1-1990 defaults which is _POSIX_PATH_MAX=255.

Anyways moving on.

Somehow "kill()" isn't defined.

Baffling because screen.c has #include <sys/types.h> but the signal.h
seems to be wrapped inside #ifndef SIGINT and that's weird. I think
the c99 compiler defines _STRICT_STDC and somehow I don't get what
is needed here.  At all.

Anyways .. thought I'd let you know before I give up on c99 and just
go with cc and some easy CFLAGS.

Dennis


[1] $ $HOME/bin/screen -v
Screen version 4.00.03 (FAU) 23-Oct-06



reply via email to

[Prev in Thread] Current Thread [Next in Thread]