Skip to content
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

Please build Linux binary with libpng16-16 and not libpng12-0 #71

Closed
logix2 opened this issue Apr 24, 2020 · 12 comments
Closed

Please build Linux binary with libpng16-16 and not libpng12-0 #71

logix2 opened this issue Apr 24, 2020 · 12 comments
Labels

Comments

@logix2
Copy link

logix2 commented Apr 24, 2020

The Penguin Subtitle Player Linux binary is built with libpng12-0, which isn't available in Linux distributions for a long time. For example Ubuntu 18.04 (released two years ago) doesn't have it.

When trying to run it I get (and everybody else using a not very old Linux distribution):

./PenguinSubtitlePlayer 
./PenguinSubtitlePlayer: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

Linux distributions nowadays use libpng1.6 (libpng16-16), so please build the Linux binary using this.

Thanks!

@carsonip
Copy link
Owner

Thanks for reporting an issue. I thought I built a static binary, and I suppose something like this won't happen. What distribution are you using? I am using Linux Mint 19 (Ubuntu 18.04 base) and I didn't get any errors. I think I compiled the program in either Ubuntu 16.04 or 18.04.

@carsonip carsonip added the bug label Apr 24, 2020
@carsonip
Copy link
Owner

This may be a real problem to many Linux users. I'm digging into it. Here's output of ldd:

ldd PenguinSubtitlePlayer 
	linux-vdso.so.1 (0x00007fff21bdb000)
	libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fbea66c2000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fbea640e000)
	libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007fbea61f3000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbea5fcb000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbea5c93000)
	libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fbea5a91000)
	libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fbea5889000)
	libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fbea566e000)
	libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fbea5449000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbea522c000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbea5028000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fbea4d9c000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbea4b7d000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbea47f4000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbea4456000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbea423e000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbea3e4d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fbea6907000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fbea3c1b000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fbea39e9000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbea37e5000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbea35df000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fbea33d8000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fbea31c3000)
	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fbea2f92000)
	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fbea2cdc000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbea2ad4000)

@logix2
Copy link
Author

logix2 commented Apr 24, 2020

This happens in both Ubuntu 18.04 and 20.04. I think you compiled it on 16.04, because it still has libpng12-0. I don't know about Linux Mint (which even though is based on Ubuntu has its own repository too), but Ubuntu 18.04 definitely doesn't have libpng12-0.

See here the supported Ubuntu versions that still have libpng12-0: https://packages.ubuntu.com/search?keywords=libpng12-0

@carsonip
Copy link
Owner

Right. I'll try to fix my static Qt build to eliminate this issue. I see it is possible to configure Qt to use its bundled libpng instead of system's libpng. I bet it would eliminate the need of dynamically linked libpng. I'll get back to you when I get something.

@carsonip
Copy link
Owner

I'm sorry that the "static" build of the player is kind of fragile. Building a static binary that works on Linux is not a trivial problem, especially when I didn't check ldd output before. A good lesson to myself.

@carsonip
Copy link
Owner

The problem I get into today is that I can get rid of libpng16, but the dynamic link to libfreetype will create link to libpng12. However, using Qt's bundled freetype breaks the application. I'll try to find a solution.

@alexhk90
Copy link
Contributor

While it doesn't solve the issue with the Linux binary (which would be good to fix), does Ubuntu have a way of building from source?
I just tried the Arch Linux AUR package (which builds from the git source) and it seems to work well with the latest version (1.3.0).

PS: @carsonip As I didn't see a way of commenting on the v1.3.0 release, just wanted to say thanks for continuing development on this.

@carsonip
Copy link
Owner

Hey @alexhk90, thanks for being a long time supporter of Penguin Subtitle Player!

I think there should be a way to build from source on apt install, which should be easy with libqt. Currently Ubuntu users are directed to WebUpd8 to download a deb, but they don't update that often.

Anyway, a possible fix to this issue may be using a Ubuntu 18.04 VM to do the compilation. I'll do it when I get some time.

@carsonip
Copy link
Owner

carsonip commented May 1, 2020

Here's the ldd output when I build it with Ubuntu 18.04:

	linux-vdso.so.1 (0x00007ffc5bdf8000)
	libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f55f7335000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f55f7081000)
	libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f55f6e66000)
	libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f55f6c64000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f55f692c000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f55f6704000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f55f6500000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f55f6274000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f55f6055000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f55f5ccc000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f55f592e000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f55f5716000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f55f5325000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f55f8878000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f55f50f3000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f55f4ec1000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f55f4ca4000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f55f4aa0000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f55f489a000)
	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f55f4669000)
	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f55f43b3000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f55f419e000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f55f3f96000)

I'll see if I can get any better results, otherwise this should be it.

@JackieMium
Copy link

Here's the ldd output when I build it with Ubuntu 18.04:
I'll see if I can get any better results, otherwise this should be it.

I think this is it. I got the same error msg running the 1.3.0 binary version, I then built it it on my Debian sid box with Qt 5.12.5 and libpng against libpng16-16 and it worked too. Qt creator build also works and linked against libpng16.

@carsonip
Copy link
Owner

Here's the ldd output when I build it with Ubuntu 18.04:
I'll see if I can get any better results, otherwise this should be it.

I think this is it. I got the same error msg running the 1.3.0 binary version, I then built it it on my Debian sid box with Qt 5.12.5 and libpng against libpng16-16 and it worked too. Qt creator build also works and linked against libpng16.

Yes, I will compile the next version with Ubuntu 18.04.

@carsonip
Copy link
Owner

Fixed in v1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants