duc icon indicating copy to clipboard operation
duc copied to clipboard

Font issues on osx

Open turtlemonvh opened this issue 10 years ago • 11 comments

My installation process is listed in this gist: https://gist.github.com/turtlemonvh/09a79a810d485f18af19

I have cairo installed, but the fonts are looking pretty strange.

duc

turtlemonvh avatar Oct 16 '15 15:10 turtlemonvh

The graph was produced with the following command:

sudo duc index ~
duc graph ~

turtlemonvh avatar Oct 16 '15 15:10 turtlemonvh

Well, that looks funny, but also kind of useless I guess. What version Mac OS are you running, and what are the --configure options you used?

zevv avatar Oct 16 '15 17:10 zevv

I'm on Yosemite 10.10.5 (14F27).

I tried configuring 2 ways

./configure --enable-x11=no
 # and
./configure --disable-opengl --disable-x11

Both game me the same result after building.

Thanks for the quick response!

turtlemonvh avatar Oct 16 '15 17:10 turtlemonvh

Hmm - may have found the issue. sudo dtruss -f -t open duc graph ~ gives the following:

71828/0x38fa13:  open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0)                = 3 0
71828/0x38fa13:  open("/usr/lib/dgagent/libpreload.dylib\0", 0x0, 0x0)           = 3 0
71828/0x38fa13:  open("/usr/local/opt/cairo/lib/libcairo.2.dylib\0", 0x0, 0x0)           = 3 0
71828/0x38fa13:  open("/usr/local/lib/libpango-1.0.0.dylib\0", 0x0, 0x0)                 = 3 0
71828/0x38fa13:  open("/usr/local/opt/glib/lib/libgobject-2.0.0.dylib\0", 0x0, 0x0)              = 3 0
71828/0x38fa13:  open("/usr/local/opt/glib/lib/libglib-2.0.0.dylib\0", 0x0, 0x0)                 = 3 0
71828/0x38fa13:  open("/usr/local/opt/gettext/lib/libintl.8.dylib\0", 0x0, 0x0)          = 3 0
71828/0x38fa13:  open("/usr/local/lib/libpangocairo-1.0.0.dylib\0", 0x0, 0x0)            = 3 0
71828/0x38fa13:  open("/usr/local/lib/libtokyocabinet.9.dylib\0", 0x0, 0x0)              = 3 0
71828/0x38fa13:  open("/usr/local/lib/libpixman-1.0.dylib\0", 0x0, 0x0)          = 3 0
71828/0x38fa13:  open("/usr/local/lib/libfontconfig.1.dylib\0", 0x0, 0x0)                = 3 0
71828/0x38fa13:  open("/usr/local/lib/libfreetype.6.dylib\0", 0x0, 0x0)          = 3 0
71828/0x38fa13:  open("/usr/local/lib/libpng16.16.dylib\0", 0x0, 0x0)            = 3 0
71828/0x38fa13:  open("/usr/local/opt/glib/lib/libgmodule-2.0.0.dylib\0", 0x0, 0x0)              = 3 0
71828/0x38fa13:  open("/usr/local/opt/glib/lib/libgthread-2.0.0.dylib\0", 0x0, 0x0)              = 3 0
71828/0x38fa13:  open("/usr/local/opt/libffi/lib/libffi.6.dylib\0", 0x0, 0x0)            = 3 0
71828/0x38fa13:  open("/usr/local/Cellar/pango/1.36.8_1/lib/libpangoft2-1.0.0.dylib\0", 0x0, 0x0)                = 3 0
71828/0x38fa13:  open("/usr/local/lib/libharfbuzz.0.dylib\0", 0x0, 0x0)          = 3 0
71828/0x38fa13:  open("/dev/dtracehelper\0", 0x2, 0x7FFF50BC50E0)                = 3 0
71828/0x38fa13:  open("/dev/dtracehelper\0", 0x2, 0x7FFF50BC50E0)                = 3 0
71828/0x38fa13:  open("/Users/timothy/.duc.db\0", 0x0, 0x1A4)            = 3 0
71828/0x38fa13:  open("/usr/local/bin/duc\0", 0x0, 0x1FF)                = 6 0
71828/0x38fa13:  open("/usr/share/icu/icudt53l.dat\0", 0x0, 0x0)                 = 6 0
71828/0x38fa13:  open("/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Resources/Info.plist\0", 0x0, 0x1B6)            = 6 0
71828/0x38fa13:  open("/usr/local/Cellar/pango/1.36.8_1/etc/pango/pangorc\0", 0x0, 0x0)          = -1 Err#2
71828/0x38fa13:  open("/Users/timothy/.config/pango/pangorc\0", 0x0, 0x0)                = -1 Err#2
71828/0x38fa13:  open("/.vol/16777220/9028848/duc/..namedfork/rsrc\0", 0x0, 0x1B6)               = 6 0
71828/0x38fa13:  open("/System/Library/Fonts/Helvetica.dfont\0", 0x0, 0x0)               = 6 0
71828/0x38fa13:  open("/System/Library/Frameworks/CoreText.framework/Resources/Info.plist\0", 0x0, 0x1B6)                = 6 0
71828/0x38fa13:  open("/System/Library/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist\0", 0x0, 0x1B6)                = 6 0
71828/0x38fa13:  open("/System/Library/Frameworks/Foundation.framework/Resources/Info.plist\0", 0x0, 0x1B6)              = 6 0
71828/0x38fa13:  open("/System/Library/Frameworks/Foundation.framework/Resources/en.lproj/DefaultLanguageOrder-OSX.plist\0", 0x0, 0x1B6)                 = 6 0
71828/0x38fa13:  open("/System/Library/Fonts/HelveticaNeueDeskInterface.ttc\0", 0x0, 0x0)                = 6 0
71828/0x38fa13:  open("/System/Library/Fonts/Apple Color Emoji.ttf\0", 0x0, 0x0)                 = 6 0
71828/0x38fa13:  open("/usr/local/Cellar/pango/1.36.8_1/lib/pango/1.8.0/modules/pango-basic-coretext.so\0", 0x0, 0x0)            = 6 0

Looks like an error loading the pango library.

Do you know what that may be from?

turtlemonvh avatar Oct 16 '15 21:10 turtlemonvh

Correction: those are just configuration files. But they are missing.

turtlemonvh avatar Oct 16 '15 21:10 turtlemonvh

Missing libraries usually result in binaries that do not load at all. As far as I know, the pangorc files are optional: libpango tries to read those for user-defined configuration, but should just work fine without.

Duc also has an OpenGL backend which uses an embedded hard coded font. The character set is limited (basically ASCII only), but is more portable without external dependencies. Could you try to build using the following ./configure options:

--enable-opengl --disable-x11

zevv avatar Oct 17 '15 04:10 zevv

Is this issue still relevant, or can I close it?

zevv avatar Mar 07 '16 07:03 zevv

@zevv Thanks for following up. I did try that command a few months ago but forgot to add the results.

I tested with --enable-opengl --disable-x11 again today but I'm still getting issues. The last few lines of output are below.

checking for PANGO... yes
checking for PANGOCAIRO... yes
checking for GLFW3... yes
checking for GL... no
configure: error:
The opengl library was not found, which is needed for opengl support. Either install
the opengl development libraries, or compile without opengl support (--disable-opengl)

It looks like duc can't find opengl, but I do see it listed on my system.

$ locate OpenGL | grep -v -i qt
...
/System/Library/Frameworks/OpenGL.framework
/System/Library/Frameworks/OpenGL.framework/Headers
/System/Library/Frameworks/OpenGL.framework/Libraries
/System/Library/Frameworks/OpenGL.framework/OpenGL
...
/usr/local/Cellar/cmake/3.2.3/share/cmake/Help/module/FindOpenGL.rst
/usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindOpenGL.cmake
...

Maybe the search path for the OpenGL header file needs to be different for OSX?

turtlemonvh avatar Mar 07 '16 16:03 turtlemonvh

I just tried switching over to 1.4.0 and using your recommended flags for configure, and now I'm seeing different types of errors.

Logfile: runtest.log.txt

And here's the current version of the script I'm using to install: https://gist.github.com/turtlemonvh/09a79a810d485f18af19/7eeebc6d1c830c2e4699c2860565614e87a4218a

When I run it without the --enable-opengl flag it gets quite a bit further.

Logfile: runtest_noopengl.log.txt

If OSX isn't something you care about too much, I'm fine with you closing this ticket. I can always just run it in a docker container and mount the host volumes I want to analyze.

turtlemonvh avatar Mar 07 '16 16:03 turtlemonvh

  • On 2016-03-07 17:38:50 +0100, Timothy wrote:

If OSX isn't something you care about too much, I'm fine with you closing this ticket. I can always just run it in a docker container and mount the host volumes I want to analyze.

It's not that I don't care, but not having easy access to an apple machine maintaining the Mac OS port is a bit a pain in the behind. I'll leave the ticket open and see if I can borrow a machine somewhere to fix things one day.

Thanks,

:wq ^X^Cy^K^X^C^C^C^C

zevv avatar Mar 07 '16 20:03 zevv

Alright, cool. I definitely appreciate your persistence!

turtlemonvh avatar Mar 07 '16 20:03 turtlemonvh