Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!umich!don From: don@zippy.eecs.umich.edu (Don Winsor) Newsgroups: comp.sources.d Subject: Re: Production perl 3.0 available Summary: cure for undefined symbol gethostent Message-ID: <609@zip.eecs.umich.edu> Date: 24 Oct 89 02:10:50 GMT References: <10077@stag.math.lsa.umich.edu> Reply-To: don@zip.eecs.umich.edu.UUCP (Don Winsor) Organization: University of Michigan EECS Dept., Ann Arbor, MI Lines: 29 In article <10077@stag.math.lsa.umich.edu> emv@math.lsa.umich.edu (Edward Vielmetti) writes: > ... system is a sun 4/60 running sunos 4.0.3 w/the uunet > sun-fixes version of libc.so that has name server support in it. > ... perl on this system complies OK but refuses to link with > the error from ld about undefined symbol -- _gethostent. > I think this problem flew by the list once > before -- something about libraries -- but I lost it > between the time I saw it and the time I need it. I ran into this problem too. The key is that the version of libc.so that has the name server support in it doesn't have the gethostent subroutine, since gethostent inherently refers to an /etc/hosts file and not to a name server. The cure is that when you run Configure and it asks if you want to edit config.sh, go ahead and edit it (!vi config.sh). Find the line: d_gethent='define' and change it to: d_gethent='undef' This will build a version of perl that doesn't reference the nonexistent gethostent subroutine. The one other quirk I found with perl on a Sun-4 is that the file "walk.c" in the "x2p" subdirectory wont compile if you use a -O3 or a -O4 optimization level. I worked around it by compiling this at -O2 manually, and then running make with -O4 optimization to compile everythine else.