pkg-config and opencv4

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

pkg-config and opencv4

Joël Brogniart-3
I'm trying to adapt a portfile for a Linux application to depend on opencv4 instead of opencv. The building of the application use pkg-config to find directory, library et compiler settings for different tools (opencv, cairo…). This works correctly except for opencv.

On Macports, the opencv4 port doesn't populate pkg-config data with its own information. Is there an explanation for the missing data?
Reply | Threaded
Open this post in threaded view
|

Re: pkg-config and opencv4

Marius Schamschula-3
A quick look at the Portfile shows that opencv4 uses cmake.

It is rare that cmake based builds also gernerate .po files by default, but there may be a switch.

It might be worth opening a trac ticket.

> On Feb 9, 2021, at 5:37 AM, Joël Brogniart <[hidden email]> wrote:
>
> One should be able to obtain informations with pkg-config. ie. wiith cairo installed it works fine
>  pkg-config --cflags cairo
>  pkg-config --libs cairo
> But not with opencv4.
>
> Joël
>
>> Le 9 févr. 2021 à 12:10, Marius Schamschula <[hidden email]> a écrit :
>>
>> I haven’t had time to look into that. I’m not the maintain of opencv4. For the moment I downgraded opencv to version 3.4.13.
>>
>>> On Feb 9, 2021, at 2:28 AM, Joël Brogniart <[hidden email]> wrote:
>>>
>>> I'm trying to adapt a portfile for a Linux application to depend on opencv4 instead of opencv. The building of the application use pkg-config to find directory, library et compiler settings for different tools (opencv, cairo…). This works correctly except for opencv.
>>>
>>> On Macports, the opencv4 port doesn't populate pkg-config data with its own information. Is there an explanation for the missing data?
>>
>> Marius
>> --
>> Marius Schamschula

Marius
--
Marius Schamschula




Reply | Threaded
Open this post in threaded view
|

Re: pkg-config and opencv4

Joël Brogniart-3
In reply to this post by Joël Brogniart-3

One should be able to obtain informations with pkg-config. ie. wiith cairo installed it works fine
pkg-config --cflags cairo
pkg-config --libs cairo
But not with opencv4.

Joël

> Le 9 févr. 2021 à 12:10, Marius Schamschula <[hidden email]> a écrit :
>
> I haven’t had time to look into that. I’m not the maintain of opencv4. For the moment I downgraded opencv to version 3.4.13.
>
>> On Feb 9, 2021, at 2:28 AM, Joël Brogniart <[hidden email]> wrote:
>>
>> I'm trying to adapt a portfile for a Linux application to depend on opencv4 instead of opencv. The building of the application use pkg-config to find directory, library et compiler settings for different tools (opencv, cairo…). This works correctly except for opencv.
>>
>> On Macports, the opencv4 port doesn't populate pkg-config data with its own information. Is there an explanation for the missing data?
>
> Marius
> --
> Marius Schamschula
Reply | Threaded
Open this post in threaded view
|

Re: pkg-config and opencv4

Joël Brogniart-3
Even if posts in the issus show workarounds, it also looks like opencv developers consider the use of pkg-config .pc files obsolete so I will do without.

> Le 9 févr. 2021 à 14:43, Marius Schamschula <[hidden email]> a écrit :
>
> It looks like this is an open issue:
>
> https://github.com/opencv/opencv/issues/13154
>
> It looks like one can patch opencv4 to fix this issue.
>
> PS: I meant .pc not .po files.
>
>> On Feb 9, 2021, at 7:40 AM, Marius Schamschula <[hidden email]> wrote:
>>
>> pkg-config only works if the package generates .po files. cairo does, opencv does, but opencv4 does not.
>>
>>> On Feb 9, 2021, at 6:44 AM, Joël Brogniart <[hidden email]> wrote:
>>>
>>>
>>> One should be able to obtain informations with pkg-config. ie. wiith cairo installed it works fine
>>> pkg-config --cflags cairo
>>> pkg-config --libs cairo
>>> But not with opencv4.
>>>
>>> Joël
>>>
>>>> Le 9 févr. 2021 à 12:10, Marius Schamschula <[hidden email]> a écrit :
>>>>
>>>> I haven’t had time to look into that. I’m not the maintain of opencv4. For the moment I downgraded opencv to version 3.4.13.
>>>>
>>>>> On Feb 9, 2021, at 2:28 AM, Joël Brogniart <[hidden email]> wrote:
>>>>>
>>>>> I'm trying to adapt a portfile for a Linux application to depend on opencv4 instead of opencv. The building of the application use pkg-config to find directory, library et compiler settings for different tools (opencv, cairo…). This works correctly except for opencv.
>>>>>
>>>>> On Macports, the opencv4 port doesn't populate pkg-config data with its own information. Is there an explanation for the missing data?
>>>>
>>>> Marius
>>>> --
>>>> Marius Schamschula
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: pkg-config and opencv4

Marius Schamschula-3
Exactly my reading. However, there are many packages that depend on opencv/opencv4 that prefer to use pkg-config rather than cmake. In my case gmic in its multiple forms.

> On Feb 9, 2021, at 8:44 AM, Joël Brogniart <[hidden email]> wrote:
>
> Even if posts in the issus show workarounds, it also looks like opencv developers consider the use of pkg-config .pc files obsolete so I will do without.
>
>> Le 9 févr. 2021 à 14:43, Marius Schamschula <[hidden email]> a écrit :
>>
>> It looks like this is an open issue:
>>
>> https://github.com/opencv/opencv/issues/13154
>>
>> It looks like one can patch opencv4 to fix this issue.
>>
>> PS: I meant .pc not .po files.
>>
>>> On Feb 9, 2021, at 7:40 AM, Marius Schamschula <[hidden email]> wrote:
>>>
>>> pkg-config only works if the package generates .po files. cairo does, opencv does, but opencv4 does not.
>>>
>>>> On Feb 9, 2021, at 6:44 AM, Joël Brogniart <[hidden email]> wrote:
>>>>
>>>>
>>>> One should be able to obtain informations with pkg-config. ie. wiith cairo installed it works fine
>>>> pkg-config --cflags cairo
>>>> pkg-config --libs cairo
>>>> But not with opencv4.
>>>>
>>>> Joël
>>>>
>>>>> Le 9 févr. 2021 à 12:10, Marius Schamschula <[hidden email]> a écrit :
>>>>>
>>>>> I haven’t had time to look into that. I’m not the maintain of opencv4. For the moment I downgraded opencv to version 3.4.13.
>>>>>
>>>>>> On Feb 9, 2021, at 2:28 AM, Joël Brogniart <[hidden email]> wrote:
>>>>>>
>>>>>> I'm trying to adapt a portfile for a Linux application to depend on opencv4 instead of opencv. The building of the application use pkg-config to find directory, library et compiler settings for different tools (opencv, cairo…). This works correctly except for opencv.
>>>>>>
>>>>>> On Macports, the opencv4 port doesn't populate pkg-config data with its own information. Is there an explanation for the missing data?
>>>>>
>>>>> Marius
>>>>> --
>>>>> Marius Schamschula
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: pkg-config and opencv4

Marius Schamschula-3
I just opened a PR with the fix: https://github.com/macports/macports-ports/pull/9972

> On Feb 9, 2021, at 9:03 AM, Marius Schamschula <[hidden email]> wrote:
>
> Exactly my reading. However, there are many packages that depend on opencv/opencv4 that prefer to use pkg-config rather than cmake. In my case gmic in its multiple forms.
>
>> On Feb 9, 2021, at 8:44 AM, Joël Brogniart <[hidden email]> wrote:
>>
>> Even if posts in the issus show workarounds, it also looks like opencv developers consider the use of pkg-config .pc files obsolete so I will do without.
>>
>>> Le 9 févr. 2021 à 14:43, Marius Schamschula <[hidden email]> a écrit :
>>>
>>> It looks like this is an open issue:
>>>
>>> https://github.com/opencv/opencv/issues/13154
>>>
>>> It looks like one can patch opencv4 to fix this issue.
>>>
>>> PS: I meant .pc not .po files.
>>>
>>>> On Feb 9, 2021, at 7:40 AM, Marius Schamschula <[hidden email]> wrote:
>>>>
>>>> pkg-config only works if the package generates .po files. cairo does, opencv does, but opencv4 does not.
>>>>
>>>>> On Feb 9, 2021, at 6:44 AM, Joël Brogniart <[hidden email]> wrote:
>>>>>
>>>>>
>>>>> One should be able to obtain informations with pkg-config. ie. wiith cairo installed it works fine
>>>>> pkg-config --cflags cairo
>>>>> pkg-config --libs cairo
>>>>> But not with opencv4.
>>>>>
>>>>> Joël
>>>>>
>>>>>> Le 9 févr. 2021 à 12:10, Marius Schamschula <[hidden email]> a écrit :
>>>>>>
>>>>>> I haven’t had time to look into that. I’m not the maintain of opencv4. For the moment I downgraded opencv to version 3.4.13.
>>>>>>
>>>>>>> On Feb 9, 2021, at 2:28 AM, Joël Brogniart <[hidden email]> wrote:
>>>>>>>
>>>>>>> I'm trying to adapt a portfile for a Linux application to depend on opencv4 instead of opencv. The building of the application use pkg-config to find directory, library et compiler settings for different tools (opencv, cairo…). This works correctly except for opencv.
>>>>>>>
>>>>>>> On Macports, the opencv4 port doesn't populate pkg-config data with its own information. Is there an explanation for the missing data?
>>>>>>
>>>>>> Marius
>>>>>> --
>>>>>> Marius Schamschula
>>>>
>>>
>>
>

Marius
--
Marius Schamschula