This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Compiling error

Old posts that have not been replied to for several years.
p
puffi
Voice
Posts: 25
Joined: Tue Jun 01, 2004 10:09 am

Compiling error

Post by puffi »

Hi there,

i searched the forums but couldnt find anything related, so i'm asking myself..

I wanted to compile eggdrop 1.6.16 on a woody today, and got the error when calling make:

make[1]: Entering directory `/home/egg1616/eggdrop1.6.16/src'
This may take a while. Go get some runts.

gcc-3.0 -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c botmsg.c
botmsg.c: In function `tandout_but':
botmsg.c:50: `va_list' undeclared (first use in this function)
botmsg.c:50: (Each undeclared identifier is reported only once
botmsg.c:50: for each function it appears in.)
botmsg.c:50: parse error before "va"
botmsg.c:52: warning: implicit declaration of function `va_start'
botmsg.c:52: `va' undeclared (first use in this function)
botmsg.c:53: warning: implicit declaration of function `va_arg'
botmsg.c:53: parse error before "char"
botmsg.c:56: warning: implicit declaration of function `va_end'
botmsg.c:48: warning: `format' might be used uninitialized in this function
botmsg.c: In function `simple_sprintf':
botmsg.c:144: `va_list' undeclared (first use in this function)
botmsg.c:144: parse error before "va"
botmsg.c:146: `va' undeclared (first use in this function)
botmsg.c:147: parse error before "char"
botmsg.c:154: parse error before "char"
botmsg.c:159: parse error before "int"
botmsg.c:164: parse error before "int"
botmsg.c:169: parse error before "unsigned"
botmsg.c:177: parse error before "int"
botmsg.c:142: warning: `format' might be used uninitialized in this function
botmsg.c:142: warning: `s' might be used uninitialized in this function
botmsg.c:143: warning: `i' might be used uninitialized in this function
botmsg.c: In function `botnet_send_priv':
botmsg.c:297: `va_list' undeclared (first use in this function)
botmsg.c:297: parse error before "va"
botmsg.c:299: `va' undeclared (first use in this function)
botmsg.c:300: parse error before "char"
botmsg.c:301: parse error before "char"
botmsg.c:302: parse error before "char"
botmsg.c:303: parse error before "char"
botmsg.c:295: warning: `from' might be used uninitialized in this function
botmsg.c:295: warning: `to' might be used uninitialized in this function
botmsg.c:295: warning: `tobot' might be used uninitialized in this function
botmsg.c:295: warning: `format' might be used uninitialized in this function
make[1]: *** [botmsg.o] Error 1
make[1]: Leaving directory `/home/egg1616/eggdrop1.6.16/src'
make: *** [modegg] Error 2

I'm not very familiar with programming, just the basics of c++, and have no idea why that error occurs.

I hope you can help me out with it..
--
bye, puffi
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Any error appear in any of the following steps before you got to the 'make'?
tar zxvf eggdrop1.6.16.tar.gz
cd eggdrop1.6.16
./configure
make config
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
p
puffi
Voice
Posts: 25
Joined: Tue Jun 01, 2004 10:09 am

Post by puffi »

No nothing. When i try to compile it static with ``make static'' then a more or less equal error comes up, not the same message, but it doesnt compile anyway :)
It is very weird, cause on other machines, running Debian Woodie with kernel 2.4.26 it compiled right away..its only on this one machine (to wich i have no root-access)
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

Try only make without make static....
p
puffi
Voice
Posts: 25
Joined: Tue Jun 01, 2004 10:09 am

Post by puffi »

That's what i did and that's what results the lines i posted above
I just said that ``make static'' too brings up an error
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

What OS is the box running that it failed on? I saw one other person experiance this error....

Try this patch:

Code: Select all

patch -p0 < filename.patch
./configure
make config
make

Code: Select all

Index: aclocal.m4
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.6/aclocal.m4,v
retrieving revision 1.87
diff -u -r1.87 aclocal.m4
--- aclocal.m4	10 Apr 2004 04:53:41 -0000	1.87
+++ aclocal.m4	3 Jun 2004 08:53:29 -0000
@@ -94,7 +94,7 @@
 c
 EOF
 
-  for ac_prog in 'head -1' 'head -n 1' 'sed 1q'; do
+  for ac_prog in 'head -n 1' 'head -1' 'sed 1q'; do
     AC_MSG_CHECKING([whether $ac_prog works])
     AC_CACHE_VAL([ac_cv_prog_HEAD_1],
     [
Index: configure
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.6/configure,v
retrieving revision 1.117
diff -u -r1.117 configure
--- configure	2 Jun 2004 06:58:58 -0000	1.117
+++ configure	3 Jun 2004 08:53:30 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.5 .
+# From configure.ac Revision: 1.6 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for Eggdrop 1.6.17.
 #
@@ -3403,7 +3403,7 @@
 c
 EOF
 
-  for ac_prog in 'head -1' 'head -n 1' 'sed 1q'; do
+  for ac_prog in 'head -n 1' 'head -1' 'sed 1q'; do
     echo "$as_me:$LINENO: checking whether $ac_prog works" >&5
 echo $ECHO_N "checking whether $ac_prog works... $ECHO_C" >&6
     if test "${ac_cv_prog_HEAD_1+set}" = set; then
@@ -5313,7 +5313,9 @@
 
 
 
-for ac_header in arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h
+
+
+for ac_header in arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stdarg.h std_args.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
Index: configure.ac
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.6/configure.ac,v
retrieving revision 1.6
diff -u -r1.6 configure.ac
--- configure.ac	2 Jun 2004 06:58:58 -0000	1.6
+++ configure.ac	3 Jun 2004 08:53:30 -0000
@@ -47,7 +47,7 @@
 # Checks for header files
 EGG_HEADER_STDC
 AC_HEADER_DIRENT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stdarg.h std_args.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h])
 AC_HEADER_TIME
 
 # Checks for typedefs, structures, and compiler characteristics
Wcc
M
MaxPower

another compil error 1.6.16

Post by MaxPower »

make[1]: Entering directory `/home/*******/eggdrop1.6.16/src'
This may take a while. Go get some runts.

gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c net.c
net.c: In function `open_address_listen':
net.c:446: `socklen_t' undeclared (first use in this function)
net.c:446: (Each undeclared identifier is reported only once
net.c:446: for each function it appears in.)
net.c:446: parse error before `addrlen'
net.c:469: `addrlen' undeclared (first use in this function)
net.c: In function `answer':
net.c:539: `socklen_t' undeclared (first use in this function)
net.c:539: parse error before `addrlen'
net.c:542: `addrlen' undeclared (first use in this function)
make[1]: *** [net.o] Error 1


no errors up until now
make[1]: Leaving directory `/home/******/eggdrop1.6.16/src'
make: *** [modegg] Error 2
Last edited by MaxPower on Fri Jun 04, 2004 2:47 am, edited 1 time in total.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

MaxPower, could you e-mail me your config.h, config.log, and the output from ./configure? (wcc@eggheads.org) And is that with or without that patch above applied?

Wcc
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Ok, thanks to both of you guys :)

Both of these issues have been resolved in 1.6.17 CVS. 1.6.17 will be out fairly soon, but, in the mean time..

------

Code: Select all

...
botmsg.c: In function `tandout_but':
botmsg.c:50: `va_list' undeclared (first use in this function)
botmsg.c:50: (Each undeclared identifier is reported only once
botmsg.c:50: for each function it appears in.)
botmsg.c:50: parse error before "va" 
...
To fix the first bug (the botcmd.c / va_* stuff), you can upgrade to Tcl 8.3 or 8.4 (see doc/COMPILE-GUIDE). If you do not which to do this, a simpler solution is to add the following line to the very end of config.h (AFTER running ./configure):

Code: Select all

#define HAVE_STDARG_H 1
------

Code: Select all

net.c: In function `open_address_listen':
net.c:446: `socklen_t' undeclared (first use in this function)
net.c:446: (Each undeclared identifier is reported only once
net.c:446: for each function it appears in.)
net.c:446: parse error before `addrlen'
net.c:469: `addrlen' undeclared (first use in this function)
net.c: In function `answer':
net.c:539: `socklen_t' undeclared (first use in this function)
net.c:539: parse error before `addrlen'
net.c:542: `addrlen' undeclared (first use in this function)
make[1]: *** [net.o] Error 1 
To fix the second bug (ONLY DO THIS IF YOU ACTUALLY GET THIS ERROR):

Add the following line to src/eggdrop.h, directly after

Code: Select all

#ifndef _EGG_EGGDROP_H
#define _EGG_EGGDROP_H
near the top of the file:

Code: Select all

typedef int socklen_t;
------


These problems only seem to happen on a few systems (which is why these bugs weren't discovered).

Thanks again guys,
Wcc
p
puffi
Voice
Posts: 25
Joined: Tue Jun 01, 2004 10:09 am

Post by puffi »

Big thanks, that config.h-Line solved my problem :D

thank you for your effort!
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

Ah, same to me.. I got this problem too..

gcc -pipe -g -O2 -I.. -I.. -DHAVE_CONFIG_H -c ./botmsg.c
./botmsg.c: In function `tandout_but':
./botmsg.c:50: syntax error before `va'
./botmsg.c:52: `va' undeclared (first use in this function)
./botmsg.c:52: (Each undeclared identifier is reported only once
./botmsg.c:52: for each function it appears in.)
./botmsg.c:53: syntax error before `char'
./botmsg.c: In function `simple_sprintf':
./botmsg.c:144: syntax error before `va'
./botmsg.c:146: `va' undeclared (first use in this function)
./botmsg.c:147: syntax error before `char'
./botmsg.c:154: syntax error before `char'
./botmsg.c:159: syntax error before `int'
./botmsg.c:164: syntax error before `int'
./botmsg.c:169: syntax error before `unsigned'
./botmsg.c:177: syntax error before `int'
./botmsg.c: In function `botnet_send_priv':
./botmsg.c:297: syntax error before `va'
./botmsg.c:299: `va' undeclared (first use in this function)
./botmsg.c:300: syntax error before `char'
./botmsg.c:301: syntax error before `char'
./botmsg.c:302: syntax error before `char'
./botmsg.c:303: syntax error before `char'
*** Error code 1
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

So instead of posting that you get the problem too, apply the solution already given in the thread....
p
puffi
Voice
Posts: 25
Joined: Tue Jun 01, 2004 10:09 am

Post by puffi »

i can affirme that adding that small line solved it totally :wink:
F
Floddy

Post by Floddy »

Had the same problem (http://forum.egghelp.org/viewtopic.php?p=37175), updating tcl from 8.0 to 8.3 fixed it, thanks!
f
fossil

Compiling Errors

Post by fossil »

I've been trying to get eggdrop1.6.16 up and running on a shell, i get to do the "./configure" , then i get to do the "make config" , then when i do "make" it starts running and then i get the following at the end :

---------- Yeah! That's the compiling, now the linking! ----------

Linking eggdrop: (standard build).

gcc -pipe -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o -L/usr/local/lib -ltcl -lm -ldl md5/md5c.o compat/*.o `cat mod/mod.xlibs`
dns.o: In function `block_dns_ipbyhost':
/home/black/eggdrop1.6.16/src/dns.c:474: undefined reference to `__inet_aton'
dns.o: In function `tcl_dnslookup':
/home/black/eggdrop1.6.16/src/dns.c:533: undefined reference to `__inet_aton'
modules.o: In function `module_load':
/home/black/eggdrop1.6.16/src/modules.c:729: undefined reference to `__inet_aton'
net.o: In function `getmyip':
/home/black/eggdrop1.6.16/src/net.c:109: undefined reference to `__inet_addr'
net.o: In function `proxy_connect':
/home/black/eggdrop1.6.16/src/net.c:321: undefined reference to `__inet_addr'
net.o: In function `open_telnet_raw':
/home/black/eggdrop1.6.16/src/net.c:395: undefined reference to `__inet_addr'
net.o: In function `iptostr':
/home/black/eggdrop1.6.16/src/net.c:528: undefined reference to `__inet_ntoa'
collect2: ld returned 1 exit status
make[1]: *** [../eggdrop] Error 1
make[1]: Leaving directory `/home/black/eggdrop1.6.16/src'
make: *** [modegg] Error 2

The shell is on Slackware,
OS: Linux 2.4.26
Tcl library: /usr/local/lib/tcl8.3
Tcl version: 8.3.4 (header version 8.3.4)

Any help would be appreciated
Locked