-
Notifications
You must be signed in to change notification settings - Fork 73
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
macOS build error - fontconfig.h file not found #135
Comments
Hi @joewiz ! If I remember well, on mac but for some reasons, the compiler you use is not looking at The solution then is to add |
so I think adding to
I also saw this possible solution: https://stackoverflow.com/a/26404710 note: I am not working on Mac, I can't reproduce/test/solution for the issue but I am aware of it ! |
@kermitt2 Thanks so much! I tried making your suggested change to CMakeLists.txt, but the same error appeared, even though I have the XCode Command Line Tools installed (via
After that, I'm able to call pdfalto:
Thank you so much! I've already converted my first PDF to ALTO with the utility, and the results look great (and much more usable than pdf2xml's output). Much appreciated! |
Thank you for the feedback ! I take the freedom to reopen the issue, I will try to add a MacOS-specific fix directly in the CMakeList file because this is a recurring issue now. I also put a reference to this issue in the readme for MacOS users. |
**Context** As per the [following issue](kermitt2/pdfalto#135), Mac users have been repeatedly encountering issues with `fontconfig.h` while running the `make` command. The proposed solution in the issue thread was to change the CMakeLists file. **Changes** This PR proposes another solution, which is to detect the Apple OS from the compiler macros, thereby changing the path to `fontconfig` based on the user's OS directly in the file where fontconfig is included.
Hello, I am using Windows 10 and receive the same error. I am using cygwin for creating the Makefile with cmake. I get the same error when running the
I tried the solutions proposed, like adding the line to the CMakeLists.txt file or the solution that worked for @joewiz, but I still receive the same error. |
So am I. Could you make succeed? |
For any users who still have this error, I had to change the paths from the solution above to be:
System: Apple M1 running MacOS Sonoma 14.3.1 |
same error on M2 chip (Macbook 14 - macOS 14.4.1 (23E224)). Tried every proposed option :(
` include <fontconfig/fontconfig.h> 1 error generated. make[2]: *** [xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/GlobalParams.cc.o] Error 1 make[1]: *** [xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/all] Error 2 make: *** [all] Error 2 |
This is normally fixed by exporting
|
I solved as explained in my last comment, I close this issue since it's old. Feel free to reopen should the issue still be occurring. |
After performing the build steps described in the README, I encountered the following error with the
make
command:Could anyone suggest a workaround for this issue?
I'm running macOS 12 on an Intel-based iMac, with the following versions of the required dependencies:
I'd be happy to provide any other needed information.
The text was updated successfully, but these errors were encountered: