GNU bug report logs - #36758
27.0.50; Mac OS/Lucid/X11: crash with libharfbuzz

Previous Next

Package: emacs;

Reported by: Simon Leinen <simon.leinen <at> switch.ch>

Date: Mon, 22 Jul 2019 07:17:01 UTC

Severity: normal

Found in version 27.0.50

Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Simon Leinen <simon.leinen <at> switch.ch>
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 36758 <at> debbugs.gnu.org
Subject: bug#36758: 27.0.50; Mac OS/Lucid/X11: crash with libharfbuzz
Date: Mon, 22 Jul 2019 13:19:20 +0200
YAMAMOTO Mitsuharu writes:
>> This is the same version of libharfbuzz that my Emacs binary uses:
>> 
>> : leinen <at> macsl[leinen]; objdump -macho -dylibs-used /var/tmp/emacs/gbuild/src/emacs
> (snip)
>> /opt/X11/lib/libfreetype.6.dylib (compatibility version 19.0.0, current version 19.6.0)

> I noticed the versions of libfreetype are different between the test
> program and Emacs.

Ah, good point - I hadn't noticed that!

> What happens if you link the test program with the latter one using
> the environment variable DYLD_LIBRARY_PATH ?

>   $ DYLD_LIBRARY_PATH=/opt/X11/lib ./a.out

Unfortunately it is not that easy:

  : leinen <at> macsl[tmp]; DYLD_LIBRARY_PATH=/opt/X11/lib ./a.out
  dyld: Library not loaded: /usr/local/opt/freetype/lib/libfreetype.6.dylib
    Referenced from: /private/var/tmp/./a.out
    Reason: Incompatible library version: a.out requires version 24.0.0 or later, but libfreetype.6.dylib provides version 19.0.0
  Abort trap: 6

...but if I recompile the test program with -L/opt/X11/lib, then it
crashes:

  : leinen <at> macsl[tmp]; cc -g hb-ot-test.c -L/opt/X11/lib `pkg-config freetype2 harfbuzz --cflags --libs`
  : leinen <at> macsl[tmp]; objdump -macho -dylibs-used /var/tmp/a.out
  /var/tmp/a.out:
  	/opt/X11/lib/libfreetype.6.dylib (compatibility version 19.0.0, current version 19.6.0)
  	/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib (compatibility version 20504.0.0, current version 20504.0.0)
  	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
  : leinen <at> macsl[tmp]; ./a.out
  HarfBuzz Version: 2.5.3
  Segmentation fault: 11

So I guess all I have to do is make sure Emacs doesn't use the old
libfreetype in /opt/X11/lib, but rather the newer one in /usr/local/lib
(and hope that that one works in an X11 environment...)

I'll be in meetings for the next few hours, but will let you know what
happens once I find time to do the above.

Thanks a lot so far!!!

Cheers,
-- 
Simon.




This bug report was last modified 5 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.