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

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Wed Mar 21 02:35:48 UTC 2018


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



More information about the poppler mailing list