From owner-freebsd-questions Wed Aug 2 16:25: 0 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.utexas.edu (wb1-a.mail.utexas.edu [128.83.126.134]) by hub.freebsd.org (Postfix) with SMTP id B7A7937B5F4 for ; Wed, 2 Aug 2000 16:24:55 -0700 (PDT) (envelope-from oscars@mail.utexas.edu) Received: (qmail 21791 invoked by uid 0); 2 Aug 2000 23:24:52 -0000 Received: from chepe.cc.utexas.edu (HELO chepe.mail.utexas.edu) (128.83.135.25) by umbs-smtp-1 with SMTP; 2 Aug 2000 23:24:52 -0000 Message-Id: <4.3.2.7.2.20000802180227.00af5620@mail.utexas.edu> X-Sender: oscars@mail.utexas.edu X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Wed, 02 Aug 2000 18:21:39 -0500 To: freebsd-questions@freebsd.org From: Oscar Ricardo Silva Subject: Problems compiling amanda with kerberos Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Before I get told to post this to an amanda mailing list, we have. We're having a problem compiling amanda-2.4.1p1 and amanda-2.4.2 with kerberos additions on FreeBSD 4.0. A person I work with submitted the following message to the amanda group: I'm having some trouble getting Amanda to link under FreeBSD 4.0 when I configure it for Kerberos. After fixing a few problems in the krb4 source files that were hindering compilation (they've been discussed on amanda-users previously so I won't repeat them here), I get this error when trying to link common-src/genversion: /bin/sh ../libtool --mode=link gcc -g -L/usr/lib -o genversion genversion.o versuff.o alloc.o error.o -lm -lreadline -ltermcap -lkrb -ldes gcc -g -L/usr/lib -o genversion genversion.o versuff.o alloc.o error.o -lm -lreadline -ltermcap -lkrb -ldes /usr/lib/libkrb.so: undefined reference to `init_error_table' /usr/lib/libkrb.so: undefined reference to `initialize_error_table_r' *** Error code 1 Stop in /usr/local/src/amanda-2.4.1p1/common-src. *** Error code 1 Stop in /usr/local/src/amanda-2.4.1p1. This happens for many other Amanda programs as well (26 total), genversion just happens to be the first. If I cut and paste the gcc command that is used to link genversion and add the "-static" option to it to suppress dynamic linking, it links OK. I guess something is wrong with libkrb.so in FreeBSD 4.0. OK fine, I can live with statically linked programs. But it's a royal pain in the butt to link 26 programs manually. I tried configuring with --disable-libtool --enable-shared=no --enable-static=yes but that didn't help. I tried hacking on various makefiles to replace "gcc" with "gcc -static" but that didn't work either. I know what you're thinking: "If you've already linked all 26 programs manually then why bother trying to automate it now?" Because we've now decided to go with Amanda 2.4.2 instead of 2.4.1p1, so we're going to have to recompile. I'd like it to be easier this time. and here one of his responses to one of the developers: >Did you remove config.cache (or "make distclean") before re-running >configure? I didn't make distclean but I did rm config.cache. It didn't help. >>... I tried hacking on various makefiles to replace >>"gcc" with "gcc -static" but that didn't work either. > >I'm confused. You said this worked for genversion, but not for the other >programs? What did you have to change to make the other programs work? No, it *did* work with the other programs. I manually linked all 26 programs with -static and they all linked fine. I was just using genversion as an example because it was the first one to fail. >If it's just a matter of adding -static to **all** the gcc calls, you >can export the CC environment variable and set it to what you want when >you run configure, e.g. (for ksh/bash): > > make distclean > CC="gcc -static" ./configure ... Close, but no stogie. I get "-static" on all the compiles (where it doesn't matter), but not on the links. Here's a sample: gcc -static -DHAVE_CONFIG_H -I. -I. -I../config -I./../regex-src -I/usr/include -g -I/usr/include -c versuff.c /bin/sh ../libtool --mode=link gcc -static -g -L/usr/lib -o genversion genversion.o versuff.o alloc.o error.o -lm -lreadline -ltermcap -lkrb -ldes gcc -g -L/usr/lib -o genversion genversion.o versuff.o alloc.o error.o -lm -lreadline -ltermcap -lkrb -ldes /usr/lib/libkrb.so: undefined reference to `init_error_table' /usr/lib/libkrb.so: undefined reference to `initialize_error_table_r' *** Error code 1 Stop in /usr/local/src/amanda-2.4.1p1/common-src. *** Error code 1 Stop in /usr/local/src/amanda-2.4.1p1. You can see that the first gcc, which compiles versuff.c, has -static. But the second gcc, which links genversion, does not. I think libtool is the culprit, but I don't know enough about it to say for sure. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message