From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: Problem building a version update of rng-tools Date: Wed, 03 May 2023 15:23:08 +0200 Message-ID: <4e013951-d847-8d59-9682-0a4a023081b9@ipfire.org> In-Reply-To: <9cd4e7a2-3315-2113-a025-30974830cbef@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2707340281376174181==" List-Id: --===============2707340281376174181== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, On 03/05/2023 14:58, Adolf Belka wrote: > > On 03/05/2023 14:35, Adolf Belka wrote: >> Hi Michael, >> >> On 03/05/2023 14:07, Michael Tremer wrote: >>> Hello Adolf, >>> >>> Normally you should not need to add anything extra for this to work. The = compiler should know where to search for libraries. >>> >>> 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 c= hecks that pkg-config is existing. >>> >>>> On 3 May 2023, at 13:02, Adolf Belka wrote: >>>> >>>> Hi All, >>>> >>>> >>>> There is a new version for rng-tools so I thought I would do an update b= ut 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 othe= r packages that rng-tools looks for have their libs. (openssl, libxml2, curl,= jansson) >>>> >>>> The new version has a flag for the ./configure called libcap_LIBS which = can 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 = packages being searched for are in /usr/lib/pkgconfig/ >>> >>> This should indeed be installed to /usr/lib/pkgconfig. >>> >>> 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 spl= it /usr directory anyways. That should make it easier. > Looking through the libcap README and Makefile then the .pc files should be= getting placed in /usr/lib/pkgconfig but they aren't. Also as $(prefix) is n= ot defined then the prefix should be /usr but again it is not. I think I must have misread what the Makefile etc were intending to do. I just tried a quick build of libcap with adding prefix=3D/usr to the make an= d make install lines and the lib files and the .pc files are now in /usr/lib/= and /usr/lib/pkgconfig/ The only remaining question I have is if anything else in IPFire would be exp= ecting to see the lib files for libcap in /lib/ instead of /usr/lib/ because = then the symlinking of the lib from /lib/ to /usr/lib/ won't be needed any mo= re. What is libcap used for so I can test out the built iso on a vm machine? Regards, Adolf. >> libcap currently keeps the library files in /lib/ but makes a symlink to o= ne of them in /usr/lib/. Libcap doesn't have a configure line. There is a sed= command on the Makefile to stop it building static libs and then it goes str= aight to make and then make install >>> >>>> 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 com= pleted the build. So the problem is definitely to do withy the unusual locati= on for the library files of libcap. >>> >>> 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= , libpsx and libsysfs >>> > The libpsx.pc file is also from libcap. >>>> 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 /us= r/lib/pkgconfig/ or >>>> >>>> is can someone tell me what I am doing wrong with the libcap_LIBS flag f= or ./configure >>>> > I think that rather than trying to adjust libcap to work the way it says it= should be anyway, I will add a copy line into the lfs to move the libcap.pc = file to /usr/lib/pkgconfig/ > > > Regards, > > Adolf. > >>>> >>>> Regards, >>>> >>>> Adolf. >>>> >>> >>> -Michael --===============2707340281376174181==--