Subject: Error compiling kdebase3 in 1.5.3
To: None <tech-pkg@netbsd.org>
From: Dwight Tuinstra <tuinstra@clarkson.edu>
List: tech-pkg
Date: 08/07/2002 16:31:39
I'm having problems compiling kde3 from the latest pkgsrc, in 1.5.3
(i386). The problem is in kdebase3, and involves calls to
crypto routines.  Here's what's transpired so far:

1) NetBSD version: 1.5.3, installed from scratch 4 or 5 days ago:

  gernsback# uname -a 
  NetBSD gernsback 1.5.3 NetBSD 1.5.3 (GENERIC) #34: Mon Jul  1
  21:36:06 CEST 2002
  he@hamster.urc.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC
  i386

2) Downloaded and untarred pkgsrc August 3 tarball.

3) Pkgsrc "make install" of qt3-tools, qt3-libs, and kdelibs-3.0.2
succeeded (as dependencies of kde3).

4) Attempts to make pkgsrc/x11/kde3 fail in kdebase3.  Error message
are similar if not identical to those listed in (7) below.

5) Updated pkgsrc via cvs at about noon EDT, 7 Aug.

6) Made openssh and openssl from pkgsrc; renamed /usr/bin/ssh and
/usr/bin/openssl so pkgsrc versions are picked up. ldd on the pkgsrc
versions shows they're using the pkgsrc libcrypto libraries.

7) "make clean" followed by "make" in x11/kde3 hits the same
problem. The problem is in kdebase3; it also occurs when trying to
compile just kdebase3 (transcribing here):

  .libs/crypto.o: In function `KCryptoConfig::slotCAImport(void)':
  .libs/crypto.o(.text+0xaa5c): undefined reference to
  `KOpenSSLProxy::X509_STORE_new(void)'
The following lines similarly list another 8 undefined references
in .libs/crypto.o:
  KOpenSSLProxy::X509_LOOKUP_file(void)
  KOpenSSLProxy::X509_STORE_add_lookup(x509_store_st *, 
                                       x509_lookup_method_st *)
  KOpenSSLProxy::X509_LOOKUP_ctrl(x509_lookup_method_st *,
                                  int, char const * long, char **)
  KOpenSSLProxy::sk_value(stack_st *, int)
  KSSLCertificate::fromX509(x509_st *)
  KOpenSSLProxy::sk_num(stack_st *)
  KOpenSSLProxy::X509_STORE_free(x509_store_st *)
  KOpenSSLProxy::X509_STORE_free(x509_store_st *)
There then follows:
  collect2: ld returned 1 exit status
  gmake[3]: *** [kcm_crypto.la.closure] Error 1
  gmake[3]: leaving directory `<path to local pkgsrc dir>/x11/kdebase3/work/
            kdebase-3.0.2/kcontrol/crypto'
And back up through the recursive make directories.

I have a local mk.conf in /etc, but other than adjusting some
license acceptance, all I've done is point DISTDIR to
/usr/distfiles.  The only other wrinkles I can think of are some
symlinks:

  /usr/pkgsrc -> /lfs1/fakeroot/usr/pkgsrc
  /usr/distfiles -> /lfs1/fakeroot/distfiles

I doubt the problem is due to pkgsrc and distfiles being on an LFS
filesystem ... the problem is 100% reproducible and occurred before
and after the cvs update of the pkgsrc tree.

Any idea what's going wrong, and how to fix it?

  --Dwight Tuinstra
    tuinstra@clarkson.edu