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

/usr/lib/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n #3

Open
probonopd opened this issue May 31, 2018 · 27 comments

Comments

Projects
None yet
9 participants
@probonopd
Copy link

commented May 31, 2018

Someone reports over at https://linuxfr.org/news/sortie-des-applications-de-bureau-de-onlyoffice-en-version-5-1-au-format-appimage:

# ArchLinux
$ ./DesktopEditors-x86_64.AppImage
./DesktopEditors: symbol lookup error: /usr/lib/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n

Seems we had a similar issue with libhogweed here, maybe @darealshinji has an idea what needs to be done to fix this.

@darealshinji

This comment has been minimized.

Copy link

commented May 31, 2018

__gmpn_cnd_sub_n is a symbol from libgmp, see: readelf -s /usr/lib/x86_64-linux-gnu/libgmp.so.10 | grep __gmpn_cnd_sub_n

My assumption here: it loads libhogweed from the system instead of the AppImage, perhaps it already has loaded an incompatible version libgmp from within the AppImage? Bundle libhogweed with all its dependencies and see if that fixes it.

@probonopd

This comment has been minimized.

Copy link
Author

commented May 31, 2018

Thanks @darealshinji

@darealshinji

This comment has been minimized.

Copy link

commented May 31, 2018

@agolybev agolybev self-assigned this May 31, 2018

@ShockwaveNN ShockwaveNN added the bug label May 31, 2018

@agolybev

This comment has been minimized.

Copy link
Contributor

commented May 31, 2018

Hi @darealshinji, Bundling libhogweed inside AppImage doesn't fix problem. We'll investigate it. Thank you for your approach.

agolybev added a commit that referenced this issue Jun 28, 2018

agolybev added a commit that referenced this issue Jul 17, 2018

Fix bug #3 (#5)
Add dependency to fix issue #3
@vstoykov

This comment has been minimized.

Copy link

commented Aug 18, 2018

On Fedora 28 I have the same error

./DesktopEditors: symbol lookup error: /lib64/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n
@AnwarShah

This comment has been minimized.

Copy link

commented Aug 18, 2018

The same thing happened on Manjaro deepin for me. What's the problem? Is it fixed?

@mittman

This comment has been minimized.

Copy link

commented Oct 1, 2018

+1 with AppImage on ArchLinux

@mikhailnov

This comment has been minimized.

Copy link

commented Oct 14, 2018

chmod +x ./DesktopEditors-x86_64.AppImage
./DesktopEditors-x86_64.AppImage --appimage-extract
cd squashfs-root
rm -fv ./usr/bin/libgmp.so*
./AppRun
@mikhailnov

This comment has been minimized.

Copy link

commented Oct 14, 2018

You bundle libgmp.so, which loaded (LD_PRELOAD) before the system libhogweed.so. But system libhogweed.so is linked againsted the system libgmp.so, not yours. Either bundle both of them or don't bundle them both.

@metal3d

This comment has been minimized.

Copy link

commented Nov 12, 2018

Hi,

We really need to have a fixed package, Appimage or RPM/DEB because, at this time, there is no way to startup OnlyOffice on Fedora 29. Any chance to see it working soon ?

@mikhailnov

This comment has been minimized.

Copy link

commented Nov 12, 2018

@metal3d you can use https://gitlab.com/nixtux-packaging/appimage2pkg to build an RPM for Fedora from Appimage. that script already deletes ./usr/bin/libgmp.so*

@metal3d

This comment has been minimized.

Copy link

commented Nov 12, 2018

Thanks @mikhailnov, but unfortunately the built RPM is not correct:

Error: Transaction check error:
  file /usr/share/icons from install of onlyoffice-desktopeditors-appimage-5.1.27-6.x86_64 conflicts with file from package filesystem-3.9-2.fc29.x86_64
  file /usr/share/icons/hicolor/256x256 from install of onlyoffice-desktopeditors-appimage-5.1.27-6.x86_64 conflicts with file from package hicolor-icon-theme-0.17-3.fc29.noarch
  file /usr/share/icons/hicolor from install of onlyoffice-desktopeditors-appimage-5.1.27-6.x86_64 conflicts with file from package fedora-logos-28.0.3-2.fc29.x86_64
  file /usr/share/icons/hicolor/256x256 from install of onlyoffice-desktopeditors-appimage-5.1.27-6.x86_64 conflicts with file from package fedora-logos-28.0.3-2.fc29.x86_64

And I guess it will have the same problem than ONLYOFFICE/DesktopEditors#146 for Fedora 29.

@mikhailnov

This comment has been minimized.

Copy link

commented Nov 12, 2018

Libcurl gnutls works in the appimage 9n ALT Linux, where libcurls is also built without gnutls.

@probonopd

This comment has been minimized.

Copy link
Author

commented Nov 12, 2018

@metal3d you can use https://gitlab.com/nixtux-packaging/appimage2pkg to build an RPM for Fedora from Appimage.

Why would anyone want to do that? Users can extract an AppImage directly using -appimage-extract, and then delete the offending library.

that script already deletes ./usr/bin/libgmp.so*

The proper fix would be to do this in whatever script builds the AppImage in the first place.

@mikhailnov

This comment has been minimized.

Copy link

commented Nov 13, 2018

Why would anyone want to do that?

Because onlyoffice has not been able to make a good linux build since the first public version of onlyoffice.
When we talk about corporate machines, manyal installation of Appimage is unacceptable. The official RPM is buggy and unusable. So I had to repack the appimage into RPM.

The proper fix would be to do this in whatever script builds the AppImage in the first place.

Onlyoffice has long been talking about linux but their builds have always had errors, so I wouldn't wait for a propper solution.

@mikhailnov

This comment has been minimized.

Copy link

commented Nov 13, 2018

More than that, when desktop editors were released, you wrote that you want different linux distributions to include onlyoffice. About 3 years have passed. Desktopeditors are reported to be unbuildable from source.

@mikhailnov

This comment has been minimized.

@probonopd

This comment has been minimized.

Copy link
Author

commented Dec 6, 2018

So to be clear:

The authors of https://github.com/ONLYOFFICE/appimage-desktopeditors need to delete usr/bin/libgmp.so* inside their AppImage to fix this.

cc @agolybev

@mikhailnov

This comment has been minimized.

Copy link

commented Dec 7, 2018

No,, that's not a solution.
I've looked into how the AppImage is packed https://github.com/ONLYOFFICE/appimage-desktopeditors/blob/master/DesktopEditors-x86_64.yml
OnlyOffice deb is just being repacked.
All libraries, inluding libgmp.so.* are bundled automatically by AppImage builder because binaries from the deb package depend on them.
Binaries in the deb must be fixed, not the AppImage.

@mikhailnov

This comment has been minimized.

Copy link

commented Dec 7, 2018

Maybe Alexey @agolybev can make a repository with specs used to build deb and RPM packages, than maybe I or some one else can make contributions.

@agolybev

This comment has been minimized.

Copy link
Contributor

commented Dec 14, 2018

@mikhailnov

This comment has been minimized.

Copy link

commented Dec 15, 2018

@agolybev Thank you, but I miss something.

  1. Here https://github.com/ONLYOFFICE/desktop-apps/blob/master/win-linux/package/linux/deb/onlyoffice-desktopeditors/DEBIAN/control#L10 you specify runtime dependencies, but when deb is build, dh_shlibs makes a list of native runtime dependencies automatically

  2. there is no debian/rules

  3. so, you first run https://github.com/ONLYOFFICE/desktop-apps/blob/master/Makefile , then run https://github.com/ONLYOFFICE/desktop-apps/blob/master/win-linux/package/linux/Makefile#L223 and get a deb package without debian/rules?

  4. Then how are libraries bundled? I did not find the code. Maybe this https://github.com/ONLYOFFICE/desktop-apps/blob/master/win-linux/package/linux/Makefile#L181 ?

@mikhailnov

This comment has been minimized.

@agolybev

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2018

Hi @mikhailnov, Desktopeditor building process is the sequence of calls make in the root in the set of repositories. Unfortunately, we haven't provided it yet.

@mikhailnov

This comment has been minimized.

Copy link

commented Dec 17, 2018

Is this sequence the only missing thing to build OnlyOffice DesktopEditors? I think the sequence is not hard to understand without additional manuals.

@agolybev

This comment has been minimized.

Copy link
Contributor

commented Dec 18, 2018

Hi, @mikhailnov it will be look like this:

cd core/Common/3dParty/ && ./make.sh
cd core && make all desktop
cd sdkjs && make desktop

export DEST_DIR=$(pwd)/core/build/linux_desktop/desktop_64
export QT_PATH=/usr/local/Qt-5.9.6
export QT_ICU=/usr/lib/x86_64-linux-gnu
export WEBAPPS_DIR=../web-apps-pro/deploy

cd desktop-apps && make install 

cd ..
ln -s $DEST_DIR $(pwd)/core/build/linux_desktop/desktop_full_modern_64

cd desktop-apps/win-linux/package/linux && make deb rpm
@mikhailnov

This comment has been minimized.

Copy link

commented Dec 18, 2018

Thank you very much! I will try to package OnlyOffice DesktopEditors for ROSA Linux, but a bit later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.