Getting error when adding OSSubprocess to my Pharo 6.1 on Centos 7.4x
Asked Answered
T

1

1

I wanted to mess around with OSSubprocess (written by Mariano Martinez Peck) from my Pharo 6.1 on my CentOS 7.4.

I searched within the Pharo Project Catalog and tried to install it.

I got an error:

ioLoadModule(/home/smalltalk/App/pharo6.1-64/pharo-vm/lib/pharo/5.0-201805090836/libgit2.so):
  libcurl-gnutls.so.4: cannot open shared object file: No such file or directory
tryLoading(/home/smalltalk/App/pharo6.1-64/pharo-vm/lib/pharo/5.0-201805090836/libgit2.so/.libs/,libgit2.so): stat(/home/smalltalk/App/pharo6.1-64/pharo-vm/lib/pharo/5.0-201805090836/libgit2.so/.libs/) Not a directory
ioLoadModule(/home/smalltalk/App/pharo6.1-64/pharo-vm/lib/pharo/5.0-201805090836/libgit2.so):
  libcurl-gnutls.so.4: cannot open shared object file: No such file or directory
tryLoading(/home/smalltalk/App/pharo6.1-64/pharo-vm/lib/pharo/5.0-201805090836/libgit2.so/.libs/,libgit2.so): stat(/home/smalltalk/App/pharo6.1-64/pharo-vm/lib/pharo/5.0-201805090836/libgit2.so/.libs/) Not a directory

Apparently, some libraries as libcurl-gnutls are needed by the libgit2.so.

ls -la | grep git
-rw-r--r--. 1 smalltalk smalltalk 3019447 May  9 08:55 libgit2.so
-rw-r--r--. 1 smalltalk smalltalk 3019447 May  9 08:55 libgit2.so.0.25.1
-rw-r--r--. 1 smalltalk smalltalk 3019447 May  9 08:55 libgit2.so.25
[smalltalk@smalltalk 5.0-201805090836]$ pwd
/home/smalltalk/App/pharo6.1-64/pharo-vm/lib/pharo/5.0-201805090836

When I check the dependencies with ldd libgit2.so:

ldd: warning: you do not have execution permission for `./libgit2.so'
    linux-vdso.so.1 =>  (0x00007ffcd7aea000)
    libcurl-gnutls.so.4 => not found
    libz.so.1 => /lib64/libz.so.1 (0x00007f09ff332000)
    libssl.so.1.0.0 => not found
    libcrypto.so.1.0.0 => not found
    libssh2.so.1 => /lib64/libssh2.so.1 (0x00007f09ff107000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f09feeff000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f09fece3000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f09fe91f000)
    libssl.so.10 => /lib64/libssl.so.10 (0x00007f09fe6ad000)
    libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f09fe24c000)
    /lib64/ld-linux-x86-64.so.2 (0x000056133cf8c000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f09fdffe000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f09fdd16000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f09fdb12000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f09fd8de000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f09fd6da000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f09fd4cc000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f09fd2c7000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f09fd0ad000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f09fce85000)
    libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f09fcc23000)

The issue is apparently with:

    libcurl-gnutls.so.4 => not found
    libssl.so.1.0.0 => not found
    libcrypto.so.1.0.0 => not found

libcurl-gnutls.so.4 library is not apparently shipped with CentOS 7 at all:

We just don't supply anything called libcurl-gnutls* at all. Our curl doesn't use gnutls.

libssl.so.1.0.0 is ancient (same goes for libcrypto.so.1.0.0). If I check my libssl:

sudo ls -l /usr/lib64/libssl*
-rwxr-xr-x. 1 root root 341024 May 16 17:20 /usr/lib64/libssl3.so
lrwxrwxrwx. 1 root root     16 Jan 31 13:40 /usr/lib64/libssl.so -> libssl.so.1.0.2k
lrwxrwxrwx. 1 root root     16 Jan 31 13:34 /usr/lib64/libssl.so.10 -> libssl.so.1.0.2k
-rwxr-xr-x. 1 root root 470336 Aug  4  2017 /usr/lib64/libssl.so.1.0.2k

sudo ls -l /usr/lib64/libcrypto*
lrwxrwxrwx. 1 root root      19 Jan 31 13:40 /usr/lib64/libcrypto.so -> libcrypto.so.1.0.2k
lrwxrwxrwx. 1 root root      19 Jan 31 13:34 /usr/lib64/libcrypto.so.10 -> libcrypto.so.1.0.2k
-rwxr-xr-x. 1 root root 2512448 Aug  4  2017 /usr/lib64/libcrypto.so.1.0.2k

The CentOS 7 details are:

   Static hostname: smalltalk
         Icon name: computer-vm
           Chassis: vm
        Machine ID: beb4030b979d4cdcbf51ec99034121fc
           Boot ID: 02ef7d00b2e74489bdb78dead7e2fcf8
    Virtualization: kvm   Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.17.1.el7.x86_64
      Architecture: x86-64

Now the million dollar question:

How do you deal with such a situation? Is there a reasonable way to recompile the whole Pharo VM or just the libgit2 library against the newer libraries' versions?

Tui answered 18/7, 2018 at 10:11 Comment(1)
Did anyone played with it?Tui
V
1

This seems related to a question asked here: http://forum.world.st/Pharo-download-with-wget-td5099253.html

The suggested solution in the thread and the one that also works for me is to created a symbolic link:

ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl-gnutls.so.4
Venter answered 23/9, 2020 at 9:2 Comment(1)
I'll try it out when I get back to it.Tui

© 2022 - 2024 — McMap. All rights reserved.