pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56004: print/poppler: [macOS Big Sur] fails to build due to not being able to locate freetype2 headers/libs in .buildlink dir



>Number:         56004
>Category:       pkg
>Synopsis:       print/poppler: [macOS Big Sur] fails to build due to not being able to locate freetype2 headers/libs in .buildlink dir
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 21 23:15:01 +0000 2021
>Originator:     Dean Matzkov
>Release:        pkgsrc-2020Q4
>Organization:
>Environment:
Darwin MBP.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
>Description:
When attempting to build graphics/poppler on macOS Big Sur, the build fails due to not being able to locate ft2build.h:

---SNIP---
[ 76%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFontEngine.cc.o
/Volumes/Devel/pkgscrc_stuff/work/2020Q4/print/poppler/work.x86_64/poppler-20.11.0/splash/SplashFTFont.cc:30:10: fatal error: 'ft2build.h' file not found
#include <ft2build.h>
         ^~~~~~~~~~~~
1 error generated.
---/SNIP---


I don't know much about how the BuildLink framework works, so I can only speculate, but this seems to be because the pkgsrc build system elected to use the macOS-supplied headers and *.dylib files (commonly found in /opt/X11) but for some reason did not place symlinks for them in $WORK/.buidlink/{include,lib}.

Manually creating symlinks of the relevant files in /opt/X11/include/freetype/ and /opt/X11/lib/libfreetype.dylib and placing them into $WORK/.buildlink/{include,lib} fixed the build for me and allowed poppler to install successfully, with libpoppler.dylib indeed being linked against /opt/X11/lib/libfreetype.6.dylib.



Here are some snippets from the CMake configure phase and .configure_makevars.mk:


CMake configure:
---SNIP---
- Found Freetype: /opt/pkg/lib/libfreetype.dylib (found version "2.10.4")
-- Checking for module 'fontconfig'
--   Package 'freetype2', required by 'fontconfig', not found
-- Found Fontconfig: /Volumes/Devel/pkgscrc_stuff/work/2020Q4/print/poppler/work.x86_64/.buildlink/lib/libfontconfig.dylib
-- Found JPEG: /Volumes/Devel/pkgscrc_stuff/work/2020Q4/print/poppler/work.x86_64/.buildlink/lib/libjpeg.dylib (found version "80")
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Found PNG: /Volumes/Devel/pkgscrc_stuff/work/2020Q4/print/poppler/work.x86_64/.buildlink/lib/libpng16.dylib (found version "1.4.12")
-- Found TIFF: /Volumes/Devel/pkgscrc_stuff/work/2020Q4/print/poppler/work.x86_64/.buildlink/lib/libtiff.dylib (found version "4.0.8")
-- Checking for module 'nss>=3.19'
--   Found nss, version 3.60.0
-- Found NSS3: nss3;smime3;ssl3;softokn3;nssutil3;plds4;plc4;nspr4;pthread
-- Package Qt6Core or Qt6Gui or Qt6Widgets or Qt6Test not found
-- Checking for module 'cairo>=1.10.0'
--   Found cairo, version 1.16.0
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'freetype2', required by 'fontconfig', not found
Package 'freetype2', required by 'cairo', not found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'freetype2', required by 'fontconfig', not found
Package 'freetype2', required by 'cairo', not found
---/SNIP---



.configure_makevars.mk:
---SNIP---
_MAKEVARS_MK=	defined

BUILDLINK_PREFIX.freetype2=	/opt/X11
BUILTIN_PKG.freetype2=	freetype2-2.10.4
H_FREETYPE2=	/opt/X11/include/freetype2/freetype/freetype.h
IS_BUILTIN.freetype2=	yes
PKG_BUILD_OPTIONS.freetype2=	
USE_BUILTIN.freetype2=	yes
---/SNIP---


I hope the information here is useful. Thanks. 
>How-To-Repeat:

>Fix:


Home | Main Index | Thread Index | Old Index