New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created in Debian Jessie, Got undefined symbol error in Fedora #157

Open
librehat opened this Issue Aug 3, 2017 · 19 comments

Comments

Projects
None yet
3 participants
@librehat

librehat commented Aug 3, 2017

Vanilla Debian Jessie 8.9 64-bit OS, all packages installed from the Debian official repository.

I was trying to pack https://github.com/shadowsocks/shadowsocks-qt5 as AppImage so I followed all steps in README.md in my local Debian VM. I've successfully created an AppImage file. It seems working fine in Debian. However, after I copied it out to the host OS (Fedora 26 64-bit), I couldn't run the AppImage file but got an error:

./Shadowsocks-Qt5-x86_64.AppImage: symbol lookup error: /lib64/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates
@TheAssassin

This comment has been minimized.

Show comment
Hide comment
@TheAssassin

TheAssassin Aug 4, 2017

Collaborator

Looks like libharfbuzz wasn't bundled by linuxdeployqt. It is not in the exclude list which means that something prevented linuxdeployqt from bundling it. Can you provide the linuxdeployqt log of your Debian build? Ideally, re-run with -verbose=3.

Collaborator

TheAssassin commented Aug 4, 2017

Looks like libharfbuzz wasn't bundled by linuxdeployqt. It is not in the exclude list which means that something prevented linuxdeployqt from bundling it. Can you provide the linuxdeployqt log of your Debian build? Ideally, re-run with -verbose=3.

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

logs.txt

appdir/
├── AppRun -> usr/bin/ss-qt5
├── shadowsocks-qt5.desktop
├── shadowsocks-qt5.png
└── usr
    ├── bin
    │   ├── qt.conf
    │   └── ss-qt5
    ├── lib
    │   ├── libappindicator.so.1
    │   ├── libatk-1.0.so.0
    │   ├── libbotan-1.10.so.0
    │   ├── libbz2.so.1.0
    │   ├── libcairo.so.2
    │   ├── libcrypto.so.1.0.0
    │   ├── libdatrie.so.1
    │   ├── libdbus-1.so.3
    │   ├── libdbusmenu-glib.so.4
    │   ├── libdbusmenu-gtk.so.4
    │   ├── libffi.so.6
    │   ├── libfreetype.so.6
    │   ├── libglapi.so.0
    │   ├── libgmodule-2.0.so.0
    │   ├── libgmp.so.10
    │   ├── libgraphite2.so.3
    │   ├── libgthread-2.0.so.0
    │   ├── libharfbuzz.so.0
    │   ├── libicudata.so.52
    │   ├── libicui18n.so.52
    │   ├── libicuuc.so.52
    │   ├── libindicator.so.7
    │   ├── libjpeg.so.62
    │   ├── libpcre.so.3
    │   ├── libpixman-1.so.0
    │   ├── libpng12.so.0
    │   ├── libqrencode.so.3
    │   ├── libQt5Core.so.5
    │   ├── libQt5DBus.so.5
    │   ├── libQt5Gui.so.5
    │   ├── libQt5Network.so.5
    │   ├── libQt5Widgets.so.5
    │   ├── libQtShadowsocks.so
    │   ├── libthai.so.0
    │   ├── libv4l2.so.0
    │   ├── libv4lconvert.so.0
    │   ├── libX11-xcb.so.1
    │   ├── libXau.so.6
    │   ├── libxcb-dri2.so.0
    │   ├── libxcb-dri3.so.0
    │   ├── libxcb-glx.so.0
    │   ├── libxcb-icccm.so.4
    │   ├── libxcb-image.so.0
    │   ├── libxcb-keysyms.so.1
    │   ├── libxcb-present.so.0
    │   ├── libxcb-randr.so.0
    │   ├── libxcb-render.so.0
    │   ├── libxcb-render-util.so.0
    │   ├── libxcb-shape.so.0
    │   ├── libxcb-shm.so.0
    │   ├── libxcb-sync.so.1
    │   ├── libxcb-util.so.0
    │   ├── libxcb-xfixes.so.0
    │   ├── libxcb-xkb.so.1
    │   ├── libXcomposite.so.1
    │   ├── libXcursor.so.1
    │   ├── libXdamage.so.1
    │   ├── libXdmcp.so.6
    │   ├── libXext.so.6
    │   ├── libXfixes.so.3
    │   ├── libXinerama.so.1
    │   ├── libXi.so.6
    │   ├── libxkbcommon.so.0
    │   ├── libxkbcommon-x11.so.0
    │   ├── libXrandr.so.2
    │   ├── libXrender.so.1
    │   ├── libxshmfence.so.1
    │   ├── libXxf86vm.so.1
    │   └── libzbar.so.0
    ├── plugins
    │   ├── bearer
    │   │   ├── libqconnmanbearer.so
    │   │   ├── libqgenericbearer.so
    │   │   └── libqnmbearer.so
    │   ├── imageformats
    │   │   ├── libqgif.so
    │   │   ├── libqico.so
    │   │   └── libqjpeg.so
    │   └── platforms
    │       └── libqxcb.so
    └── share
        ├── applications
        │   └── shadowsocks-qt5.desktop
        └── icons
            └── hicolor
                └── 512x512
                    └── apps
                        └── shadowsocks-qt5.png

I can see libharfbuzz.so bundled in the directory.

librehat commented Aug 6, 2017

logs.txt

appdir/
├── AppRun -> usr/bin/ss-qt5
├── shadowsocks-qt5.desktop
├── shadowsocks-qt5.png
└── usr
    ├── bin
    │   ├── qt.conf
    │   └── ss-qt5
    ├── lib
    │   ├── libappindicator.so.1
    │   ├── libatk-1.0.so.0
    │   ├── libbotan-1.10.so.0
    │   ├── libbz2.so.1.0
    │   ├── libcairo.so.2
    │   ├── libcrypto.so.1.0.0
    │   ├── libdatrie.so.1
    │   ├── libdbus-1.so.3
    │   ├── libdbusmenu-glib.so.4
    │   ├── libdbusmenu-gtk.so.4
    │   ├── libffi.so.6
    │   ├── libfreetype.so.6
    │   ├── libglapi.so.0
    │   ├── libgmodule-2.0.so.0
    │   ├── libgmp.so.10
    │   ├── libgraphite2.so.3
    │   ├── libgthread-2.0.so.0
    │   ├── libharfbuzz.so.0
    │   ├── libicudata.so.52
    │   ├── libicui18n.so.52
    │   ├── libicuuc.so.52
    │   ├── libindicator.so.7
    │   ├── libjpeg.so.62
    │   ├── libpcre.so.3
    │   ├── libpixman-1.so.0
    │   ├── libpng12.so.0
    │   ├── libqrencode.so.3
    │   ├── libQt5Core.so.5
    │   ├── libQt5DBus.so.5
    │   ├── libQt5Gui.so.5
    │   ├── libQt5Network.so.5
    │   ├── libQt5Widgets.so.5
    │   ├── libQtShadowsocks.so
    │   ├── libthai.so.0
    │   ├── libv4l2.so.0
    │   ├── libv4lconvert.so.0
    │   ├── libX11-xcb.so.1
    │   ├── libXau.so.6
    │   ├── libxcb-dri2.so.0
    │   ├── libxcb-dri3.so.0
    │   ├── libxcb-glx.so.0
    │   ├── libxcb-icccm.so.4
    │   ├── libxcb-image.so.0
    │   ├── libxcb-keysyms.so.1
    │   ├── libxcb-present.so.0
    │   ├── libxcb-randr.so.0
    │   ├── libxcb-render.so.0
    │   ├── libxcb-render-util.so.0
    │   ├── libxcb-shape.so.0
    │   ├── libxcb-shm.so.0
    │   ├── libxcb-sync.so.1
    │   ├── libxcb-util.so.0
    │   ├── libxcb-xfixes.so.0
    │   ├── libxcb-xkb.so.1
    │   ├── libXcomposite.so.1
    │   ├── libXcursor.so.1
    │   ├── libXdamage.so.1
    │   ├── libXdmcp.so.6
    │   ├── libXext.so.6
    │   ├── libXfixes.so.3
    │   ├── libXinerama.so.1
    │   ├── libXi.so.6
    │   ├── libxkbcommon.so.0
    │   ├── libxkbcommon-x11.so.0
    │   ├── libXrandr.so.2
    │   ├── libXrender.so.1
    │   ├── libxshmfence.so.1
    │   ├── libXxf86vm.so.1
    │   └── libzbar.so.0
    ├── plugins
    │   ├── bearer
    │   │   ├── libqconnmanbearer.so
    │   │   ├── libqgenericbearer.so
    │   │   └── libqnmbearer.so
    │   ├── imageformats
    │   │   ├── libqgif.so
    │   │   ├── libqico.so
    │   │   └── libqjpeg.so
    │   └── platforms
    │       └── libqxcb.so
    └── share
        ├── applications
        │   └── shadowsocks-qt5.desktop
        └── icons
            └── hicolor
                └── 512x512
                    └── apps
                        └── shadowsocks-qt5.png

I can see libharfbuzz.so bundled in the directory.

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Aug 6, 2017

Owner

Still, someting is trying to load /lib64/libharfbuzz.so.0 from your system.

Please run LD_DEBUG=libs appdir/AppRun and try to find out what is doing this.

Owner

probonopd commented Aug 6, 2017

Still, someting is trying to load /lib64/libharfbuzz.so.0 from your system.

Please run LD_DEBUG=libs appdir/AppRun and try to find out what is doing this.

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

     27429:	find library=libxcb.so.1 [0]; searching
     27429:	 search path=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib		(RUNPATH from file appdir/AppRun)
     27429:	  trying file=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib/libxcb.so.1
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/usr/lib/x86_64-linux-gnu/libxcb.so.1
     27429:	
     27429:	find library=libselinux.so.1 [0]; searching
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/lib/x86_64-linux-gnu/libselinux.so.1
     27429:	
     27429:	find library=libresolv.so.2 [0]; searching
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/lib/x86_64-linux-gnu/libresolv.so.2
     27429:	
     27429:	find library=libharfbuzz.so.0 [0]; searching
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0
     27429:	
     27429:	calling init: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0
     27429:	
     27429:	
     27429:	calling init: /lib/x86_64-linux-gnu/libresolv.so.2
     27429:	
     27429:	
     27429:	calling init: /lib/x86_64-linux-gnu/libselinux.so.1

librehat commented Aug 6, 2017

     27429:	find library=libxcb.so.1 [0]; searching
     27429:	 search path=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib		(RUNPATH from file appdir/AppRun)
     27429:	  trying file=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib/libxcb.so.1
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/usr/lib/x86_64-linux-gnu/libxcb.so.1
     27429:	
     27429:	find library=libselinux.so.1 [0]; searching
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/lib/x86_64-linux-gnu/libselinux.so.1
     27429:	
     27429:	find library=libresolv.so.2 [0]; searching
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/lib/x86_64-linux-gnu/libresolv.so.2
     27429:	
     27429:	find library=libharfbuzz.so.0 [0]; searching
     27429:	 search cache=/etc/ld.so.cache
     27429:	  trying file=/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0
     27429:	
     27429:	calling init: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0
     27429:	
     27429:	
     27429:	calling init: /lib/x86_64-linux-gnu/libresolv.so.2
     27429:	
     27429:	
     27429:	calling init: /lib/x86_64-linux-gnu/libselinux.so.1
@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

ld_debug.txt
I can't find anything useful in the output :/

librehat commented Aug 6, 2017

ld_debug.txt
I can't find anything useful in the output :/

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Aug 6, 2017

Owner

You see that it says (RUNPATH from file appdir/AppRun) on some lines? We need to find out why it doesn't do this on the line responsible for libharfbuzz...

Owner

probonopd commented Aug 6, 2017

You see that it says (RUNPATH from file appdir/AppRun) on some lines? We need to find out why it doesn't do this on the line responsible for libharfbuzz...

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

Yes I do see those. But it doesn't have this for libharfbuzz...

librehat commented Aug 6, 2017

Yes I do see those. But it doesn't have this for libharfbuzz...

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Aug 6, 2017

Owner

...which seems to be the issue (to be investigated)

Owner

probonopd commented Aug 6, 2017

...which seems to be the issue (to be investigated)

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

So I just built Qt myself with -no-xcb -no-harfbuzz, however, harfbuzz still appears in ldd... It seems some other libraries than Qt pulls in harfbuzz

librehat commented Aug 6, 2017

So I just built Qt myself with -no-xcb -no-harfbuzz, however, harfbuzz still appears in ldd... It seems some other libraries than Qt pulls in harfbuzz

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Aug 6, 2017

Owner

Yes, let's find out which one.

Owner

probonopd commented Aug 6, 2017

Yes, let's find out which one.

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

I've found it out: /usr/lib/libappindicator.so.1

librehat commented Aug 6, 2017

I've found it out: /usr/lib/libappindicator.so.1

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Aug 6, 2017

Owner

And what loads that?

Owner

probonopd commented Aug 6, 2017

And what loads that?

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

This application ss-qt5 does

librehat commented Aug 6, 2017

This application ss-qt5 does

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Aug 6, 2017

Owner

Is that the application you are packaging? What does

patchelf --print-rpath appdir/usr/bin/ss-qt5

say?

Why does it not load the bundled libappindicator.so.1 but the one from the system?

Owner

probonopd commented Aug 6, 2017

Is that the application you are packaging? What does

patchelf --print-rpath appdir/usr/bin/ss-qt5

say?

Why does it not load the bundled libappindicator.so.1 but the one from the system?

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 6, 2017

It says $ORIGIN/../lib/

     27429:	find library=libappindicator.so.1 [0]; searching
     27429:	 search path=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib		(RUNPATH from file appdir/AppRun)
     27429:	  trying file=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib/libappindicator.so.1

The libappindicator loaded was from bundled. But somehow libharfbuzz was not

librehat commented Aug 6, 2017

It says $ORIGIN/../lib/

     27429:	find library=libappindicator.so.1 [0]; searching
     27429:	 search path=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib		(RUNPATH from file appdir/AppRun)
     27429:	  trying file=/home/symeon/Projects/shadowsocks-qt5/appdir/usr/bin/../lib/libappindicator.so.1

The libappindicator loaded was from bundled. But somehow libharfbuzz was not

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Aug 6, 2017

Owner

Ah right, what does

patchelf --print-rpath appdir/usr/lib/libappindicator.so.1

say?

Owner

probonopd commented Aug 6, 2017

Ah right, what does

patchelf --print-rpath appdir/usr/lib/libappindicator.so.1

say?

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 7, 2017

It says $ORIGIN

librehat commented Aug 7, 2017

It says $ORIGIN

@librehat

This comment has been minimized.

Show comment
Hide comment
@librehat

librehat Aug 7, 2017

I'm not sure if it's caused by libfreetype.so.6. After I removed libfreetype.so.6 and libharfbuzz.so.0 from the bundle, it can be launched without problem on my Fedora

librehat commented Aug 7, 2017

I'm not sure if it's caused by libfreetype.so.6. After I removed libfreetype.so.6 and libharfbuzz.so.0 from the bundle, it can be launched without problem on my Fedora

@TheAssassin

This comment has been minimized.

Show comment
Hide comment
@TheAssassin
Collaborator

TheAssassin commented Mar 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment