-
Notifications
You must be signed in to change notification settings - Fork 8
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
Version 0.6.4 cannot find pgkconf and ft2build.h #35
Comments
I'm having a very similar problem, but on Cygwin. I even tried installing older versions of cairo2 (down to 0.6), but I got the same error everytime. In my Fedora, I have no issues with the installation, but when I try it on Cygwin I get the same error, but with a different command line:
I did manage to install cairo2 on previous Cygwin setups, so I don't know if my Cygwin changed versions, or if I had different installed packages. Actually, the beginning of the compilation message hints to
But it is there in my Cygwin (in Anyway, I'm adding this in case this helps tracking down the cause. Even if it is possible that the cause of my issue is unrelated to @stumbles' (with the same symptoms). I found this open issue related to dune-configurator which seems suspiciously similar, but it seems limited to Windows builds, so probably unrelated to @stumbles' actual issue. |
@maroneze, same here about not finding pkgconf even though the pathing is correct, else I would have seen tons of other apps failing to compile. |
Ok, after seeing this for the first time, I tried checking my I didn't need this in the past (I was able to compile cairo2 without issues), but for some reason now I do. |
For future reference (for me and others): something is still not 100% right in my Cygwin+MinGW setting, because even if I could install cairo2, I then had issues with lablgtk3. I finally managed to get it working by running:
But the fact that I had to manually set my |
On a side note, here is my current pkgconf pathing; PKG_CONFIG_PATH=/usr/lib/qt6/pkgconfig:/usr/lib/qt5/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig: Also here are the cairo related package configs installed by cairo on my system; /usr/lib/pkgconfig/cairo-fc.pc Is there some subtle bug in discover.ml I'm tripping over? |
/usr/bin/pkgconf is present, why it's not found by which isn't clear to me. Running which pkgconf from cli and the correct path is returned.
The more puzzling part is c-test-2 and why /usr/include/cairo/cairo-ft.h says it cannot find ft2build.h. That file is present in /usr/include/freetype2/. AFAICT all the pathing is correct. As a check, I looked into for example grub2 and it finds ft2build.h with no problems.
pkgconf --cflags /usr/lib/pkgconfig/cairo-ft.pc returns;
-I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
pkgconf --libs /usr/lib/pkgconfig/cairo-ft.pc returns;
-lcairo -lfreetype
pkgconf --cflags /usr/lib/pkgconfig/cairo-fc.pc returns;
-I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
pkgconf --libs /usr/lib/pkgconfig/cairo-fc.pc returns;
-lcairo -lfontconfig -lfreetype
Running; dune build -p cairo2
File "src/dune", line 12, characters 0-132:
12 | (rule
13 | (targets c_flags.sexp c_library_flags.sexp cairo_ocaml.h)
14 | (deps cairo_ocaml.h.p)
15 | (action (run ../config/discover.exe)))
(cd _build/default/src && ../config/discover.exe)
which: /usr/bin/pkgconf
-> not found
compiling c program:
| #include <stdio.h>
| #include <cairo.h>
|
|
| #define DUNE_ABS(x) ((x >= 0)? x: -(x))
| #define DUNE_D0(x) ('0'+(DUNE_ABS(x)/1 )%10)
| #define DUNE_D1(x) ('0'+(DUNE_ABS(x)/10 )%10), DUNE_D0(x)
| #define DUNE_D2(x) ('0'+(DUNE_ABS(x)/100 )%10), DUNE_D1(x)
| #define DUNE_D3(x) ('0'+(DUNE_ABS(x)/1000 )%10), DUNE_D2(x)
| #define DUNE_D4(x) ('0'+(DUNE_ABS(x)/10000 )%10), DUNE_D3(x)
| #define DUNE_D5(x) ('0'+(DUNE_ABS(x)/100000 )%10), DUNE_D4(x)
| #define DUNE_D6(x) ('0'+(DUNE_ABS(x)/1000000 )%10), DUNE_D5(x)
| #define DUNE_D7(x) ('0'+(DUNE_ABS(x)/10000000 )%10), DUNE_D6(x)
| #define DUNE_D8(x) ('0'+(DUNE_ABS(x)/100000000 )%10), DUNE_D7(x)
| #define DUNE_D9(x) ('0'+(DUNE_ABS(x)/1000000000)%10), DUNE_D8(x)
| #define DUNE_SIGN(x) ((x >= 0)? '0': '-')
|
|
| const char s0[] = {
| 'B', 'E', 'G', 'I', 'N', '-', '0', '-',
| DUNE_SIGN((CAIRO_VERSION_MAJOR)),
| DUNE_D9((CAIRO_VERSION_MAJOR)),
| '-', 'E', 'N', 'D'
| };
|
|
| const char s1[] = {
| 'B', 'E', 'G', 'I', 'N', '-', '1', '-',
| DUNE_SIGN((CAIRO_VERSION_MINOR)),
| DUNE_D9((CAIRO_VERSION_MINOR)),
| '-', 'E', 'N', 'D'
| };
|
run: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -g -fno-omit-frame-pointer -fPIC -O2 -march=native -pipe -Wp,-D_FORTIFY_SOURCE=2 -I/usr/include/cairo -I /usr/lib/ocaml -o /tmp/build_cf88f1_dune/ocaml-configuratord1e6f8/c-test-0/test.o -c /tmp/build_cf88f1_dune/ocaml-configuratord1e6f8/c-test-0/test.c -lm -lpthread
-> process exited with code 0
-> stdout:
-> stderr:
compiling c program:
| #include <stdio.h>
| #include <cairo-ft.h>
|
|
| #ifdef CAIRO_HAS_FT_FONT
| const char *s0 = "BEGIN-0-true-END";
| #else
| const char *s0 = "BEGIN-0-false-END";
| #endif
|
|
| #ifdef CAIRO_HAS_FC_FONT
| const char *s1 = "BEGIN-1-true-END";
| #else
| const char *s1 = "BEGIN-1-false-END";
| #endif
|
run: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -g -fno-omit-frame-pointer -fPIC -O2 -march=native -pipe -Wp,-D_FORTIFY_SOURCE=2 -I/usr/include/cairo -I /usr/lib/ocaml -o /tmp/build_cf88f1_dune/ocaml-configuratord1e6f8/c-test-2/test.o -c /tmp/build_cf88f1_dune/ocaml-configuratord1e6f8/c-test-2/test.c -lm -lpthread
-> process exited with code 1
-> stdout:
-> stderr:
| In file included from /tmp/build_cf88f1_dune/ocaml-configuratord1e6f8/c-test-2/test.c:2:
| /usr/include/cairo/cairo-ft.h:46:10: fatal error: ft2build.h: No such file or directory
| 46 | #include <ft2build.h>
| | ^~~~~~~~~~~~
| compilation terminated.
Error: failed to compile program
The text was updated successfully, but these errors were encountered: