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

Closed
probonopd opened this issue May 31, 2018 · 39 comments
Closed

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

probonopd opened this issue May 31, 2018 · 39 comments
Assignees
Labels
confirmed-bug Issues with confirmed bugs

Comments

@probonopd
Copy link

probonopd 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
Copy link

__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
Copy link
Author

Thanks @darealshinji

@darealshinji

This comment has been minimized.

@agolybev agolybev self-assigned this May 31, 2018
@ShockwaveNN ShockwaveNN added the confirmed-bug Issues with confirmed bugs label May 31, 2018
@agolybev
Copy link
Contributor

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

@vstoykov
Copy link

On Fedora 28 I have the same error

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

@AnwarShah
Copy link

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

@mittman
Copy link

mittman commented Oct 1, 2018

+1 with AppImage on ArchLinux

@mikhailnov
Copy link

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

@mikhailnov
Copy link

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
Copy link

metal3d 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
Copy link

@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
Copy link

metal3d 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
Copy link

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

@probonopd
Copy link
Author

@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
Copy link

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
Copy link

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
Copy link

@probonopd
Copy link
Author

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
Copy link

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.

@agolybev

This comment has been minimized.

@mikhailnov

This comment has been minimized.

@mikhailnov

This comment has been minimized.

@agolybev

This comment has been minimized.

@mikhailnov

This comment has been minimized.

@agolybev

This comment has been minimized.

@mikhailnov

This comment has been minimized.

@GarlandKey
Copy link

Can confirm - this is still an issue on Arch based distros as of today. This installation breaking bug was posted over a year ago :S

@pojntfx
Copy link

pojntfx commented Jul 18, 2019

Can also confirm on Fedora Silverblue 30.

@tyu1996
Copy link

tyu1996 commented Sep 9, 2019

There is also a similar issue on latest build (v5.3.5), which the terminal shows this message:

./DesktopEditors: symbol lookup error: /lib/x86_64-linux-gnu/libgnutls.so.30: undefined symbol: __gmpz_limbs_write

BTW, my machine is running Ubuntu-based Pop!OS.

@probonopd
Copy link
Author

Is libgmp being bundled? What happens if it is removed from the AppImage?

Reference:
https://abi-laboratory.pro/?view=compat_report&l=gmp&v1=5.1.3&v2=6.0.0&obj=f9158&kind=abi

@tyu1996
Copy link

tyu1996 commented Sep 22, 2019

Is libgmp being bundled? What happens if it is removed from the AppImage?

Reference:
https://abi-laboratory.pro/?view=compat_report&l=gmp&v1=5.1.3&v2=6.0.0&obj=f9158&kind=abi

Yes, after removed libgmp* inside the extracted AppImage, it runs. So will be not including libgmp* is the solution for future AppImage releases?

@probonopd
Copy link
Author

So will be not including libgmp* is the solution for future AppImage releases?

Can we reasonably expect libgmp* to come as part of the default installation of all major Linux distributions?

@mikhailnov
Copy link

Here are reverse dependencies - all packages that depend from libgmp in ROSA 2016.1 repositories:

rosa-2016 ~ # rpm -qf /usr/lib64/libgmp.so.10
lib64gmp10-6.1.1-3-rosa2016.1.x86_64
rosa-2016 ~ # urpmq --whatrequires lib64gmp10 | sort -u
alex
aria2
cabal-install
cdd
cdd+
cddlib-devel
cm
cocoalib-examples
control-timeout
coreutils
cross-avr-gcc
cross-avr-gcc-c++
ecl
ecm
flint
fplll
freeminer
gambas3-devel
gambas3-gb-clipper
gambas3-gb-db-sqlite2
gambas3-gb-gmp
gambas3-gb-gtk
gambas3-gb-gtk3
gambas3-gb-image-effect
gambas3-gb-pdf
gambas3-gb-qt4
gambas3-gb-qt4-ext
gambas3-gb-qt4-opengl
gambas3-gb-qt4-webkit
gambas3-gb-qt5
gambas3-gb-qt5-ext
gambas3-gb-qt5-opengl
gambas3-gb-qt5-webkit
gambas3-gb-sdl
gambas3-gb-xml
gambas3-gb-xml-html
gambas3-gb-xml-xslt
gambas3-runtime
gap-core
gcc
gcc-c++
gcc-gfortran
gcc-gnat
gcc-go
gcc-java
gcc-objc
gcc-objc++
gcl
genius
gfan
ghc
ghc-ansi-terminal
ghc-ansi-wl-pprint
ghc-async
ghc-base16-bytestring
ghc-base64-bytestring
ghc-base-orphans
ghc-cabalrpmdeps
ghc-clock
ghc-conduit
ghc-ConfigFile
ghc-convertible
ghc-cpphs
ghc-cryptohash-sha256
ghc-curl
ghc-data-default
ghc-data-default-class
ghc-data-default-instances-containers
ghc-data-default-instances-dlist
ghc-data-default-instances-old-locale
ghc-dataenc
ghc-digest
ghc-dlist
ghc-ed25519
ghc-exceptions
ghc-extensible-exceptions
ghc-FindBin
ghc-hackage-security
ghc-happy
ghc-hashable
ghc-hashtables
ghc-haskeline
ghc-haskell-src
ghc-haskell-src-exts
ghc-HaXml
ghc-HDBC
ghc-hostname
ghc-hslogger
ghc-HsSyck
ghc-html
ghc-HTTP
ghc-HUnit
ghc-hxt
ghc-hxt-charproperties
ghc-hxt-regex-xmlschema
ghc-hxt-unicode
ghc-json
ghc-lhs2tex
ghc-libxml
ghc-lifted-base
ghc-MissingH
ghc-mmap
ghc-mmorph
ghc-monad-control
ghc-mtl
ghc-network
ghc-network-uri
ghc-old-locale
ghc-old-time
ghc-optparse-applicative
ghc-parallel
ghc-parsec
ghc-paths
ghc-polyparse
ghc-primitive
ghc-QuickCheck
ghc-random
ghc-regex-base
ghc-regex-compat
ghc-regex-posix
ghc-regex-tdfa
ghc-resourcet
ghc-sandi
ghc-semigroups
ghc-setlocale
ghc-stm
ghc-strict
ghc-stringsearch
ghc-syb
ghc-tagged
ghc-tagsoup
ghc-tar
ghc-tasty
ghc-tasty-hunit
ghc-tasty-quickcheck
ghc-test-framework
ghc-test-framework-hunit
ghc-test-framework-quickcheck2
ghc-text
ghc-tf-random
ghc-transformers-base
ghc-transformers-compat
ghc-unbounded-delays
ghc-unordered-containers
ghc-utf8-string
ghc-vector
ghc-void
ghc-X11
ghc-X11-xft
ghc-xml
ghc-xmonad
ghc-xmonad-contrib
ghc-zip-archive
ghc-zlib
gmsh
gnubg
gretl
kcalc
kmymoney
lib644ti2common0
lib644ti2gmp0
lib644ti2int32_0
lib644ti2int64_0
lib64alkimia4
lib64aqbanking35
lib64botan1.10_1
lib64cgal12
lib64cln6
lib64cloog-isl4
lib64cm0
lib64cvc3_5
lib64d0_blind_id0
lib64ecm1
lib64flint1
lib64fplll0
lib64gcj16
lib64givaro0
lib64gmp10
lib64gmp-devel
lib64gmpxx4
lib64gnutls30
lib64gretl1.0_9
lib64gst7
lib64guile17
lib64guile2.0_22
lib64hogweed4
lib64iml0
lib64isl13
lib64kmm_mymoney4
lib64ksi10
lib64ktorrent6
lib64linboxsage0
lib64mpc2
lib64mpc3
lib64mpfi0
lib64mpfr4
lib64mpfrcx1
lib64ntl5
lib64numexp0
lib64pari-gmp3
lib64parrot
lib64parrot-devel
lib64payeeidentifier_iban_bic4
lib64ppl13
lib64ppl_c4
lib64ratpoints0
lib64rep16
lib64zn_poly0.9
lib64zsolve0
lilypond
meshlab
minetest
minetest-server
netrek-client-cow
nettle
numexp-core
ocaml-mlgmp
openscad
openswan
parrot
perl-Crypt-DH-GMP
perl-Math-BigInt-GMP
perl-Math-GMP
perl-Math-GMPq
perl-Math-GMPz
perl-Math-MPC
perl-Math-MPFR
perl-Math-Prime-Util-GMP
php-gmp
ppl-gprolog
ppl-utils
python3-gmpy
python3-pycrypto
python-gmpy
python-gmpy2
python-pycrypto
ratpoints
R-igraph
R-igraph0
sawfish-pager
snd
strongswan
swi-prolog-nox
unvanquished
xemacs
xemacs-nox
xemacs-xft

or in form of source packages:

rosa-2016 ~ # urpm-wrb lib64gmp10
4ti2
alex
aqbanking
aria2
botan
cabal-install
cdd
cgal
cln
cloog
cm
cocoalib
control-timeout
coreutils
cross-avr-gcc
cvc3
d0_blind_id
ecl
ecm
flint
fplll
freeminer
gambas3
gap
gcc
gcl
genius
gfan
ghc
ghc-ansi-terminal
ghc-ansi-wl-pprint
ghc-async
ghc-base16-bytestring
ghc-base64-bytestring
ghc-base-orphans
ghc-cabalrpmdeps
ghc-clock
ghc-conduit
ghc-ConfigFile
ghc-convertible
ghc-cpphs
ghc-cryptohash-sha256
ghc-curl
ghc-data-default
ghc-data-default-class
ghc-data-default-instances-containers
ghc-data-default-instances-dlist
ghc-data-default-instances-old-locale
ghc-dataenc
ghc-digest
ghc-dlist
ghc-ed25519
ghc-exceptions
ghc-extensible-exceptions
ghc-FindBin
ghc-hackage-security
ghc-happy
ghc-hashable
ghc-hashtables
ghc-haskeline
ghc-haskell-src
ghc-haskell-src-exts
ghc-HaXml
ghc-HDBC
ghc-hostname
ghc-hslogger
ghc-HsSyck
ghc-html
ghc-HTTP
ghc-HUnit
ghc-hxt
ghc-hxt-charproperties
ghc-hxt-regex-xmlschema
ghc-hxt-unicode
ghc-json
ghc-lhs2tex
ghc-libxml
ghc-lifted-base
ghc-MissingH
ghc-mmap
ghc-mmorph
ghc-monad-control
ghc-mtl
ghc-network
ghc-network-uri
ghc-old-locale
ghc-old-time
ghc-optparse-applicative
ghc-parallel
ghc-parsec
ghc-paths
ghc-polyparse
ghc-primitive
ghc-QuickCheck
ghc-random
ghc-regex-base
ghc-regex-compat
ghc-regex-posix
ghc-regex-tdfa
ghc-resourcet
ghc-sandi
ghc-semigroups
ghc-setlocale
ghc-stm
ghc-strict
ghc-stringsearch
ghc-syb
ghc-tagged
ghc-tagsoup
ghc-tar
ghc-tasty
ghc-tasty-hunit
ghc-tasty-quickcheck
ghc-test-framework
ghc-test-framework-hunit
ghc-test-framework-quickcheck2
ghc-text
ghc-tf-random
ghc-transformers-base
ghc-transformers-compat
ghc-unbounded-delays
ghc-unordered-containers
ghc-utf8-string
ghc-vector
ghc-void
ghc-X11
ghc-X11-xft
ghc-xml
ghc-xmonad
ghc-xmonad-contrib
ghc-zip-archive
ghc-zlib
givaro
gmp
gmsh
gnubg
gnutls
gretl
guile
guile1.8
iml
isl
kcalc
kmymoney
ksi
libalkimia
libktorrent
libmpc
librep
lilypond
linalg-linbox
meshlab
minetest
mpfi
mpfr
mpfrcx
netrek-client-cow
nettle
ntl
numexp-core
ocaml-mlgmp
openscad
openswan
pari
parrot
perl-Crypt-DH-GMP
perl-Math-BigInt-GMP
perl-Math-GMP
perl-Math-GMPq
perl-Math-GMPz
perl-Math-MPC
perl-Math-MPFR
perl-Math-Prime-Util-GMP
php
ppl
python3-gmpy
python3-pycrypto
python-gmpy
python-gmpy2
python-pycrypto
ratpoints
R-igraph
R-igraph0
sawfish-pager
smalltalk
snd
strongswan
swi-prolog
unvanquished
xemacs
zn_poly

coreutils!

rosa-2016 ~ # for i in $(rpm -ql coreutils | grep bin/); do if readelf -a $i | grep NEEDED | grep libgmp; then echo $i; fi; done
 0x0000000000000001 (NEEDED)             Совм. исп. библиотека: [libgmp.so.10]
/bin/expr
 0x0000000000000001 (NEEDED)             Совм. исп. библиотека: [libgmp.so.10]
/usr/bin/expr
 0x0000000000000001 (NEEDED)             Совм. исп. библиотека: [libgmp.so.10]
/usr/bin/factor

So, yes, we can expect libgmp to be a part of default installations of most GNU/Linux distributions.

probonopd added a commit to AppImageCommunity/pkg2appimage that referenced this issue Oct 7, 2019
@probonopd
Copy link
Author

Thanks for your analysis. Added to the list of libraries that are recommended not to be bundled inside AppImages.

@tyu1996
Copy link

tyu1996 commented Oct 11, 2019

I did a file search on both library files "libhogweed*" (this issue's topic) , "libgnutls*" and "libgmp*" (I encountered) inside two freshly installed distro Solus 4.0 and Ubuntu 18.04 without installing extra dev dependencies.

find /usr/lib64/ -name "libhogweed*"
find /usr/lib64/ -name "libgmp**"
find /usr/lib64/ -name "libgnutls**"

Yep, they are all coming along as a part of both systems. This might can support the previous statement by @probonopd .

@agolybev may take a look.

@la55u
Copy link

la55u commented Nov 15, 2019

same issue here, Fedora 31, AppImage v5.4.1

$ ./DesktopEditors-x86_64.AppImage 
./DesktopEditors: symbol lookup error: /lib64/libhogweed.so.5: undefined symbol: __gmpn_cnd_sub_n

@probonopd
Copy link
Author

Again, please do not bundle libgmp.so.10 in the AppImage.

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Dec 16, 2021

This issue is rather old

I've just rechecked it on latest Arch and Fedora 35 with latest stable DesktopEdtiors and it's run fine without any visible errors

image

I'm closing this issue and if you got any other issues with AppImage on another OS (not Arch) - it's better to create a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs
Projects
None yet
Development

No branches or pull requests