From mboxrd@z Thu Jan  1 00:00:00 1970
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Problem building a version update of rng-tools
Date: Wed, 03 May 2023 14:35:45 +0200
Message-ID: <b1235e5c-8411-f88c-1cd8-0b51d4954aea@ipfire.org>
In-Reply-To: <E2756128-8CB0-40F3-8FA3-CC5F2608160C@ipfire.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0669405256162715498=="
List-Id: <development.lists.ipfire.org>

--===============0669405256162715498==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hi Michael,

On 03/05/2023 14:07, Michael Tremer wrote:
> Hello Adolf,
>=20
> Normally you should not need to add anything extra for this to work. The co=
mpiler should know where to search for libraries.
>=20
> If pkg-config is being used, this might be a little bit different.
Just before the various packages are checked to exist the configure also chec=
ks that pkg-config is existing.
>=20
>> On 3 May 2023, at 13:02, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
>>
>> Hi All,
>>
>>
>> There is a new version for rng-tools so I thought I would do an update but=
 it kept stopping saying that it required libcap and could not find it.
>>
>> I noted that the libcap libs are in /lib and not in /usr/lib as the other =
packages that rng-tools looks for have their libs. (openssl, libxml2, curl, j=
ansson)
>>
>> The new version has a flag for the ./configure called libcap_LIBS which ca=
n be used to override pkg-config.
>>
>> I tried that in various ways such as libcap_LIBS=3D"/lib" or libcap_LIBS=
=3D"/lib/libcap.so.2.67" and others, but none of them worked. The ./configure=
 still ended up with the message
>>
>> checking for libcap... no
>> configure: error: libcap is required
>>
>> I then noticed that libcap.pc is in /lib/pkgconfig/ while all the other pa=
ckages being searched for are in /usr/lib/pkgconfig/
>=20
> This should indeed be installed to /usr/lib/pkgconfig.
>=20
> I don=E2=80=99t have a problem with simply changing =E2=80=94-prefix=3D/ to=
 =E2=80=94-prefix=3D/usr for libcap, because we don=E2=80=99t support a split=
 /usr directory anyways. That should make it easier.
libcap currently keeps the library files in /lib/ but makes a symlink to one =
of them in /usr/lib/. Libcap doesn't have a configure line. There is a sed co=
mmand on the Makefile to stop it building static libs and then it goes straig=
ht to make and then make install
>=20
>> I then manually did a copy of libcap.pc to /usr/lib/pkgconfig/ and then re=
 ran just the rng-tools build and it then successfully found libcap and compl=
eted the build. So the problem is definitely to do withy the unusual location=
 for the library files of libcap.
>=20
> Do we have any other packages that install .pc files into funny places?
The other .pc files that are in /lib/pkgconfig/ are libkeyutils, libproc-2, l=
ibpsx and libsysfs
>=20
>> So the question I have is what is the best way to deal with this.
>>
>> Should I add into the libcap lfs a line that copies the libcap.pc to /usr/=
lib/pkgconfig/ or
>>
>> is can someone tell me what I am doing wrong with the libcap_LIBS flag for=
 ./configure
>>
>>
>> Regards,
>>
>> Adolf.
>>
>=20
> -Michael

--===============0669405256162715498==--