Opened 5 years ago
Last modified 2 years ago
#60232 closed defect
gdk-pixbuf2 @2.40.0_1 +universal doesn't compile with jpeg and jasper — at Initial Version
Reported by: | someuser12 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | pending | Cc: | git@… |
Port: | gdk-pixbuf2 |
Description
Under Mac OS 10.13 and 10.11, while configuring gdk-pixbuf2
@2.40.0_1 with +universal
variant set, the build tool meson
tries to detect the libraries JPEG and jasper by launching clang on a minimal C program involving only proprocessor directives:
`Command line: /usr/bin/clang -I/opt/local/include /opt/local/var/macports/build /_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_po rts_graphics_gdk-pixbuf2/gdk-pixbuf2/work/build/meson-private/tmp9kj3a3pw/testfi le.c -pipe -E -P -Os -arch x86_64 -arch i386 -P -O0 -std=c99`
Since clang is launched with the flags -E -arch x86_64 -arch i386
, it fails with message clang: error: cannot use 'cpp-output' output with multiple -arch options
and meson concludes erroneously that the jpeg library is absent.
The same happens with jasper later on.
As a consequence, all software built again the resulting gdk-pixbuf2 (e.g. qiv) will be unable to load or display any JPEG file.
Ugly workaround:
sudo port extract gdk-pixbuf2 +x11+universal
- Manually edit
`port work gdk-pixbuf2`/gdk-pixbuf-2.40.0/meson.build
to replace, on line 312,cc.has_header('jpeglib.h')
with1==1
and, on line 363,cc.has_header('jasper/jasper.h')
withtrue
sudo port install gdk-pixbuf2
.
As a side note, meson (as of 0.54.0.rc1) misdetects Apple's clang version: https://github.com/mesonbuild/meson/issues/6253 .