JuliaGraphics / CairoBuilder

Builder for Cairo binaries
MIT License
0 stars 4 forks source link

Progress #1

Open SimonDanisch opened 6 years ago

SimonDanisch commented 6 years ago

Optional:

Currently fails with:

[18:01:57] checking whether cairo's PostScript surface backend feature could be enabled... no (requires zlib http://www.gzip.org/zlib/)
[18:01:57] configure: error: recommended PostScript surface backend feature could not be enabled

This seems to be due to an error in the config script, that doesn't pick up zlib correctly, even though it's present and correctly picked up by the png library.

The relevant piece in the config file:

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5

$as_echo_n "checking for compress in -lz... " >&6; }

if ${ac_cv_lib_z_compress+:} false; then :

 $as_echo_n "(cached) " >&6

else

 ac_check_lib_save_LIBS=$LIBS

LIBS="-lz  $LIBS"

cat confdefs.h - <<_ACEOF >conftest.$ac_ext

/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.

  Use char because int might match the return type of a GCC

  builtin and then its argument prototype would still apply.  */

#ifdef __cplusplus

extern "C"

#endif

char compress ();

int

main ()
{
return compress ();
 ;
 return 0;

}

_ACEOF

if ac_fn_c_try_link "$LINENO"; then :

 ac_cv_lib_z_compress=yes

else

 ac_cv_lib_z_compress=no

fi

rm -f core conftest.err conftest.$ac_objext \

   conftest$ac_exeext conftest.$ac_ext

LIBS=$ac_check_lib_save_LIBS

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5

$as_echo "$ac_cv_lib_z_compress" >&6; }

if test "x$ac_cv_lib_z_compress" = xyes; then :

 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"

if test "x$ac_cv_header_zlib_h" = xyes; then :

      have_libz=yes

$as_echo "#define HAVE_ZLIB 1" >>confdefs.h

else

 have_libz="no (requires zlib http://www.gzip.org/zlib/)"

fi

else

 have_libz="no (requires zlib http://www.gzip.org/zlib/)"

fi
SimonDanisch commented 6 years ago

@staticfloat, this is probably the most actionable problem I run into! You're bash knowledge would be much appreciated here :)

staticfloat commented 6 years ago

What does the config.log file say? Is it unable to find -lz?

SimonDanisch commented 6 years ago

Yup! Is that a binary artifact zlibbuilder isn't shipping?

staticfloat commented 6 years ago

It is shipping it. For some reason it’s not getting found. Hmmm. Can you post the compiler invocation from config.log

SimonDanisch commented 6 years ago

here is the whole file: config.log

staticfloat commented 6 years ago

I'm not sure why, but their configure script doesn't auto-include $prefix/lib and $prefix/include within the default LDFLAGS and CPPFLAGS. I consider that a buildsystem bug, but you can work around it by adding the following to your ./configure invocation:

LDFLAGS="-L$prefix/lib" CPPFLAGS="-I$prefix/include" ./configure <args...>

With that added in, I am able to compile and install cairo (at least, for x86_64-linux-gnu). Congrats. That's actually quite the milestone.

SimonDanisch commented 6 years ago

Oh boy, easiest trick in the book :D I build so many configure based packages lately, that I simply couldn't believe something easy like that could cut it^^ Anyways, thanks a lot, and congratulation to the growing maturity of the cross compile platform :) Should we try to build Pixman on the other platforms as well? All other dependencies are already build for all platforms I think!

staticfloat commented 6 years ago

Your wish is my command: https://github.com/staticfloat/PixmanBuilder/releases/tag/v0.34.0-1

bjarthur commented 5 years ago

re. fontconfig... i've been working on it. have got most of it's dependencies built so far:

https://github.com/bjarthur/GperfBuilder https://github.com/bjarthur/UtilLinuxBuilder https://github.com/bjarthur/ExpatBuilder

combined with https://github.com/JuliaGraphics/FreeTypeBuilder

problem i'm running in to is that uuid.h is not included as a product in util-linux:

  CC       test_hash-test-hash.o
In file included from test-hash.c:1:0:
../src/fchash.c:24:23: fatal error: uuid/uuid.h: No such file or directory
 #include <uuid/uuid.h>
                       ^
compilation terminated.

google says i need the devel version of util-linux to build fontconfig. i see there is a FileProduct in the wizard source code, but have yet to figure out how to modify my build_tarballs.jl file to include all the header files.

staticfloat commented 5 years ago

This is great progress, thanks for chipping away at this @bjarthur!

I ran your UtilLinuxBuilder locally to see if I could figure out what was going on, and I discovered two things. First, that the build fails locally for me (due to it trying to use /bin/chgrp); I worked around that by adding the following at the top of your bash script:

# Disable chgrp
rm /bin/chgrp
echo > /bin/chgrp
chmod +x /bin/chgrp

The second was that include/uuid/uuid.h was indeed included in the build. So perhaps you are somehow getting an incomplete build?

staticfloat commented 5 years ago

I have opened an issue on the BB main repo to disable chgrp globally as it will never work inside our environment; we build in an environment that only has one user and only has one group.

bjarthur commented 5 years ago

https://github.com/bjarthur/FontconfigBuilder

linux-gnu only for now, but will chip away at support for the rest of the platforms...

IanButterworth commented 5 years ago

Given the Cario.jl MacOS issue is persisting, we were just discussing what's holding back CairoBuilder in the slack #BinaryBuilder channel.

Is above still a fair representation of progress and roadblocks?

cc. @giordano @ararslan