[poppler] Requires.private field missing in poppler.pc

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Thu Mar 22 07:53:49 UTC 2018


Dear Jeroen,

Please check https://github.com/mpsuzuki/poppler/tree/for-travis whether it can 
serve for you.
The changeset (done before the workaround before Simon's issue) is here: 
https://github.com/mpsuzuki/poppler/compare/master...4f678f9

This changeset classifies the packages into 2 groups. The group which pkg-config 
is always reliable, we can put the dependency to Requires.private. Another group 
which pkg-config is not always reliable, we have to check pkg-config is valid, 
and if not, we have to put the dependency to Libs.private.
The packages I assumed pkg-config always give the correct infos are: fontconfig, 
curl, zlib, lcms2, libopenjp2, nss
The packages I cared for the possibility of multiple pkg-config package, or, no 
pkg-config cases are: jpeg, tiff, png

At present, to check the pkg-config info is identical with cmake's info, I 
compare the directory of the library, and the basename of the library. 
Unfortunately, it does not try to resolve the symbolic linked shared library 
(e.g. if libpng.so is linked to libpng16.so, this patch misunderstands as "-lpng 
is different from libpng16.so" - therefore, Libs.private is used, although using 
Requires.private would be more smart).

Regards,
mpsuzuki

suzuki toshiya wrote:
>> Therefore, it would
>> be considerable to discuss cairo in poppler-glib.pc,
> 
> oh, poppler-glib.pc defines cairo dependency explicitly.
> sorry for overlooking that.
> 
> Regards,
> mpsuzuki
> 
> 
> suzuki toshiya wrote:
>> Dear Jeroen,
>>
>> Indeed, some tweaks for poppler.pc and poppler-cpp.pc are
>> expected, but cairo is not in there.
>>
>> There is CairoOutputDev which is dependent with cairo,
>> but libpoppler does not include it. The object files for
>> CairoOutputDev are directly linked (not via any library)
>> to pdftocairo and libpoppler-glib. Therefore, it would
>> be considerable to discuss cairo in poppler-glib.pc,
>> but no need for poppler.pc and poppler-cpp.pc.
>>
>> I would try to propose some patch.
>>
>> Regards,
>> mpsuzuki
>>
>> Albert Astals Cid wrote:
>>> El dimarts, 20 de març de 2018, a les 18:57:32 CET, Jeroen Ooms va escriure:
>>>> Currently pkg-config does not correctly list the dependency libs for
>>>> static linking when running with --static:
>>>>
>>>>   pkg-config --libs --static poppler-cpp
>>>>     -lpoppler-cpp -lpoppler
>>>>
>>>> The output of --static should also include the recursive dependencies
>>>> such as -lcairo -llcms2 -lopenjp2 -ltiff. For comparsion try
>>>> 'pkg-config --libs libcurl' with and without --static'.
>>>>
>>>> I think to resolve this, cmake should add a line like this to the
>>>> poppler.pc file:
>>>>
>>>>   Requires.private: cairo
>>> Side note, afaik we don't link cairo to poppler core at all.
>>>
>>>> Or alternatively hardcode dependency linker flags in Libs.private
>>>> field in poppler.pc:
>>>>
>>>>   Libs.private: -lcairo -lz -lgobject-2.0 -lffi -lglib-2.0 -lintl
>>>> -lpcre -lintl -liconv -lpcre -lpixman-1 -lfontconfig -lexpat
>>>> -lfreetype -lz -lbz2 -lpng16 -lz
>>>>
>>>> And possibly other dependencies that poppler was configured with.
>>>> However I am not sure how to implement this but I think it should be
>>>> an option in cmake.
>>> As previously stated, personally i don't really care about static linking, so 
>>> patches welcome.
>>>
>>> Cheers,
>>>   Albert
>>>
>>>> Thank you!
>>>> _______________________________________________
>>>> poppler mailing list
>>>> poppler at lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/poppler
>>>
>>>
>>> _______________________________________________
>>> poppler mailing list
>>> poppler at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/poppler
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/poppler
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler



More information about the poppler mailing list