Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg-config also required for install on macOS #128

Open
cjyetman opened this issue Oct 9, 2023 · 2 comments
Open

pkg-config also required for install on macOS #128

cjyetman opened this issue Oct 9, 2023 · 2 comments

Comments

@cjyetman
Copy link

cjyetman commented Oct 9, 2023

While trying to install {pdftools} on macOS (ARM64), I ran into problems, even after manually installing poppler with brew install poppler. I was getting the following error message

--------------------------- [ANTICONF] --------------------------------
Configuration failed to find 'poppler-cpp' system library. Try installing:
 * rpm: poppler-cpp-devel (Fedora, CentOS, RHEL)
 * brew: poppler (MacOS)
 * deb: libpoppler-cpp-dev (Debian, Ubuntu, etc)
 * On Ubuntu 16.04 or 18.04 use this PPA:
    sudo add-apt-repository -y ppa:cran/poppler
    sudo apt-get update
    sudo apt-get install -y libpoppler-cpp-dev
If poppler-cpp is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a poppler-cpp.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: 'poppler-document.h' file not found
#include <poppler-document.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
--------------------------------------------------------------------

which seems to assume one already has pkg-config installed but not correctly configured, but I did not have pkg-config installed (nor know what it is frankly). Ultimately, this was easily resolved by running brew install pkg-config poppler.

Maybe this is all obvious to some, but it wasn't to me and took quite some time to figure out and I did not find this suggested anywhere on the www, so maybe this could be useful to document somewhere?

@jeroen
Copy link
Member

jeroen commented Oct 9, 2023

Thanks, yes we sort of assume a full dev environment, including compilers, make, and pkg-config. But on MacOS most uses will be using precompiled binaries anyway. Are you not using the official R distribution?

@cjyetman
Copy link
Author

cjyetman commented Oct 9, 2023

I'm using Posit Package Manager, which currently does not have binaries for macOS/R4.3
https://packagemanager.posit.co/client/#/repos/cran/packages/overview?search=pdftools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants