POV-Ray : Newsgroups : povray.unix : Some help needed : Re: Some help needed Server Time
28 Nov 2021 10:11:37 EST (-0500)
  Re: Some help needed  
From: William F Pokorny
Date: 20 May 2017 10:12:26
Message: <59204eca$1@news.povray.org>
On 05/20/2017 09:34 AM, William F Pokorny wrote:
> On 05/20/2017 03:42 AM, clipka wrote:
>> Am 19.05.2017 um 21:35 schrieb William F Pokorny:
>>
>>> Got back to this a while ago. The more I dig the more I think if the
>>> pkg-config command and its infrastructure exists, it should be used 
>>> first.
>>>
>>> In fact for best reliability, the pkg-config mechanism should perhaps be
>>> used first for all our packages when available. The necessary .pc files
>>> exists for the Simple DirectMedia Layer library too it turns out.
>>
>> Are you sure about this?
>>
>> To my knowledge, the pkg-config mechanism tells you what packages are
>> installed via a Linux distribution's package management, such as apt.
>>
>> However, if the user chooses to install a different version of a library
>> locally, using environment variables or parameters to `./configure` to
>> point the compiler there, then my guess is that relying on pkg-config
>> would seriously screw up things.
>>
>>
>> Unless pkg-config reliably addresses that issue, in my opinion our first
>> attempt should be to try and pry the relevant information from the very
>> files that will be accessed during compilation, i.e. the header files.
>>
> 
> I'm unsure at the moment how the other version mechanism works but would 
> be a little surprised if pkg-config doesn't have a mechanism to handle 
> it. I'll do a little more digging on this and see what I can turn up.
> 
> We can certainly hard code flags to what works now if you want to do this.
> 
> Bill P.

It looks like where multiple libraries can exist in system space the 
library names must be unique and the *.pc prefixes must be unique and 
where you want other than the system default you must refer to the 
version by name when using pkg-config to get the compiler and linker 
flags to use.

When the libraries are installed in non-standard locations - say a user 
space often it seems the already mentioned PKG_CONFIG_PATH environment 
variable is used to put the users versions ahead of the any system ones. 
I suppose in our current set users would need to know to do this.

It looks like it is expected folks use the environment variable
PKG_CONFIG_LIBDIR to be when no system package *.pc information is to be 
used. Something you might do if say compiling on Ubuntu for another 
target system.

Bill P.


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.