Subject: Re: Compiling pkgsrc/net/eggdrop-1.6.6 HELP needed
To: None <agc@pkgsrc.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-users
Date: 10/15/2001 18:08:01
Alistair Crooks <agc@pkgsrc.org> wrote:
>Taken from a -current pkgsrc instance:
>
>% make
>===> all [eggdrop-1.3.22] ===> eggdrop-1.3.22 is marked as broken:
>===> all [eggdrop-1.3.22] ===> This package has not yet been updated to work past tcl-8.0.5.

I think he's fully aware that eggdrop 1.3.22 hasn't been fixed for tcl 8.3.2,
that's why he's trying to now create a package for eggdrop 1.6.6:

>> I am using the files of pkgsrc/net/eggdrop-1.3.22 as
>> an example in order to build the new one.

>> Linking eggdrop...
>> 
>> cc -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 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/pkg/lib -ltcl83 -lm md5/md5c.o compat/*.o `cat mod/mod.xlibs`

Notice that the above does _not_ include '-Wl,-R/usr/pkg/lib' anywhere in
it.  As a result, while libtcl83.so is found at build time in /usr/pkg/lib
(from the -L), /usr/pkg/lib is not put into the executable's run-time
library search path.

As a result, the "check that all run-time libraries resolve" step fails:

>> Shared object "libtcl83.so.1" not found
>> *** Error code 1
>> 
>> Stop.

>> What am I doing wrong?

Here's a clue: the build process is changing how it invokes the compiler
somewhere between
>> checking whether the C compiler (cc -O2  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib) works... yes

(which is in the configure step and includes all the correct -Wl,-R stuff)
and the compile stage, where we see (shortly before the linking stage):

>> cc -pipe -O2 -I.. -I.. -DHAVE_CONFIG_H    '-DCCFLAGS="cc -pipe -O2 -I.. -I.. -DHAVE_CONFIG_H  "'  '-DLDFLAGS="cc -pipe"'  '-DSTRIPFLAGS="strip"' -c ./main.c

(In other words, this compile script somewhere overwrites LDFLAGS with
something broken...)

jdarrow

-- 
John Darrow - Senior Technical Specialist               Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187  Fax:    630/752-5968
Pager via email: 6303160707@alphapage.airtouch.com      Pager:  630/316-0707
Email: John.P.Darrow@wheaton.edu (plain text please, no HTML or proprietary)