Solved [solved] prosody: libidn does not exist

Hi,
I've tried to install prosody in a FreeBSD 9.2 jail with a read only portstree (portstree is updated in basejail and WRKDIRPREFIX is /var/ports )

The problem is that the build fails with "Error: shared library "libidn" does not exist" but libidn is installed and in the filesystem. Here is the complete error:
Code:
... builds libidn ...

====> Compressing man pages (compress-man)
===>  Building package for libidn-1.28_1
Creating package /var/ports/basejail/usr/ports/dns/libidn/work/libidn-1.28_1.tbz
Registering depends: gettext-0.18.3.1 libiconv-1.14_2.
Creating bzip'd tar ball in '/var/ports/basejail/usr/ports/dns/libidn/work/libidn-1.28_1.tbz'
===>   Returning to build of prosody-0.9.3
Error: shared library "libidn" does not exist
*** [lib-depends] Error code 1

Stop in /basejail/usr/ports/net-im/prosody.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20140319-25673-sm97i4 env make DEPENDS_TARGET=package
** Fix the problem and try again.
--->  Build of net-im/prosody ended at: Wed, 19 Mar 2014 13:20:55 +0100 (consumed 00:00:42)
--->  Saving the log as '/var/log/portinstall/portinstall.net-im::prosody'
--->  Fresh installation of net-im/prosody ended at: Wed, 19 Mar 2014 13:20:55 +0100 (consumed 00:00:42)
--->  ** Install tasks 1: 0 done, 0 ignored, 0 skipped and 1 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
	! net-im/prosody	(dependent libraries)
--->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Wed, 19 Mar 2014 13:20:55 +0100 (consumed 00:00:55)

Here is the /etc/make.conf:
Code:
WRKDIRPREFIX=   /var/ports
DISTDIR=        /var/ports/distfiles
PACKAGES=       /var/ports/packages

CFLAGS=		-O3 -pipe -msse3 -mfpmath=sse
NO_PROFILE=     true
WITHOUT_X11=	yes

I'm googleing and trying for two hours now and have no idea. What strikes me odd is that prosody builds the library even though it is already build and installed.
I did rebuild the library with no effect.
 
Re: prosody: libidn does not exist

pjotr said:
What strikes me odd is that prosody builds the library even though it is already build and installed.
I did rebuild the library with no effect.
For some reason the system thinks it's not installed and so it tries to do that. Are you using PKGNG or are you still on the old system? It may not matter but what version is the host system?

Could you post the /var/log/portinstall/portinstall.net-im::prosody file on pastebin or something similar? It's probably a bit too large to include here.
 
Re: prosody: libidn does not exist

It looks like libidn builds and is packaged just fine, staging seems to work. However, it looks like it's skipping the actual installation step. Does pkg_info -x libidn show it's installed?
 
Re: prosody: libidn does not exist

Which make sense, because it is already installed (as wget dep). pkg_info confirmes that.
 
Re: prosody: libidn does not exist

pjotr said:
Which make sense, because it is already installed (as wget dep).
Well, yes. But it should either show an error about it already being installed or it should show an uninstall and reinstallation.

pkg_info confirmes that.
Right, the package system knows it's installed. That's good.

I dug a little deeper and I think I found the error. It's in net-im/prosody's Makefile:
Code:
LIB_DEPENDS= libidn:${PORTSDIR}/dns/libidn

Other ports that depend on libidn use this (note the .so):
Code:
LIB_DEPENDS= libidn.so:${PORTSDIR}/dns/libidn
 
Re: prosody: libidn does not exist

It worked. There is another problem with this port: the file $PORTS/net-im/prosody/files/deinstall.in is needed for build but its name is $PORTS/net-im/prosody/files/pkg-deinstall.in.
I already filed a bug report.

Thank you.
 
Re: prosody: libidn does not exist

pjotr said:
Which make sense, because it is already installed (as wget dep). pkg_info confirmes that.


I concur but I am still facing the same issues :(...any other suggestions???
 
Regularly the same problem in jail.
Code:
===>  Verifying install for pcre in /usr/ports/devel/pcre
===>  Returning to build of apache22-2.2.23
Error: shared library "pcre" does not exist

Code:
 # pkg_info -x pcre
Information for pcre-8.31_1:

Comment:
Perl Compatible Regular Expressions library


Description:
The PCRE library is a set of functions that implement regular expression
pattern matching using the same syntax and semantics as Perl 5, with just
a few differences. The current implementation corresponds to Perl 5.005.
PCRE is  used by many programs, including Exim, Postfix, and PHP.

Written by: Phil Hazel <ph10@cam.ac.uk>

WWW: http://www.pcre.org/
Code:
# pkg info pcre
pkg: No package(s) matching pcre
I use the old ports tree, because I need php52.

Why pkg not register apps?
 
The error message is not coming from pkg(8) nor is caused by it, it's the configure or build process of www/apache22 not finding the devel/pcre shared library for some reason even if it is installed. Under no circumstances the build process of a port can use pkg(8) to find out if a shared library is installed, it has to do that with methods that do not depend on a particular packaging method. *)

A wild guess, does the jail have a long history of updates? If it does this /usr/ports/UPDATING entry may concern you:

Code:
20140909:
  AFFECTS: users seeing build errors about missing *.la files
  AUTHOR: tijl@FreeBSD.org

  We are in the process of adjusting or, if possible, removing libtool archives
  (*.la files) from all ports because they can otherwise cause overlinking
  between packages.  This is the problem where in the dependency chain A->B->C
  an extra link is added from A to C even if A does not use C directly.  This
  makes some updates to port C expensive because then both A and B have to be
  rebuilt instead of just B.

  This is mostly behind the scenes work that you won't notice.  In fact most
  ports have already been converted.  You may however run into build errors
  about missing *.la files if a port update in the past went wrong and left
  behind *.la files with references to other *.la files that are no longer
  there.  In this case, please run the following command:

  find /usr/local/lib -name '*.la' | xargs grep -l 'libfoo\.la' | xargs pkg which
  (Replace libfoo\.la with the *.la file that is missing.)

  This command will print a list of *.la files that refer to the missing *.la
  file and what package they belong to.  First, where it says "not found in
  the database", remove the *.la file.  After removing all such files, where
  it says "installed by package X", rebuild X.  Eventually the list printed by
  that command will be empty and the build error should be gone.


*) The ports system does pre-install the build time dependencies based on the make build-depends-list listing and package builders can use pre-built packages for the dependencies but the actual build of the port has to trust that the list is correct and all needed dependencies already exist in the build environment.
 
Back
Top