View Issue Details

IDProjectCategoryView StatusLast Update
0000896unrealinstallingpublic2003-12-29 20:21
ReporterSteck Assigned Toluke  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
PlatformLinuxOSRedHatOS Version9
Summary0000896: [Stable] 'make' says "undefined reference to '_res' "
DescriptionI have ran ./Config, and am now in the process of 'make'. When doing that I get this error:

Building src
make[1]: Entering directory `/home/steck/Unreal3.1.5.1/src'
gcc -I../include -O -g -o ircd agent.o aln.o badwords.o bsd.o channel.o clas
s.o cloak.o crule.o dbuf.o dynconf.o fdlist.o hash.o help.o ircd.o ircsprintf.o
list.o lusers.o match.o packet.o parse.o res.o res_skipname.o s_auth.o s_bsd.o
s_conf.o s_debug.o s_err.o s_extra.o s_kline.o s_misc.o s_numeric.o s_serv.o s_s
ocks.o ssl.o s_unreal.o s_user.o scache.o send.o support.o userload.o version.o
 webtv.o whowas.o -lcrypt -lresolv
res.o(.text+0x4d): In function `init_resolver':
/home/steck/Unreal3.1.5.1/src/res.c:114: undefined reference to `_res'
res.o(.text+0x56):/home/steck/Unreal3.1.5.1/src/res.c:116: undefined reference t
o `_res'
res.o(.text+0x6c):/home/steck/Unreal3.1.5.1/src/res.c:117: undefined reference t
o `_res'
res.o(.text+0x44f): In function `send_res_msg':
/home/steck/Unreal3.1.5.1/src/res.c:362: undefined reference to `_res'
res.o(.text+0x457):/home/steck/Unreal3.1.5.1/src/res.c:362: undefined reference
to `_res'
res.o(.text+0x45d):/home/steck/Unreal3.1.5.1/src/res.c:363: more undefined refer
ences to `_res' follow
collect2: ld returned 1 exit status
make[1]: *** [ircd] Error 1
make[1]: Leaving directory `/home/steck/Unreal3.1.5.1/src'
make: *** [build] Error 2
Steps To ReproduceTyping 'make' in the Unreal3.1.5.1 directory.
Additional InformationLook below for a working solution.
TagsNo tags attached.
3rd party modules

Relationships

has duplicate 0001138 closedsyzop latest glibcs libresolv doesn't contain _res struct 

Activities

syzop

2003-04-17 15:37

administrator   ~0002383

For the record: this bug has been reported by multiple people (also mandrake 9.1 IIRC).

Hm if I understand this correctly these _res things are ment for reading the nameserver's IP(s) specified in /etc/resolv.conf ? Then I understand why it's 3.1 specific ;P.

PJ

2003-05-02 10:35

reporter   ~0002605

I believe this is an issue with all GCC 3x, and 2.96 (2.95 should be fine) based distributions. If I understand the situation correctly, the glibc packages changed, which broke a _LOT_ of older stuff that uses lresolv code. A lot of older ircd's suffer from this same problem on these gcc platforms.

codemastr

2003-05-02 20:27

reporter   ~0002609

at the top of src/res.c try adding #define _res __res see what that does...

Steck

2003-05-02 22:41

reporter   ~0002610

Still get the same error message :-/

jdauction

2003-05-03 10:14

reporter   ~0002611

The note that PJ added is not correct. I use Red Hat 8.0 with GCC Version 3.2 with no problems at all, however one of my other servers on my network is having the __res problem with Red Hat 9.0 with GCC Version 3.2.2 I hope this new information will help in the end result of the bug. There are other versions of IRCds that are affected aswell. I saw a patch, but i cannot find it. This bug affects bahamut-1.4.35, Ultimate 2.8.6, and ircd-hybrid 6.3.1

PJ

2003-05-03 14:21

reporter   ~0002612

Jdauction, any chance you could tell me what version of glibc is on that box? 'rpm -qa | grep glibc' should spit it out.

Perhasp its the version of glibc, not gcc that is screwing things up. Every gcc3x box I've tried it on so far has failed.

syzop

2003-05-03 18:46

administrator   ~0002615

I dunnow what the problem is, it's weird... I've a debian box with gcc3.2, libresolv/glibc 2.3.1 and a mandrake box with the same versions of gcc/libresolv/glibc, but it compiles fine at debian (testing) but NOT at mandrake 9.1... so... NFI :P.

syzop

2003-05-03 19:04

administrator   ~0002616

Hmm if I compile at debian and run it at mandrake 9.1 it works fine ;p. Btw I noticed my gcc is a bit different: 3.2.1 at debian vs 3.2.2 at mandrake.

syzop

2003-05-03 19:31

administrator   ~0002617

It's something with nice conflicting types of _res...
I've made a quick hack: I just ripped out include/resolv.h and include/nameser.h and changed some include references and now it compiles fine @ mandrake(/redhat too I assume).
Patch (you have to do the "rm include/resolv.h include/nameser.h" yourself): http://www.vulnscan.org/UnrealIrcd/respatched/ugly.patch

And the .tar.gz with patch applied and the 2 .h files removed: http://www.vulnscan.org/UnrealIrcd/respatched/Unreal3.1.5.1-respatched.tar.gz

Note that I didn't even run the ircd, all I did is check if it compiles ;).
[I'm not a 3.1.* developer so this is just a quick hack, I'll leave the making-a-proper-solution to others].

PJ

2003-05-03 21:08

reporter   ~0002623

Heh, without those two files, how will the ircd function?

jdauction

2003-05-04 01:15

reporter   ~0002626

RedHat 8.0 Glibc:
glibc-2.2.93-5
glibc-debug-static-2.2.93-5
glibc-devel-2.2.93-5
glibc-profile-2.2.93-5
glibc-common-2.2.93-5
glibc-utils-2.2.93-5
glibc-debug-2.2.93-5
glibc-kernheaders-2.4-7.20
RedHat 9.0 Glibc:
glibc-debug-2.3.2-27.9
glibc-kernheaders-2.4-8.10
glibc-common-2.3.2-27.9
glibc-utils-2.3.2-27.9
glibc-2.3.2-27.9
glibc-devel-2.3.2-27.9
glibc-profile-2.3.2-27.9

I hope this helps.

optika

2003-06-12 21:18

reporter   ~0002961

Last edited: 2003-06-12 21:36

Hi,

I have a much easier solution :)

Simply include res_init in your list of objects. I did this (and I think its the wrong way, but hey...) by:

--- Config~     2003-06-12 23:09:38.000000000 +0200
+++ Config      2003-06-12 23:09:38.000000000 +0200
@@ -887,7 +887,7 @@
 else if [ $? -ne 0 -o "$OSNAME" = "Linux RedHat 5.1" -o -n "$NEEDSKIPNAME" ] ; then
     echo $n " dn_skipname$c"
     $RM -f Makefile.tmp
-    sed -e "s@^RES=\(.*\)@RES=res_skipname.o@" Makefile > Makefile.tmp
+    sed -e "s@^RES=\(.*\)@RES=res_skipname.o res_init.o@" Makefile > Makefile.tmp
     cp Makefile.tmp Makefile
     $RM -f Makefile.tmp
 else


Which seems to work on my gentoo linux system.

Kbye.

edited on: 06-12-03 21:36

cards

2003-06-18 21:49

reporter   ~0002988

Fixed on Mandrake...

1) Enter the src directory.
2) pico Makefile
3) Find "OBJS=..."
4) Add res_init.o res_comp.o res_mkquery.o after whowas.o
5) Save Make file
6) pico res_mkquery.c
7) Find "ID_CVS("$Id: res_mkquery.c,v 1.1.1.1.2.11 2003/01/16 16:32:11 stskeeps Exp $");"
8) Comment out the line with /* */ (/*ID_CVS("$Id: res_mkquery.c,v 1.1.1.1.2.11 2003/01/16 16:32:11 stskeeps Exp $");*/
9) Save.
10) cd.. and type make again

shadow_uci

2003-06-25 09:38

reporter   ~0003087

i've this problem too... may be deupgrading gcc glibc-2.3.2-11.9 to glibc-2.1.3-22 ?

chotaire

2003-08-08 17:58

reporter   ~0003432

Last edited: 2003-08-08 18:49

The tip by cards works for SuSE Linux 8.2 Professional. Hostnames do finally resolve. Thanks.

edited on: 08-08-03 18:49

Rocko

2003-08-31 17:18

reporter   ~0003553

And now my experience ;P
Cards "fix" works for SuSE 8.2.
Tested with 3.1.7-Jones[beta1]

werd

2003-09-06 17:48

reporter   ~0003609

Hats off to cards! His tip worked on Mandrake 9.1 using gcc 3.2.2 while installing UnrealIRCd 3.1.6-Noon

jasonb

2003-09-20 12:28

reporter   ~0003689

Works on redhat9 also

blackopsirc

2003-10-06 00:01

reporter   ~0003787

thanks cards, seems like that fix is system-independant. has compiled on several systems perfectly after using the information you posted, all of which would NOT take it before.

Laser

2003-11-30 08:34

reporter   ~0004178

will you be able to fix this bug about for slackware 9.1

Issue History

Date Modified Username Field Change
2003-04-15 23:47 Steck New Issue
2003-04-15 23:48 syzop Assigned To => luke
2003-04-15 23:48 syzop Status new => assigned
2003-04-17 15:37 syzop Note Added: 0002383
2003-05-02 10:35 PJ Note Added: 0002605
2003-05-02 20:27 codemastr Note Added: 0002609
2003-05-02 22:41 Steck Note Added: 0002610
2003-05-03 10:14 jdauction Note Added: 0002611
2003-05-03 14:21 PJ Note Added: 0002612
2003-05-03 18:46 syzop Note Added: 0002615
2003-05-03 19:04 syzop Note Added: 0002616
2003-05-03 19:31 syzop Note Added: 0002617
2003-05-03 21:08 PJ Note Added: 0002623
2003-05-04 01:15 jdauction Note Added: 0002626
2003-06-12 21:18 optika Note Added: 0002961
2003-06-12 21:36 optika Note Edited: 0002961
2003-06-18 21:49 cards Note Added: 0002988
2003-06-25 09:38 shadow_uci Note Added: 0003087
2003-07-21 20:30 syzop Relationship added has duplicate 0001138
2003-08-08 17:58 chotaire Note Added: 0003432
2003-08-08 18:25 chotaire Note Edited: 0003432
2003-08-08 18:49 chotaire Note Edited: 0003432
2003-08-31 17:18 Rocko Note Added: 0003553
2003-09-06 17:48 werd Note Added: 0003609
2003-09-06 18:26 syzop Product Version 3.1.5.1-Valek => 3.1.6-Noon
2003-09-06 18:26 syzop Summary On 'make', reports of " undefined reference to '_res' " => [Stable] 'make' says "undefined reference to '_res' "
2003-09-06 18:26 syzop Additional Information Updated
2003-09-06 18:27 syzop Additional Information Updated
2003-09-20 12:28 jasonb Note Added: 0003689
2003-10-06 00:01 blackopsirc Note Added: 0003787
2003-11-30 08:34 Laser Note Added: 0004178
2003-12-29 20:21 syzop Status assigned => closed