I've just run the last version of telegram desktop with strace, and these lines appeared:
open("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release/tls/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release/tls/x86_64", 0x7ffc4e942b50) = -1 ENOENT (No such file or directory)
open("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release/tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release/tls", 0x7ffc4e942b50) = -1 ENOENT (No such file or directory)
open("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release/x86_64", 0x7ffc4e942b50) = -1 ENOENT (No such file or directory)
open("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release", 0x7ffc4e942b50) = -1 ENOENT (No such file or directory)
As you guess, I don't have /home/preston dir. Maybe you have some mistakes in your build config.
OS - Ubuntu 16.04.4 LTS
Aha. Nice findings. /home/preston surely is the directory of the Dev. It should be made general.
@omkarnathsingh no, it just should not be there, and the fact it's /home/Preston and not $HOME saves TDesktop from easy dylib hijacking
rgrep preston *
Telegram/SourceFiles/boxes/add_contact_box.cpp: _checkRequestId = MTP::send(MTPchannels_CheckUsername(_channel->inputChannel, MTP_string("preston")), RPCDoneHandlerPtr(), rpcFail(&SetupChannelBox::onFirstCheckFail));
I suppose Telegram Desktop bin is not enough cross platform.
Telegram executable has embedded RPATH as follows:
$ patchelf --print-rpath Telegram
/usr/local/tdesktop/Qt-5.6.2/lib:/usr/local/tdesktop/Qt-5.6.2/plugins:/usr/local/tdesktop/Qt-5.6.2/plugins/bearer:/usr/local/tdesktop/Qt-5.6.2/plugins/platforms:/usr/local/tdesktop/Qt-5.6.2/plugins/imageformats:/usr/local/tdesktop/Qt-5.6.2/plugins/platforminputcontexts:/usr/local/lib:/home/preston/Telegram/tdesktop/out/Release/../../../Libraries/crashpad/out/Release
The developers should strip RPATH since the binary uses static Qt linking.
Most helpful comment
Telegram executable has embedded RPATH as follows:
The developers should strip RPATH since the binary uses static Qt linking.