Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 314925

Summary: app-text/poppler-0.12.4-r2 fails to compile in FreeBSD.
Product: Gentoo/Alt Reporter: Javier Villavicencio (RETIRED) <the_paya>
Component: FreeBSDAssignee: Ben de Groot (RETIRED) <yngwin>
Status: RESOLVED FIXED    
Severity: normal CC: bsd+disabled, prefix, printing
Priority: High    
Version: unspecified   
Hardware: All   
OS: FreeBSD   
URL: https://bugs.freedesktop.org/show_bug.cgi?id=27610
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Quick fix.

Description Javier Villavicencio (RETIRED) gentoo-dev 2010-04-13 03:47:10 UTC
Their CMake config is adding the define -D_XOPEN_SOURCE=500 which (at that version, 500) correctly leaves snprintf() undefined, according to the spec.
Given poppler is using that function (in poppler/Catalog.cc), the proper define should be -D_XOPEN_SOURCE=600.

Then they use strcasecmp() in 2 places, this is defined on <strings.h> (on both BSD and Linux), which isn't included there (poppler/GlobalParams.cc and test/perf-test.cc).
Comment 1 Javier Villavicencio (RETIRED) gentoo-dev 2010-04-13 03:49:36 UTC
Created attachment 227563 [details, diff]
Quick fix.

This patch fixes the compilation, but given they test for <strings.h> I'm not sending this one upstream just yet.
Comment 3 Javier Villavicencio (RETIRED) gentoo-dev 2010-04-25 17:38:14 UTC
Fixed in CVS with revbump: poppler-0.12.4-r3.