Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552508 - =app-text/acroread-9.5.5-r3: doesn't start
Summary: =app-text/acroread-9.5.5-r3: doesn't start
Status: RESOLVED DUPLICATE of bug 559258
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-19 02:09 UTC by Sasha Medvedev
Modified: 2016-03-08 14:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Backtrace when launching with a $HOME in a big XFS partition. (test,24.80 KB, text/plain)
2015-10-11 21:02 UTC, Jorge Nerin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sasha Medvedev 2015-06-19 02:09:13 UTC
I use acroread only occasionally (for forms, etc.) but it doesn't start any more I think after I switched to multilib. More precisely acroread seems to start but I don't see any gui window. However there is some output for command line options like -v or -help. I have no idea how I can debug it since after additionally compiling libcanberra and x11-themes/gtk-engines with 32-bit abi I have no error/warning messages at all.

I use ABI_X86_32 only if it required by 32-bit app like skype or wine. They works fine for me.

Reproducible: Always
Comment 1 Adam Feldman gentoo-dev 2015-06-19 03:13:46 UTC
Can you attach "emerge --info app-text/acroread" please?

Also, if you launch acroread via the command line, can you paste whatever terminal output there is?
Comment 2 Sasha Medvedev 2015-06-19 03:20:34 UTC
This is the problem: I don't have any output. Here is an output of 
bash -x /opt/bin/acroread

+ ver=9.5.5
+ '[' '' = -version ']'
++ cut -d. -f1
++ echo 9.5.5
+ majorRelease=9.0
++ /bin/pwd
+ cwd=/home/sasha
+ '[' -h /opt/bin/acroread ']'
++ readlink /opt/bin/acroread
+++ /bin/pwd
++ OLDPWD=/home/sasha
++ lfile=/opt/bin/acroread
++ '[' -h /opt/bin/acroread -a -f /opt/bin/acroread ']'
+++ dirname /opt/bin/acroread
++ CWD=/opt/bin
+++ expr /opt/bin : '\.\.'
++ '[' 0 = 2 ']'
+++ basename /opt/bin/acroread
++ lfile=acroread
++ cd /opt/bin
+++ /bin/ls -l acroread
+++ sed 's/^.*-> *\(.*\) *$/\1/'
++ lfile=/opt/Adobe/Reader9/bin/acroread
++ '[' -h /opt/Adobe/Reader9/bin/acroread -a -f /opt/Adobe/Reader9/bin/acroread ']'
++ '[' -f /opt/Adobe/Reader9/bin/acroread ']'
+++ dirname /opt/Adobe/Reader9/bin/acroread
++ CWD=/opt/Adobe/Reader9/bin
+++ basename /opt/Adobe/Reader9/bin/acroread
++ lfile=acroread
+++ expr /opt/Adobe/Reader9/bin : '\.\.'
++ '[' 0 = 2 ']'
++ cd /opt/Adobe/Reader9/bin
+++ /bin/pwd
++ echo /opt/Adobe/Reader9/bin/acroread
++ cd /opt/bin
++ return 0
+ ScriptVariable=/opt/Adobe/Reader9/bin/acroread
++ dirname /opt/Adobe/Reader9/bin/acroread
+ ScriptDirectory=/opt/Adobe/Reader9/bin
++ dirname /opt/Adobe/Reader9/bin
+ install_dir=/opt/Adobe/Reader9/Reader
+ '[' '' '!=' set -a '(' '' = set -o '' = set -o '' = set ')' ']'
+ '[' -z /home/sasha -o '!' -d /home/sasha ']'
+ '[' /home/sasha -a -d /home/sasha ']'
++ cd /
++ cd /home/sasha
++ /bin/pwd
+ '[' /home/sasha = /home/sasha ']'
+ cwd=/home/sasha
+ PWD=/home/sasha
+ export PWD
+ arg0=/opt/bin/acroread
+ '[' /opt/bin/acroread ']'
+ case "$arg0" in
+ ACRO_ARG0=/opt/bin/acroread
+ export ACRO_ARG0
+ test_install_dir /opt/Adobe/Reader9/Reader
++ cat /opt/Adobe/Reader9/Reader/AcroVersion
+ '[' 9.5.5 = 9.5.5 ']'
+ return 0
+ ACRO_INSTALL_DIR=/opt/Adobe/Reader9/Reader
+ export ACRO_INSTALL_DIR
++ uname -s
+ os_name=Linux
++ uname -r
+ os_release=4.0.5-gentoo-V4
+ case "$os_name" in
+ ACRO_CONFIG=intellinux
+ export ACRO_CONFIG
+ '[' -z intellinux ']'
+ '[' -x /usr/bin/test ']'
+ TestCmd=/usr/bin/test
+ /usr/bin/test -e .
+ TestCmdOption=-e
+ ACRO_ENABLE_FONT_CONFIG=1
+ export ACRO_ENABLE_FONT_CONFIG
+ '[' -f /opt/Adobe/Reader9/Reader/GlobalPrefs/mozilla_config ']'
+ greConfigFile=/home/sasha/.adobe/Acrobat/9.0/Preferences/acrogre.conf
+ '[' -f /home/sasha/.adobe/Acrobat/9.0/Preferences/acrogre.conf ']'
+ for i in /etc/gre.d/gre.conf /etc/gre.d/firefox.conf /etc/gre.d/mozilla.conf '/etc/gre.d/*.conf' /etc/gre.conf
+ '[' -f /etc/gre.d/gre.conf ']'
+ for i in /etc/gre.d/gre.conf /etc/gre.d/firefox.conf /etc/gre.d/mozilla.conf '/etc/gre.d/*.conf' /etc/gre.conf
+ '[' -f /etc/gre.d/firefox.conf ']'
+ for i in /etc/gre.d/gre.conf /etc/gre.d/firefox.conf /etc/gre.d/mozilla.conf '/etc/gre.d/*.conf' /etc/gre.conf
+ '[' -f /etc/gre.d/mozilla.conf ']'
+ for i in /etc/gre.d/gre.conf /etc/gre.d/firefox.conf /etc/gre.d/mozilla.conf '/etc/gre.d/*.conf' /etc/gre.conf
+ '[' -f '/etc/gre.d/*.conf' ']'
+ for i in /etc/gre.d/gre.conf /etc/gre.d/firefox.conf /etc/gre.d/mozilla.conf '/etc/gre.d/*.conf' /etc/gre.conf
+ '[' -f /etc/gre.conf ']'
+ '[' -z '' ']'
++ gconftool-2 -g /desktop/gnome/url-handlers/http/command
++ cut -d ' ' -f1
+ MozPath=/usr/lib64/firefox/firefox
+ '[' -x /usr/lib64/firefox/firefox ']'
+ '[' -n /usr/lib64/firefox/firefox ']'
+ '[' -n '' ']'
+ /usr/bin/test -e /libxul.so
+ ADOBE_USER_PREFERENCES=/home/sasha/.adobe/Acrobat/9.0/Preferences
+ export ADOBE_USER_PREFERENCES
+ MOZILLA_FIVE_HOME=
+ export MOZILLA_FIVE_HOME
+ LIB_NSPR_PATH=/usr/lib/mps/
+ ACRO_LD_LIBRARY_PATH=
+ export ACRO_LD_LIBRARY_PATH
+ case "$ACRO_CONFIG" in
++ prepend /opt/Adobe/Reader9/Reader/intellinux/lib:/opt/Adobe/Reader9/Reader/intellinux/sidecars: ''
++ '[' -z '' -o '' = /opt/Adobe/Reader9/Reader/intellinux/lib:/opt/Adobe/Reader9/Reader/intellinux/sidecars: ']'
++ echo /opt/Adobe/Reader9/Reader/intellinux/lib:/opt/Adobe/Reader9/Reader/intellinux/sidecars:
+ LD_LIBRARY_PATH=/opt/Adobe/Reader9/Reader/intellinux/lib:/opt/Adobe/Reader9/Reader/intellinux/sidecars:
+ export LD_LIBRARY_PATH
++ basename /opt/Adobe/Reader9/Reader
+ directory=Reader
+ '[' Reader = Reader ']'
+ cmd=acroread
+ prod='Adobe Reader'
+ ACRO_EXEC_CMD=/opt/Adobe/Reader9/Reader/intellinux/bin/acroread
+ SYNCAPP_EXEC_CMD=/opt/Adobe/Reader9/Reader/intellinux/bin/SynchronizerApp
+ export SYNCAPP_EXEC_CMD
+ export ACRO_EXEC_CMD
+ ACRO_RES_DIR=/opt/Adobe/Reader9/Reader/../Resource
+ export ACRO_RES_DIR
+ ACRO_LANG=ENU
+ export ACRO_LANG
+ ADOBE_HELP_PATH=/opt/Adobe/Reader9/Reader/../../..
+ export ADOBE_HELP_PATH
+ '[' -n '' ']'
+ Which gconftool-2
+ OLD_IFS=' 	
'
+ IFS=:
+ status=1
+ for i in '$PATH'
+ '[' -x /usr/local/bin/gconftool-2 ']'
+ for i in '$PATH'
+ '[' -x /usr/bin/gconftool-2 ']'
+ echo /usr/bin/gconftool-2
+ status=0
+ break
+ IFS=' 	
'
+ return 0
++ gconftool-2 -g /desktop/gnome/interface/accessibility
+ ACRO_AT_ACTIVE=
+ export ACRO_AT_ACTIVE
+ '[' intellinux = intellinux ']'
++ which realplay
+ ARG0=
+ '[' '' = true ']'
+ '[' '' = -installCertificate ']'
+ PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.4:/opt/android-sdk-update-manager/tools:/opt/android-sdk-update-manager/platform-tools:/usr/games/bin:/sbin:/usr/sbin:/usr/local/sbin:/opt/Adobe/Reader9/Reader/intellinux/bin
+ export PATH
+ rm -rf /home/sasha/.adobe/Acrobat/9.0/Preferences/mozilla
+ mkdir -p /home/sasha/.adobe/Acrobat/9.0/Preferences/mozilla
+ cp -f /opt/Adobe/Reader9/Reader/intellinux/mozilla/prefs.js /home/sasha/.adobe/Acrobat/9.0/Preferences/mozilla/prefs.js
+ '[' '' = -DEBUG ']'
+ '[' -f /opt/Adobe/Reader9/Reader/intellinux/bin/acroread ']'
+ LaunchBinary /opt/Adobe/Reader9/Reader/intellinux/bin/acroread
+ exec /opt/Adobe/Reader9/Reader/intellinux/bin/acroread
Comment 3 Thomas Capricelli 2015-06-25 14:22:08 UTC
Same problem here, here's the output


---------------------------------------------------------------
orzel@berlioz /home/orzel/Downloads% acroread ete2015.ps

(acroread:23461): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",

(acroread:23461): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",
---------------------------------------------------------------

Nothing worth noting actually. It was already outputting those warnings before. No window is created, it's just that ... nothing happens.
Comment 4 Roger 2015-08-14 02:28:36 UTC
Try executing "/opt/Adobe/Reader9/Reader/intellinux/bin/acroread" directly and pasting the output here.

Also try the following if nothing useful is printed to stdout:

$ gdb /opt/Adobe/Reader9/Reader/intellinux/bin/acroread
Type "run"
Type "bt"
And paste output


If all else fails, and usually does with binaries or if you always have bad luck like I do:
$ strace /opt/Adobe/Reader9/Reader/intellinux/bin/acroread
Comment 5 Roger 2015-08-14 02:40:10 UTC
OK. I think I failed on the last post.
Comment 6 Roger 2015-10-09 02:37:07 UTC
Let's retry debugging this bug.

Open the /opt/Adobe/Reader9/bin/acroread with your favorite editor and go to the bottom of this script file.

You're looking for the lines with $ACRO_EXEC_CMD.  Prefix this variable as I did below with "gdb".  (Also make sure you have gdb installed!)

There will be two places where $ACRO_EXEC_CMD can be executed, with the other being apparently a fallback method.

exec ${1+"$@"} gdb "$ACRO_EXEC_CMD"
LaunchBinary gdb "$ACRO_EXEC_CMD" ${1+"$@"}

Then execute /opt/Adobe/Reader9/bin/acroread, which will dump you to a gdb command shell.  From here type "run" and once acroread fails to run, type "bt"

Paste the backtrace here.
Comment 7 Thomas Capricelli 2015-10-10 11:56:49 UTC
Did it as you said, here's the bt:


(gdb) run
Starting program: /opt/Adobe/Reader9/Reader/intellinux/bin/acroread 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
b
(acroread:6888): Gtk-WARNING **: Impossibile trovare il motore del tema in module_path: «oxygen-gtk»,

(acroread:6888): Gtk-WARNING **: Impossibile trovare il motore del tema in module_path: «oxygen-gtk»,
t

Program received signal SIGSEGV, Segmentation fault.
0xf31ea37a in FT_Outline_Get_CBox () from /usr/lib32/libfreetype.so.6
(gdb) bt
#0  0xf31ea37a in FT_Outline_Get_CBox () from /usr/lib32/libfreetype.so.6
#1  0xf3208202 in ?? () from /usr/lib32/libfreetype.so.6
#2  0xf31ed95a in FT_Load_Glyph () from /usr/lib32/libfreetype.so.6
#3  0xf35e91bd in _cairo_ft_scaled_glyph_init () from /usr/lib32/libcairo.so.2                                                                  
#4  0xf357fb94 in _cairo_scaled_glyph_lookup () from /usr/lib32/libcairo.so.2                                                                   
#5  0xf357fd8d in cairo_scaled_font_glyph_extents () from /usr/lib32/libcairo.so.2                                                              
#6  0xf3689560 in _pango_cairo_font_private_get_glyph_extents () from /usr/lib32/libpangocairo-1.0.so.0                                         
#7  0xf368c188 in pango_cairo_fc_font_get_glyph_extents () from /usr/lib32/libpangocairo-1.0.so.0                                               
#8  0xf64a9c40 in pango_font_get_glyph_extents () from /usr/lib32/libpango-1.0.so.0                                                             
#9  0xf216c392 in pango_fc_hb_font_get_glyph_advance () from /usr/lib32/pango/1.8.0/modules/pango-basic-fc.so                                   
#10 0xf2f047fb in ?? () from /usr/lib32/libharfbuzz.so.0                                                                                        
#11 0xf2ee62db in hb_shape_plan_execute () from /usr/lib32/libharfbuzz.so.0                                                                     
#12 0xf2ee5707 in hb_shape_full () from /usr/lib32/libharfbuzz.so.0                                                                             
#13 0xf2ee5786 in hb_shape () from /usr/lib32/libharfbuzz.so.0                                                                                  
#14 0xf216c84a in basic_engine_shape () from /usr/lib32/pango/1.8.0/modules/pango-basic-fc.so
#15 0xf64b2b30 in _pango_engine_shape_shape () from /usr/lib32/libpango-1.0.so.0
#16 0xf64c5008 in pango_shape_full () from /usr/lib32/libpango-1.0.so.0
#17 0xf64b63e3 in shape_run () from /usr/lib32/libpango-1.0.so.0
#18 0xf64b7f50 in process_item () from /usr/lib32/libpango-1.0.so.0
#19 0xf64ba66a in pango_layout_check_lines () from /usr/lib32/libpango-1.0.so.0
#20 0xf64bc33d in pango_layout_get_extents_internal () from /usr/lib32/libpango-1.0.so.0
#21 0xf3689027 in _pango_cairo_font_get_metrics () from /usr/lib32/libpangocairo-1.0.so.0
#22 0xf64a9dc4 in pango_font_get_metrics () from /usr/lib32/libpango-1.0.so.0
#23 0xf64b61d1 in pango_layout_get_empty_extents_at_index () from /usr/lib32/libpango-1.0.so.0
#24 0xf64ba045 in pango_layout_line_get_extents () from /usr/lib32/libpango-1.0.so.0
#25 0xf66b56b0 in ?? () from /usr/lib32/libgtk-x11-2.0.so.0
#26 0xf66b5a14 in ?? () from /usr/lib32/libgtk-x11-2.0.so.0
#27 0xf6448aac in g_cclosure_marshal_VOID__VOID () from /usr/lib32/libgobject-2.0.so.0
#28 0xf64457c4 in ?? () from /usr/lib32/libgobject-2.0.so.0
#29 0xf6446c5b in g_closure_invoke () from /usr/lib32/libgobject-2.0.so.0
#30 0xf6458d8f in ?? () from /usr/lib32/libgobject-2.0.so.0
#31 0xf6463756 in g_signal_emit_valist () from /usr/lib32/libgobject-2.0.so.0
#32 0xf6463945 in g_signal_emit () from /usr/lib32/libgobject-2.0.so.0
#33 0xf6857ce9 in gtk_widget_realize () from /usr/lib32/libgtk-x11-2.0.so.0
#34 0xf6859181 in gtk_widget_set_parent () from /usr/lib32/libgtk-x11-2.0.so.0
#35 0x0852690c in _start ()
Comment 8 Thomas Capricelli 2015-10-10 11:59:00 UTC
Don't know if that's useful, but here are some more information:

orzel@berlioz /home/orzel% lrt /usr/lib32/libcairo.so.2 /usr/lib32/libpangocairo-1.0.so.0 /usr/lib32/libfreetype.so.6
lrwxrwxrwx 1 root root 21 22 giu 01.20 /usr/lib32/libfreetype.so.6 -> libfreetype.so.6.12.0
lrwxrwxrwx 1 root root 21  3 ott 22.03 /usr/lib32/libcairo.so.2 -> libcairo.so.2.11400.2
lrwxrwxrwx 1 root root 29  3 ott 22.05 /usr/lib32/libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0.3600.8
orzel@berlioz /home/orzel% qfile  /usr/lib32/libcairo.so.2 /usr/lib32/libpangocairo-1.0.so.0 /usr/lib32/libfreetype.so.6
media-libs/freetype (/usr/lib32/libfreetype.so.6)
x11-libs/pango (/usr/lib32/libpangocairo-1.0.so.0)
x11-libs/cairo (/usr/lib32/libcairo.so.2)

orzel@berlioz /home/orzel% eix media-libs/freetype; eix x11-libs/pango ; eix x11-libs/cairo
[I] media-libs/freetype
     Available versions:  (2) 2.5.5^d (~)2.6^d
       {X +adobe-cff auto-hinter bindist bzip2 debug doc fontforge harfbuzz infinality png static-libs utils ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  2.6(2)^d(01:20:01 22/06/2015)(X adobe-cff bzip2 png static-libs -bindist -debug -doc -fontforge -harfbuzz -infinality -utils ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            http://www.freetype.org/
     Description:         A high-quality and portable font engine

[I] x11-libs/pango
     Available versions:  1.36.8 (~)1.36.8-r1 {X debug +introspection test ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  1.36.8-r1(22:05:02 03/10/2015)(X introspection -debug -test ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            http://www.pango.org/
     Description:         Internationalized text layout and rendering library

[I] x11-libs/pangox-compat
     Available versions:  0.0.2 0.0.2-r1 {ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  0.0.2-r1(03:39:07 29/04/2015)(ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            http://www.pango.org/
     Description:         PangoX compatibility library

Found 2 matches.
[I] x11-libs/cairo
     Available versions:  1.14.2^t (~)1.14.2-r1^t **9999^t {X aqua debug directfb gles2 +glib opengl static-libs +svg valgrind xcb xlib-xcb ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  1.14.2-r1^t(22:03:34 03/10/2015)(X glib opengl static-libs svg xcb -aqua -debug -directfb -gles2 -valgrind -xlib-xcb ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            http://cairographics.org/
     Description:         A vector graphics library with cross-device output support
Comment 9 Roger 2015-10-10 13:11:39 UTC
Excellent!

Your results are unexpectedly, as should have been expected.  I've been seeing similar starting initially with pango/cairo segmentation faulting when executing acroread within Bug #559258 "x11-libs/cairo and x11-libs/pango with -O3 & -Ofast cause acroread segmentation fault within /usr/lib32/libpangocairo-1.0.so.0" and just recently the past days within Bug #562612] "=app-text/acroread-9.5.5-r3 fails with "Cannot access memory ...""

In both cases, I'm on a 64 bit platform and using the recently deployed Gentoo multilib method for using 32 bit precompiled applications, such as Adobe's acroread.  This method seems to be finicky when using odd CFLAGS, such as CFLAGS enabling vectorization CFLAGS. (ie. -Ofast)

I've further disabled vectorization for the 32 bit compiled packages using /etc/portage/package.env, specifying to disable only vectorization for acroread dependencies for which is causing acroread to fail here.

This requires two files, an env file and your *.conf for specifying CFLAGS or other Portage variable definitions.  You can see my cflags-safe-novectorize.conf file specifically disables vectorization only.  I also take an additional safe step of using "MAKEOPTS="-j1"", for which is likely not needed.

My guess, it is likely you've enabled vectorization by using the "-O3" CFLAG.

If you've read Bug #559258, it is likely many normally functioning compiled dependency packages will break due to unstable or broken precompiled packages.  This may also be a flaw with multilib.  Since this problem is only evident with only one package on a stable system for many years until multilib was deployed, I'm just manually filtering the package dependencies effecting acroread.  Acroread still seems to be the defacto when using and reading PDF files.  I've never or (almost never) had any other problems with using the Intel recommended CFLAGS, so this bug seems to be confined to acroread for now.

For the below env conf files, you can also create other env conf files such as debug.conf, cflags-safe.conf, cflags-safe-nofastmath.conf and makeoptssingle.conf.  If your a programmer, you'll likely definitely want to setup a debug.conf!

File: /etc/portage/package.env/env
--- Begin of Snip ---
# Acroread breaks when cairo/pango are compiled with -O3 -Ofast, or vectorizing!

x11-libs/cairo          cflags-safe-novectorize.conf
x11-libs/pango          cflags-safe-novectorize.conf
media-libs/fontconfig   cflags-safe-novectorize.conf
--- End of Snip ---

File: /etc/portage/env/cflags-safe-novectorize.conf
--- Begin of Snip ---
CFLAGS="-march=corei7 -Ofast -pipe -fno-tree-slp-vectorize"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j1"

# -ftree-loop-vectorize breaks x11-libs/cairo x11-libs/pango compile.  (C compiler cannot compile.)
# -ftree-slp-vectorize likely breaks cairo & pango runtime for acroread
--- End of Snip ---

File: /etc/portage/env/debug.conf
--- Begin of Snip ---
CFLAGS="-Wall -g -ggdb"
CXXFLAGS="${CFLAGS}"

FEATURES="splitdebug installsources"
--- End of Snip ---
Comment 10 Thomas Capricelli 2015-10-10 15:49:02 UTC
I already have splitdebug :-)

And indeed, I have -O3 in my gentoo CFLAGS

I tried using your env files. I just changed the arch from corei7 (which i dont have) to 'native' (my current setting in make.conf).

I uninstalled x11-libs/cairo, x11-libs/pango, media-libs/fontconfig and acroread. Then I re-emerged acroread:

orzel@berlioz /etc/portage% emerge -uND acroread
[ebuild  N    ] app-text/acroread-9.5.5-r3  USE="nsplugin -html -ldap" LINGUAS="-ja -ko -zh_CN -zh_TW" 
[ebuild  N    ]  x11-libs/pango-1.36.8-r1  USE="X introspection -debug {-test}" ABI_X86="32 (64) (-x32)" 
[ebuild  N    ]   x11-libs/cairo-1.14.2-r1  USE="X glib opengl static-libs svg xcb (-aqua) -debug (-directfb) (-gles2) -valgrind -xlib-xcb" ABI_X86="32 (64) (-x32)" 
[ebuild  N    ]    media-libs/fontconfig-2.11.94  USE="static-libs -doc" ABI_X86="32 (64) (-x32)" 

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests
>>> Emerging (1 of 4) media-libs/fontconfig-2.11.94::gentoo
>>> Installing (1 of 4) media-libs/fontconfig-2.11.94::gentoo
>>> Emerging (2 of 4) x11-libs/cairo-1.14.2-r1::gentoo
>>> Installing (2 of 4) x11-libs/cairo-1.14.2-r1::gentoo
>>> Emerging (3 of 4) x11-libs/pango-1.36.8-r1::gentoo
>>> Installing (3 of 4) x11-libs/pango-1.36.8-r1::gentoo
>>> Emerging (4 of 4) app-text/acroread-9.5.5-r3::gentoo
>>> Installing (4 of 4) app-text/acroread-9.5.5-r3::gentoo
>>> Recording app-text/acroread in "world" favorites file..


But the segfault is still there. I had to reedit /opt/Adobe/Reader9/bin/acroread to add gdb, and i got the same segfault/bt :

#0  0xf318237a in FT_Outline_Get_CBox () from /usr/lib32/libfreetype.so.6
#1  0xf31a0202 in ?? () from /usr/lib32/libfreetype.so.6
#2  0xf318595a in FT_Load_Glyph () from /usr/lib32/libfreetype.so.6
#3  0xf35cd32e in _cairo_ft_scaled_glyph_init () from /usr/lib32/libcairo.so.2
#4  0xf3545d49 in cairo_scaled_font_glyph_extents () from /usr/lib32/libcairo.so.2
#5  0xf367ec98 in _pango_cairo_font_private_get_glyph_extents () from /usr/lib32/libpangocairo-1.0.so.0
#6  0xf3682c88 in pango_cairo_fc_font_get_glyph_extents () from /usr/lib32/libpangocairo-1.0.so.0
#7  0xf64a2940 in pango_font_get_glyph_extents () from /usr/lib32/libpango-1.0.so.0
#8  0xf2104432 in pango_fc_hb_font_get_glyph_advance () from /usr/lib32/pango/1.8.0/modules/pango-basic-fc.so
#9  0xf2e9c7fb in ?? () from /usr/lib32/libharfbuzz.so.0
#10 0xf2e7e2db in hb_shape_plan_execute () from /usr/lib32/libharfbuzz.so.0
#11 0xf2e7d707 in hb_shape_full () from /usr/lib32/libharfbuzz.so.0
#12 0xf2e7d786 in hb_shape () from /usr/lib32/libharfbuzz.so.0
#13 0xf21048fa in basic_engine_shape () from /usr/lib32/pango/1.8.0/modules/pango-basic-fc.so
#14 0xf64acbb0 in _pango_engine_shape_shape () from /usr/lib32/libpango-1.0.so.0
#15 0xf64c4387 in pango_shape_full () from /usr/lib32/libpango-1.0.so.0
#16 0xf64b1723 in shape_run () from /usr/lib32/libpango-1.0.so.0
#17 0xf64b3161 in process_item () from /usr/lib32/libpango-1.0.so.0
#18 0xf64b5fbd in pango_layout_check_lines.part () from /usr/lib32/libpango-1.0.so.0
#19 0xf64b8fdd in pango_layout_get_extents_internal.constprop () from /usr/lib32/libpango-1.0.so.0
#20 0xf367dcbf in _pango_cairo_font_get_metrics () from /usr/lib32/libpangocairo-1.0.so.0
#21 0xf64a2ac4 in pango_font_get_metrics () from /usr/lib32/libpango-1.0.so.0
#22 0xf64b0e91 in pango_layout_get_empty_extents_at_index () from /usr/lib32/libpango-1.0.so.0
#23 0xf64b597d in pango_layout_line_get_extents () from /usr/lib32/libpango-1.0.so.0
#24 0xf66b56b0 in ?? () from /usr/lib32/libgtk-x11-2.0.so.0
#25 0xf66b5a14 in ?? () from /usr/lib32/libgtk-x11-2.0.so.0
#26 0xf643faac in g_cclosure_marshal_VOID__VOID () from /usr/lib32/libgobject-2.0.so.0
#27 0xf643c7c4 in ?? () from /usr/lib32/libgobject-2.0.so.0
#28 0xf643dc5b in g_closure_invoke () from /usr/lib32/libgobject-2.0.so.0
#29 0xf644fd8f in ?? () from /usr/lib32/libgobject-2.0.so.0
#30 0xf645a756 in g_signal_emit_valist () from /usr/lib32/libgobject-2.0.so.0
#31 0xf645a945 in g_signal_emit () from /usr/lib32/libgobject-2.0.so.0
#32 0xf6857ce9 in gtk_widget_realize () from /usr/lib32/libgtk-x11-2.0.so.0
#33 0xf6859181 in gtk_widget_set_parent () from /usr/lib32/libgtk-x11-2.0.so.0
#34 0x0852690c in _start ()
Comment 11 Roger 2015-10-10 23:24:59 UTC
You might also need to chmod those files.

# chmod a+rX -R /etc/portage/env
# chmod a+rX -R /etc/portage/package.env

I have root ownership of those files, and everything seems fine here.

Also, see:
https://wiki.gentoo.org/wiki/Knowledge_Base:Overriding_environment_variables_per_package

To verify this bug CFLAG workaround is even working, recompile a package using the debug.conf file, or just specify CFLAG debug flags are being used within a emerge/compile stdout session.

You might also want to first verify fontconfig is also failing due to CFLAGS -O3, but specifying the CFLAGS via the command line.

# CFLAGS="-O2" emerge fontconfig

If acroread is still segment faulting on fontconfig and compiler output shows "-O2" being used explicitly, then there's further problems elsewhere we're overlooking!

And also remember acroread is finicky with how the acroread script file is called and executed.  Since you've added the gdb statement, only the /opt/Adobe/Reader9/bin/acroread may use gdb, while /opt/bin/acroread may avoid using gdb and just segment fault without gdb being called.  (Yes one is just a symbolic link, but the script I guess further tracks how itself is called.)  Just a reminder to prevent you getting confused.

Hopefully something was just overlooked at this point, and you'll be executing acroread shortly.  Only problem, there's likely going to be further problems with acroread as corporate upstream rarely fixes their code!
Comment 12 Thomas Capricelli 2015-10-11 10:07:38 UTC
I'm confident my env packages.env stuff works.

I already use it for other things (notmpfs) and i've checked the output of /tmp/portage/x11-libs/cairo-1.14.2-r1/temp/build.log while emerging, it's indeed using "-march=native -Ofast -pipe -fno-tree-slp-vectorize".

(no -O2, i've used your examples upthere)
Comment 13 Thomas Capricelli 2015-10-11 10:08:40 UTC
moreover, genlop confirms it :
# genlop -i x11-libs/cairo
 * x11-libs/cairo


   Total builds: 62
   Global build time: 2 hours, 51 minutes and 20 seconds.
   Average merge time: 2 minutes and 45 seconds.

   Info about currently installed ebuild:

   * x11-libs/cairo-1.14.2-r1
   Install date: Sat Oct 10 17:27:14 2015
   USE="X opengl static-libs xcb -aqua -debug -directfb -gles2 -+glib -+svg -valgrind -xlib-xcb"
   CFLAGS="-march=native -Ofast -pipe -fno-tree-slp-vectorize"   CXXFLAGS="-march=native -Ofast -pipe -fno-tree-slp-vectorize"   LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 14 Thomas Capricelli 2015-10-11 10:30:20 UTC
I tried again using -O2 instead of -Ofast as it was in your "Snip". And now it works.
Comment 15 Roger 2015-10-11 14:42:30 UTC
I was just going to jump in and suggest maybe there's another optimization causing the segfault with your CPU type.

On my "Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz", "-fno-tree-slp-vectorize" seems to avert these segfaults.

Although the easy method is to just instate "-O2", you could further muddle through the GCC optimizations to disable the specific optimization which is causing the segfaults.

--- Snip ---
GCC Optimize Options
-O3
     Optimize yet more. -O3 turns on all optimizations specified by -O2 and also turns on the -finline-functions, -funswitch-loops, -fpredictive-commoning, -fgcse-after-reload, -ftree-loop-vectorize, -ftree-loop-distribute-patterns, -ftree-slp-vectorize, -fvect-cost-model, -ftree-partial-pre and -fipa-cp-clone options.
--- Snip ---

As I thought, there's another vectorize option for which I thought "-fno-tree-slp-vectorize" was already disabling, but maybe not!

Remember, you'll likely want to also include cairo and pango alongside fontconfig within your env file disabling optimizations for safe executing of acroread.

Glad to see you now have acroread working.
Comment 16 Roger 2015-10-11 14:44:47 UTC
--- Snip ---

GCC Optimize Options

-Ofast
    Disregard strict standards compliance. -Ofast enables all -O3 optimizations. It also enables optimizations that are not valid for all standard-compliant programs. It turns on -ffast-math and the Fortran-specific -fno-protect-parens and -fstack-arrays. 

--- Snip ---

So "-Ofast also adds "-ffast-math", and Fortran-specific "-fno-protect-parens and -fstack-arrays" options.
Comment 17 Jorge Nerin 2015-10-11 21:02:02 UTC
Created attachment 414392 [details]
Backtrace when launching with a $HOME in a big XFS partition.
Comment 18 Jorge Nerin 2015-10-11 21:03:24 UTC
Ok, I may also suffer the inode64 bug, but when launching acroread with $HOME redirected to a smaller partition it also doesn't work.

When launching with a redirected home it crashes and doesn't produce a backtrace in gdb:

(gdb) run
Starting program: /opt/Adobe/Reader9/Reader/intellinux/bin/acroread 
warning: the debug information found in "/home/usr_lib64_debug/lib64/ld-2.20.so.debug" does not match "/lib/ld-linux.so.2" (CRC mismatch).

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
No protocol specified

(acroread:19764): Gtk-WARNING **: cannot open display: :0
[Inferior 1 (process 19764) exited with code 01]
(gdb) bt
No stack.
(gdb) quit

Note that there is connection to :0 display, I can run X programs from the command line, don't know the reason of such error.

When launching with normal home in big XFS partition:

[Attachment #414392 [details]]

CFLAGS:

genlop -i x11-libs/cairo media-libs/fontconfig x11-libs/pango app-text/acroread
 * x11-libs/cairo


   Total builds: 32
   Global build time: 3 hours, 5 minutes and 36 seconds.
   Average merge time: 5 minutes and 48 seconds.

   Info about currently installed ebuild:

   * x11-libs/cairo-1.14.2
   Install date: Tue Sep 22 21:54:32 2015
   USE="X opengl xcb -aqua -debug -directfb -gles2 -+glib -static-libs -+svg -valgrind -xlib-xcb"
   CFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   CXXFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   LDFLAGS="-Wl,-O1 -Wl,--as-needed"
 * media-libs/fontconfig


   Total builds: 9
   Global build time: 33 minutes and 9 seconds.
   Average merge time: 3 minutes and 41 seconds.

   Info about currently installed ebuild:

   * media-libs/fontconfig-2.11.94
   Install date: Sat Jul 18 22:45:26 2015
   USE=" -doc -static-libs"
   CFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   CXXFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   LDFLAGS="-Wl,-O1 -Wl,--as-needed"
 * x11-libs/pango


   Total builds: 16
   Global build time: 41 minutes and 40 seconds.
   Average merge time: 2 minutes and 36 seconds.

   Info about currently installed ebuild:

   * x11-libs/pango-1.36.8
   Install date: Sun Jul 19 11:36:01 2015
   USE="X -+introspection"
   CFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   CXXFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   LDFLAGS="-Wl,-O1 -Wl,--as-needed"
 * app-text/acroread


   Total builds: 9
   Global build time: 12 minutes and 58 seconds.
   Average merge time: 1 minute and 26 seconds.

   Info about currently installed ebuild:

   * app-text/acroread-9.5.5-r3
   Install date: Sun Jul 19 12:14:38 2015
   USE="ldap nsplugin -html"
   CFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   CXXFLAGS="-march=native -O2 -pipe -ggdb -fno-omit-frame-pointer   LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 19 Roger 2015-10-12 11:19:54 UTC
I'm not seeing much useful debugging info with that gdb back trace.

In these circumstances, I then use strace.  So replace gdb with strace.  You may want to extend the column printed, but using the "-s" option if possible within the acroread script file?  (ie. "-s 80" or "-s 120", ...)

Then you have to read (or decipher) line by line, starting from the bottom of the stdout searching for where the break actually occurred.  (This maybe a few lines back within the strace output.)  You'll likely see a sign of a library which is broken, or maybe the break is really occurring within acroread.

Again, if the break occurs within acroread and since acroread is a proprietary binary, there maybe nothing you can do to make it work.  There might be a workaround if you're very very lucky.
Comment 20 Roger 2015-10-12 12:08:55 UTC
Nerin: You didn't mention if you're running a multilib system.  (ie. Using 32 bit applications on a 64 bit platform.)  This is also usually further denoted by seeing something like "ABI 32 64" within eix stdout.
Comment 21 Pacho Ramos gentoo-dev 2016-03-08 14:29:22 UTC

*** This bug has been marked as a duplicate of bug 559258 ***