GLIBCXX_3.4.15, GLIBC_2.15 and GLIBC_2.14 not found - Centos 6.5 - glibc

I am trying to run an app but I get
...
/usr/lib64/libstdc++.so.6: VERSION 'GLIBCXX_3.4.15' not found
/lib64/libc.so.6: VERSION 'GLIBC_2.15' not found
/lib64/libc.so.6: VERSION 'GLIBC_2.14' not found
...
When I do "strings /usr/lib64/libstdc++.so.6 | grep GLIBC" i get a normal list...
...
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
...
GLIBCXX_3.4.13
GLIBCXX_2.2.5
GLIBCXX_2.3.2
...
I don't seem to find a simple tutorial on how to install the missing libs/files/dependencies, (or Centos 6.5 or anything else for that mater).
Can someone explain how to install whatever might be missing on Centos?

Can someone explain how to install whatever might be missing on Centos?
You need glibc >= 2.15 and libstdc++ >= 3.4.15.
In theory, installing e.g. glibc-2.19 on the system should work (glibc provides backward binary compatibility), but this message suggests that you would not find a standard package for your OS with such an upgrade.
Instead you would have to either install a second version of glibc, as documented here, and redirect your application to use that version by binary-patching the loader encoded into the application, or run your application in a chroot (where you can install any version of glibc you like).
Similar considerations apply to libstdc++.so.6 as well, except you don't have to install it into the fixed location -- you can install newer copy anywhere, and point LD_LIBRARY_PATH to it.
Your final (and most likely easiest) alternative is to build the app you are trying to run from source, or obtain a pre-built binary for your distribution (one that doesn't require newer libraries than what you have).

Related

appImage-builder V1.0.3

I am trying to use the latest version of the appImage-builder because appimages of my application built with the old version of appImage-builder do not run on ubuntu 22.04 anymore. So I got the order to try and see if it works with the new appImage-builder.
Currently (June 2022), only versions below 1.0 which are based on ubuntu 18.04 are available on docker (which we previously used to build our appimage).
The newer versions are available via github (https://github.com/AppImageCrafters/appimage-builder/releases).
However, I seem to be unable to execute:
appimage-builder --generate
or
appimage-builder --recipe AppImageBuilder.yml
Is there any documentation available on how to correctly use the .appimage version of appImage-builder? All I could find in https://appimage-builder.readthedocs.io/en/latest/ seems to refer to the docker version or a manually built version of appImage-builder.
Depending on the error message you get, there could be a couple of issues at play here.
If you got an error related to FUSE, then you need to install the libfuse2 package with apt install libfuse2. AppImages rely on libfuse2, but Ubuntu has stopped including it since 22.04, in favor of libfuse3.
If you get an error related to "file not found", then it could be that you do not have AppImageLauncher installed. Sadly, with type 2 AppImages the design decision was taken to modify the ELF header of the executable with 3 magic bytes at offset 8 of the executable. This means that Linux linkers will not run the file. AppImageLauncher actually copies the file to a temporary directory and zeroes out the magic number in order to be able to execute it.
A good starting point for debugging issues like this is to run the strace command, which will let you see which system call likely cause the error. Keep in mind that if you try to execute a file and you get File not found, it might mean that the linker specified by the file can not be found on the system or the ELF header is not valid. You can also run the executable by using the linker directly, which might give you more clues. For example with: /lib64/ld-linux-x86-64.so.2 <NAME-OF-YOUR-EXECUTABLE>.

Installing V8 required by rstan on gentoo

is there a way to install rstan on a Gentoo amd64 system? rstan depends on v8-r (https://cran.r-project.org/web/packages/V8/index.html), which depends on a v8 installation. I haven't found a working v8 ebuild, v8 failed to compile with didactic-duck ebuilds. I also tried nodejs, without success. Compiling v8 from source failed with "unsupported linux distro".
Thanks, Sven
UPDATE: as of the latest version of V8 you can use:
# For Linux: download libv8 during installation
Sys.setenv(DOWNLOAD_STATIC_LIBV8=1)
install.packages("V8")
This way, you can install the V8 package on any x64 Linux system, without separate system requirements. See also this post: https://ropensci.org/technotes/2020/11/12/installing-v8/
Original answer
The R package V8 simply needs libv8 headers and shared library. The best solution is to use the V8 engine from NodeJS, but this can only be done if NodeJS itself was built with the --shared option. I don't use Gentoo myself, but from the above I guess this is currently not the case.
You have to talk to the maintainer of the nodejs package in Gentoo, and ask them to enable shared libnode. Below some references about this from Fedora and Debian, that might get you started:
Fedora: https://src.fedoraproject.org/rpms/nodejs/pull-request/4 and https://src.fedoraproject.org/rpms/R-V8
Debian: https://packages.debian.org/bullseye/libnode-dev and https://packages.debian.org/bullseye/r-cran-v8
If you can't get this to work, you could also build libv8 yourself, but I have to warn you this is pretty painful because upstream changes their API and build system every few weeks.
Some working examples are:
Homebrew: https://github.com/homebrew/homebrew-core/blob/master/Formula/v8.rb
Arch: https://aur.archlinux.org/packages/v8-r/
Same problem here.
I am afraid I don't have an answer myself. If it helps, the furthest that I have gone is to install "nodejs" and then manually try to install V8 from source:
R CMD INSTALL --configure-vars='INCLUDE_DIR=/usr/include/node/deps/v8/include LIB_DIR=/usr/include/node/libplatform' V8_3.2.0.tar.gz
But CRAN complains about "cannot find -lv8_libplatform", and with other combinations of INCLUDE_DIR and LIB_DIR I have not succeeded.
I have also tried several ebuilds from didactic-duck and even one from petkovich.
Also, installing from source seems to be impossible.
What "nodejs" install is the following, in case someone else has an idea about how to combine INCLUDE_DIR and LIB_DIR, or at least to enlight whether with nodejs is enough, or a full v8 installation is needed:
/usr/include/node/v8-fast-api-calls.h
/usr/include/node/v8-internal.h
/usr/include/node/v8-platform.h
/usr/include/node/v8-profiler.h
/usr/include/node/v8-util.h
/usr/include/node/v8-value-serializer-version.h
/usr/include/node/v8-version-string.h
/usr/include/node/v8-version.h
/usr/include/node/v8-wasm-trap-handler-posix.h
/usr/include/node/v8-wasm-trap-handler-win.h
/usr/include/node/v8.h
/usr/include/node/v8config.h
/usr/include/node/deps/v8
/usr/include/node/deps/v8/include
/usr/include/node/libplatform/v8-tracing.h
Thank you very much.

Ubuntu BYACC / BTYACC Syntax error

I'm trying to compile the libxkbcommon library for kodi for my Raspberry Pi 2.
The host machine is a dedicated Server running Ubuntu 16.04 x64.
Now there are two errors when I'm trying to compile libxkbcommon, depending on what yacc I'm using:
byacc:
YACC src/xkbcomp/parser.c
yacc: e - line 219 of
"/opt/kodi/xbmc/tools/depends/target/libxkbcommon/raspberry-pi2-release/src/xkbcomp/parser.y", syntax error
%destructor { FreeStmt((ParseCommon *) $$); }
^
Makefile:1637: recipe for target 'src/xkbcomp/parser.c' failed
btyacc:
parser.y:85: syntax error
Here is the source code of libxkbcommon:
https://github.com/xkbcommon/libxkbcommon
The xbcomp/parser.y file requires a number of (very useful) bison extensions, so it can't be processed by all yacc variants.
btyacc does not support bison-compatible pure-parser declarations. (It has a different, not entirely compatible mechanism which implements the same feature.) So it fails on the first instance of one of those declarations.
It should be possible to use byacc, but not the version which is available in the Ubuntu package repository. Although the Ubuntu package repository change history seems to suggest that the intention was to include the build option which allows %destructor, the actual binary currently available in the byacc repository was built without that option. (It is also several years old, and I think it would be useful to use a more recent version.) I reported this as launchpad bug 1776270, along with a suggestion for a possible fix.
I'm sure you'll be able to build the software using Gnu bison, which is available as the Ubuntu package bison. Since that's the most popular yacc version installed on developer machines, a failure to build with bison would probably have been noticed long ago.
If you would prefer to use byacc, for whatever reason, you'll have to download and build it yourself. You can get the most recent version from Thomas Dickey's byacc page, and then build it with the usual procedure: untar, configure, make, make install. When I tested this, I used the following configure line:
./configure --enable-btyacc --program-prefix=b --prefix=/usr
Only the first option is mandatory
* --program-prefix=b Install it as `byacc` rather than `yacc`
* --enable-btyacc Necessary for %destructor support
* --prefix=/usr Install it in /usr/bin and /usr/man. The default
is /usr/local/bin and /usr/local/man, which failed on
my Ubuntu install because of a missing -D option in the
install command in the Makefile.

GTK3 compilation won't find GLib2.0, which I actually compiled. What am I missing?

The last days I struggled with libraries (GLib2.52.2 & GTK3.22.15), while I tried to compile them on Ubuntu 16.04 LTS (fresh installation).
The GLib2.52.2 just compiled without errors after installing the needed dependencies.
My problem is following:
when I want to start compilation of GTK3.22.15
$ ./configure --prefix=/usr --with-pcre=system && make -j 6
I get this error message:
configure: error: Package requirements (glib-2.0 >= 2.49.4 atk >= 2.15.1 pango >= 1.37.3 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0) were not met:
Requested 'glib-2.0 >= 2.49.4' but version of GLib is 2.48.2
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS
and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
SOLVED EDIT
I got a suggestion from AskUbuntu to compile everything in /usr/local to prevent conflicts, in some cases with official repository updates.
$ ./configure --prefix=/usr/local --with-pcre=system && make -j 6
Did solve my problem under these conditions. I didn't touch anything more, referring to the other so said "not matching" dependencies, to compile GTK3 (3.22.15) after recompiling GLib2.0 (2.52.2) in /usr/local.
Requested 'glib-2.0 >= 2.49.4' but version of GLib is 2.48.2
When compiling libraries for Gnome or Gtk, you frequently have to update other libraries too. If you download gtk3 from the ubuntu repositories (use the synaptic package manager to search for gtk3 or gtk+-3.0), you will see that you will not only download gtk3, but a pile of other libraries gtk3 needs. In case of using the repositories (recommended!) the system will take care of everything.
I'm not an Ubuntu user, but I am interested in the behind-the-scenes part, so I frequently compile libraries, and I have to do this manually. So, to install a new version of gtk3, I have to first compile and update glib. After doing so, I might also have to update Pango, ATK, and several other libraries first. If you like losing time with such stuff, go for it! Else consider using the repositories.

Building libzmq with libsodium

Edit as of ZMQ version 4.1:
Configure automatically looks for libsodium, so this is no longer required. If for some reason you wish to build it WITHOUT libsodium and you have it built and installed, configure libzmq with '--without-libsodium'.
So I'm having problems building/making zeromq with libsodium.
im using msys2 as the shell - specifically the mingw32_shell - , and zmq 4.1.0 rc1 with libsodium 1.0.1 and mingw-w64 32bit (gcc 4.9.2).
im currently able to compile libsodium like this
cd .../libsodium
bash configure
make
make check
make install
and everything is fine, all the tests pass and the libs and includes end up in the /usr/local/ folders that msys2 seems to know about.
then when i try to build zeromq with these commands
cd .../zeromq
bash configure --with-libsodium
make
make check
make install
i never get past the configure stage, as configure returns
checking for sodium_init in -lsodium... no
configure: error: libsodium is not installed. Install it or don't pass --with-libsodium to configure script
i have tried the methods suggested in this post - ZeroMQ doesn't spot libsodium - but to no success.
therefore my question is thus: how do i either set the locations for zeromq's configure to look for libsodium to spot, whether with --with-libsodium, --with-libsodium-include-dir= and --with-libsodium-lib-dir=, or have them 'installed' in a location that msys2's shell is able to find?
I assume you tried it already since the link you provided mentions it:
--with-libsodium=/usr/local
I tried this and it worked for me. However, I don't recommend this because for MSYS2, it is cleaner if /usr/local is used only for MSYS2 software, and not MinGW-w64 software. For MinGW-w64 i686 software, the 'right' prefix for 'local' is /mingw32/local
I've just now added libsodium as a dependency on the zeromq package.
Github MinGW-w64 zeromq PKGBUILD commit e32ae0
I will ask Alexey to rebuild and repackage it tomorrow.

Resources