TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Install issue

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
elminster



Joined: 13 Jul 2009
Posts: 46

PostPosted: Mon Jan 21, 2013 3:31 pm    Post subject: Install issue Reply with quote

When getting to the part of the install where I enter 'make' I get the following error:

make
gcc -Wall -D_GNU_SOURCE -DHAVE_CONFIG_H -c action.c
In file included from action.c:28:
tintin.h:37:18: error: pcre.h: No such file or directory
In file included from action.c:28:
tintin.h:573: error: expected specifier-qualifier-list before 'pcre'
tintin.h:1265: error: expected ')' before '*' token
tintin.h:1268: error: expected declaration specifiers or '...' before 'pcre'
tintin.h:1269: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
make: *** [action.o] Error 1


Any idea what could be the cause?

Thanks,

Nathan
Back to top
View user's profile Send private message AIM Address
elminster



Joined: 13 Jul 2009
Posts: 46

PostPosted: Mon Jan 21, 2013 3:34 pm    Post subject: Reply with quote

Also wanted to add the output from ./configure in case it may help:

./configure
Configuring TinTin++
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
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 arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking net/errno.h usability... no
checking net/errno.h presence... no
checking for net/errno.h... no
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking param.h usability... no
checking param.h presence... no
checking for param.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking socks.h usability... no
checking socks.h presence... no
checking for socks.h... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/ptem.h usability... no
checking sys/ptem.h presence... no
checking for sys/ptem.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
checking for an ANSI C-conforming const... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for strftime... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking whether utime accepts a null argument... yes
checking for vprintf... yes
checking for _doprnt... no
checking for gethostbyname... yes
checking for gethostname... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for memset... yes
checking for select... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... (cached) yes
checking for strncasecmp... yes
checking for strstr... yes
checking for utime... yes
checking for getaddrinfo... yes
checking for forkpty... no
checking for popen... yes
checking for inflate in -lz... yes
checking for pthread_create in -lpthread... yes
checking for gethostbyname in -lnsl... yes
checking for rresvport in -lsocket... no
checking for forkpty in -lutil... yes
checking for pcre_compile in -lpcre... no
checking for gmake... no
checking for make... make
checking for /dev/ptmx... yes
checking for library containing getmntent... none required
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h

Configure has finished. To compile, type: make
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Jan 21, 2013 4:51 pm    Post subject: Reply with quote

Looks like you need to install the pcre lib.
Back to top
View user's profile Send private message Send e-mail
elminster



Joined: 13 Jul 2009
Posts: 46

PostPosted: Mon Jan 21, 2013 5:23 pm    Post subject: Reply with quote

Pcre was it! I had thought this was installed, though it seems it was not. Thanks for the speedy reply.
Back to top
View user's profile Send private message AIM Address
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Mon Jan 21, 2013 5:46 pm    Post subject: Reply with quote

Given that missing either PCRE or zlib does seem to be the main dependency issues when installing and that the configure scripts do test for these things: do we need to add some sort of error message to the configure scripts to explicitly tell that these libraries are missing/not properly installed and that this needs to be corrected before proceeding to the "make" stage?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Jan 21, 2013 10:39 pm    Post subject: Reply with quote

Possibly so.
Back to top
View user's profile Send private message Send e-mail
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Sun Jan 27, 2013 5:17 pm    Post subject: Reply with quote

Well I started to cast my eyes over the Makefile.in and configure.in to see whether I could autoconfiscate them - or at least make sure that these two libraries were adequately checked for - and it really got me poking into some dark and dingy corners: some checks seem to be for things that are no longer in the code; others are obsolete and either have been replaced or included in other checks and somethings are not being checked, and I suspect that for the PCRE and zlib things we are checking for the libraries themselves but not for the development parts that include the header files i.e. pcre.h and zlib.h that we need to include!

One thing that I noted as I passed them by:
In net.c there are two connect_mud() versions, the better(?) one {enabled by the autoconf macro AC_CHECK_FUNCS(... getaddrinfo ...) defining HAVE_GETADDRINFO} is capable of handling IPv6 as well as IPv4 connections and uses getaddrinfo() to do so. The alternative IPv4 version only uses inet_addr(), gethostbyname() and htons() and of these, my man pages have these negative points:
  • inet_addr(const char *cp): This function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of the function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favour of inet_aton(), inet_pton(3), or getaddrinfo(3) which provide a cleaner way to indicate error return.
  • gethostbyname(): This function is obsolete, Applications should use getaddrinfo(3) instead.
  • htons(): Some systems require the inclusion of <netinst/in.h> instead of <arpa/inet.h> I note that net.c includes both unconditionally.
Now, as a comment notes in the file against the first (more modern implementation) "IPv6 compatible connect code, doesn't work on several platforms." Strangely the corresponding connection opening code in chat.c ONLY uses stuff similar to the older IPv4 part in net.c, it does not seem to have an IPv6 compatible alternative.

Bottom line - is there anyone still requiring the code using gethostbyname() or can we simplify net.c and modernise chat.c.

PS #CHAT {UNINIT} is not documented in help.c
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Sun Jan 27, 2013 7:55 pm    Post subject: Reply with quote

OK, this patch to configure.in in the src directory now checks for the header ("development") files (pcre.h and zlib.h) that people sometimes forget about and stops with an error if either of them or the libraries that they accompany are missing. After making these changes (and a couple of other tweaks brought about by changes in autoconf between version 2.63 which was the version around when the configure script was last remade and the 2.67 which is the current one) you will need to run "autoconf" in the src directory to regenerate the ./configure script that is run before you use "make" to compile the TinTin++ source code for your system.
Code:
--- ./configure.in.orig   2009-07-12 07:13:14.000000000 +0100
+++ ./configure.in   2013-01-28 00:29:46.000000000 +0000
@@ -21,7 +21,8 @@
 
 AM_INIT_AUTOMAKE
 
-AC_INIT(tintin.h)
+AC_INIT
+AC_CONFIG_SRCDIR([tintin.h])
 AC_CONFIG_HEADER(config.h)
 
 AC_MSG_RESULT([Configuring TinTin++])
@@ -65,7 +66,11 @@
 # Checks for header files.
 
 AC_HEADER_STDC
-AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h net/errno.h netdb.h netinet/in.h param.h pthread.h socks.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/ptem.h sys/socket.h sys/termio.h sys/time.h time.h unistd.h zlib.h util.h pty.h])
+AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h net/errno.h netdb.h netinet/in.h param.h pthread.h socks.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/ptem.h sys/socket.h sys/termio.h sys/time.h time.h unistd.h util.h pty.h])
+AC_CHECK_HEADERS([zlib.h],,
+   [AC_MSG_ERROR([zlib header file not found, is the development part present])])
+AC_CHECK_HEADERS([pcre.h],,
+   [AC_MSG_ERROR([pcre header file not found, is the development part present])])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -89,12 +94,14 @@
 
 # Checks libraries
 
-AC_CHECK_LIB(z, inflate)
+AC_CHECK_LIB(z, inflate,,
+   [AC_MSG_ERROR([zlib runtime library not working, is it AND the corresponding development (header) file installed])])
 AC_CHECK_LIB(pthread, pthread_create)
 AC_CHECK_LIB(nsl, gethostbyname)
 AC_CHECK_LIB(socket, rresvport)
 AC_CHECK_LIB(util, forkpty)
-AC_CHECK_LIB(pcre, pcre_compile)
+AC_CHECK_LIB(pcre, pcre_compile,,
+   [AC_MSG_ERROR([pcre runtime library not working, is it AND the corresponding development (header) file installed])])
 AC_CHECK_PROGS(MAKE, gmake make)
 
 AC_CHECK_FILES([/dev/ptmx])
@@ -102,7 +109,8 @@
 AC_FUNC_GETMNTENT
 AC_HEADER_DIRENT
 
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 
 echo
 echo "Configure has finished.  To compile, type: make"
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Jan 28, 2013 7:49 am    Post subject: Reply with quote

Thanks, it's added to my todo list. Smile
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group