You are not logged in.
I've just updated my system and now MATLAB no longer start and says:
[fabio@macbook bin]$ ./matlab
/home/fabio/Matlab/bin/glnx86/MATLAB: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
is there a way to make MATLAB use the new version of ncurses or I'm forced to downgrade that package?
Last edited by fabioamd87 (2015-09-18 09:24:24)
Offline
Did you rebuild it against the new lib? It's your job to manage unofficial packages.
Offline
ok I think I've made a disaster.
I've downgrade ncurses to the 5 version and now the systemd doesn't boot. even worse I can't chroot to it because sh ask for the 6 version of ncurses
Offline
You're not alone! I did the same thing. The solution in this reddit comment fixed it for me.
https://www.reddit.com/r/archlinux/comm … te/cv5f9q8
Also I re-installed Matlab (2015a and 2015b) and it still won't run with the new ncurses.
Offline
wow I did the same command but finding the solution in pacman manual, I feel a little proud of myself... too sad about MATLAB, I need it...
I have to use 32bit arch (macbook1,1) so the maximum version of matlab is the 2010b version (or something like that)
Last edited by fabioamd87 (2015-09-18 09:26:46)
Offline
Is matlab distributed as a prebuild binary? If yes and if the latest matlab depends on libncurses.so.5 then the only way to solve the issue is to build and install ncurses version 5 by yourself. It should be easy to add ncurses-5 package to AUR.
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
is there a way to create a script to force MATLAB to use the ncurses library that it need from a custom directory (LD_LIBRARY_PATH)?
Last edited by fabioamd87 (2015-09-18 10:02:24)
Offline
is there a way to create a script to force MATLAB to use the ncurses library that it need from a custom directory (LD_LIBRARY_PATH)?
Why do you want to do it?
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
I don't want to touch my system but find a smart solution to make MATLAB find what it needs
Offline
The solution for your problem is to create ncurses-5 package. Unfortunately I am out of my workstation right now and cannot create the AUR package. But it should be easy enough to do. Could anyone create such package please?
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
but it this way the rest of the system will use the 5 or the 6 version? the two version will coexist?
I temporarily solved by downloading the 5 version, extracted to my home, and creating this script (in my home too):
#!/bin/bash
LD_LIBRARY_PATH=ncurses-5.9-7/usr/lib/ ./Matlab/bin/matlab
if things goes well, I no longer need MATLAB after my exam in November.
So we can say that from now MATLAB no longer works on archlinux out of the box, (2010 and 2015)
Last edited by fabioamd87 (2015-09-18 10:38:26)
Offline
The rest of the system (from official repos) will be using version 6, more precisely libncurses.so.6 shared library. But Matlab you use was compiled and depends on libncurses.so.5. And because you have no sources you cannot recompile it against newer ncurses.
AUR package can install libncurses.so.5 without conflicting with ncurses from official package. It is a standard way to solve this kind of problems. For example we have 3 versions of "vte" package in official repos each provides its own versions of shared libraries.
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
So we can say that from now MATLAB no longer works on archlinux out of the box, (2010 and 2015)
This depends on the definition of OOTB. Consider all those AUR packages depending on other AUR packages. None of them runs OOTB. If you look at the extensive PKGBUILD for Matlab on the AUR, you will not find this quite the OOTB experience either. I'd agree, if you said, that running Matlab on Archlinux now sucks even more than before.
EDIT: I dropped a link to this discussion on the matlab in the AUR.
EDIT2: Is it time to read more about readelf, ldd, objdump and binary patching?
EDIT3: glnx86 indicates a 32 bit version, if I'm not mistaken. Take that into account as well.
EDIT4: Also see https://help.ubuntu.com/community/MATLAB, there are several instances, when a library version is mentioned in a shell script and not as an elf dependency. Search all files for the old soname.
Last edited by Awebb (2015-09-18 12:00:56)
Offline
This depends on the definition of OOTB. Consider all those AUR packages depending on other AUR packages. None of them runs OOTB. If you look at the extensive PKGBUILD for Matlab on the AUR, you will not find this quite the OOTB experience either.
Infact If I'm not wrong I used that package to install all the dependecies.
I'd agree, if you said, that running Matlab on Archlinux now sucks even more than before.
I mean that.
EDIT2: Is it time to read more about readelf, ldd, objdump and binary patching?
Right now the exam have the priority, I just need a way to make MATLAB works. Maybe after the exam, but then I will no longer need MATLAB.
Offline
As a quick fix, try hardlinking or copying the .so.6 to .so.5 and pray, that the API hasn't changed, where Matlab needs it.
Offline
is better than my solution?
Offline
No, your solution is fine, too.
Offline
Copying the old libncurses.so.5* into /usr/lib also seems to work.
Perhaps somebody is willing to create an ncurses5 package in AUR? I don't have time to finish it now.
I almost made it by copying the relevant PKGBUILD for ncurses-5.9-7 from (git://projects.archlinux.org/svntogit/packages.git), and applying this patch (https://sources.gentoo.org/cgi-bin/view … iew=markup) to compile it. The outcome package does not install, as it tries to overwrite some ncurses 6.0-3 files.
Offline
Yes, it seems that matlab is happy with just having the old libncurses.so.5 file.
I extracted the file from the old package and tested it. It seems to work fine now.
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
Awebb's suggestion did the trick in my case. Even softlinking is sufficient. All that was needed was:
cd /usr/lib
ln -s libncursesw.so.6 libncurses.so
I didn't check everything, but it at least starts up normally again.
Offline
I made a PKGBUILD that only installs the shared library files for libncurses5. This is my first PKGBUILD, it's not very good, and I made it in a hurry because I need MATLAB (I believe ncurses6 also breaks tmux-git)
I just remove a bunch of things I don't need, I do not think that programs can link to this library using -lncurses5 or anything. But it puts libncurses.so.5 where it needs to be in order for MATLAB to run.
in order for the PGP verification to succeed, you need to import Thomas Dickey's PGP key:
gpg --keyserver pgp.mit.edu --recv-keys C52048C0C0748FEE227D47A2702353E0F7E48EDB
# $Id$
# Maintainer: Dennis Ogbe <dogbe@purdue.edu>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=libncurses5
pkgname_c=ncurses
pkgver=5.9
pkgrel=7
pkgdesc='System V Release 4.0 curses emulation library -- Shared Libraries only'
arch=('i686' 'x86_64')
url='http://invisible-island.net/ncurses/ncurses.html'
license=('MIT')
depends=('glibc' 'gcc-libs' 'sh')
provides=('libmenu.so.5' 'libpanel.so.5' 'libform.so.5' 'libncurses.so.5' 'libncurses++w.so.5'
'libformw.so.5' 'libmenuw.so.5' 'libpanelw.so.5' 'libncursesw.so.5')
source=(ftp://invisible-island.net/ncurses/ncurses-${pkgver/_/-}.tar.gz{,.asc}
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/ncurses/files/ncurses-5.9-gcc-5.patch)
md5sums=('8cb9c412e5f2d96bc6f459aa8c6282a1'
'SKIP'
'57f4cd0cc0c0a42a5ddb2167f9546d72')
validpgpkeys=('C52048C0C0748FEE227D47A2702353E0F7E48EDB') # Thomas Dickey
prepare() {
mkdir ncurses{,w}-build
cd "${srcdir}"/$pkgname_c-${pkgver/_/-}
patch -Np1 -i ../ncurses-5.9-gcc-5.patch
}
build() {
cd ncursesw-build
../$pkgname_c-${pkgver/_/-}/configure --prefix=/usr --mandir=/usr/share/man \
--with-shared --with-normal --without-debug --without-ada \
--enable-widec --enable-pc-files --with-cxx-binding --with-cxx-shared
# add --enable-ext-colors and --enable-ext-mouse with next soname bump
make
# libraries for external binary support
cd ${srcdir}/ncurses-build
[[ $CARCH = "x86_64" ]] && CONFIGFLAG="--with-chtype=long"
../$pkgname_c-${pkgver/_/-}/configure --prefix=/usr \
--with-shared --with-normal --without-debug --without-ada $CONFIGFLAG \
--with-cxx-binding --with-cxx-shared
make
}
package() {
cd ncursesw-build
make DESTDIR="$pkgdir" install
# install shared libraries
cd "$srcdir"/ncurses-build
for lib in ncurses form panel menu; do
install -Dm755 lib/lib${lib}.so.${pkgver%_*} "$pkgdir"/usr/lib/lib${lib}.so.5
rm -rf "$pkgdir"/usr/lib/lib${lib}w.so
rm -rf "$pkgdir"/usr/lib/lib${lib}w.a
done
# install license, rip it from the readme
cd "$srcdir"/$pkgname_c-${pkgver/_/-}
install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
grep -B 100 '$Id' README > "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
# we only want the shared libraries, everything else can go
for folder in emacs man tabset; do
rm -rf "$pkgdir"/usr/share/${folder}
done
rm -rf "$pkgdir"/usr/bin
rm -rf "$pkgdir"/usr/include
rm -rf "$pkgdir"/usr/lib/pkgconfig
# remove static library files
for lib in ncurses{,++} form panel menu; do
rm -rf "$pkgdir"/usr/lib/lib${lib}w.a
done
}
I'd appreciate some feedback on how to make this a "proper" PKGBUILD. Thanks to jacopo123 for pointing me to the GCC5 patch.
Offline
Package build works fine but when I try to install it give the following error:
error: failed to commit transaction (conflicting files)
libncurses5: /usr/lib/terminfo exists in filesystem
libncurses5: /usr/share/terminfo/1/1178 exists in filesystem
libncurses5: /usr/share/terminfo/1/1730-lm exists in filesystem
...........................................................................................
libncurses5: /usr/share/terminfo/z/ztx-1-a exists in filesystem
libncurses5: /usr/share/terminfo/z/ztx11 exists in filesystem
Errors occurred, no packages were upgraded.
UNIX is user-friendly. It's just very selective about who is friends are.
Offline
Solved using ncurses5-compat-libs from AUR .
UNIX is user-friendly. It's just very selective about who is friends are.
Offline
Solved using ncurses5-compat-libs from AUR .
I get :
error while loading shared libraries: /usr/lib/libncurses.so.5: file too short
after installing this.
changing the PKGBUILD to
# $Id: PKGBUILD 246362 2015-09-15 03:51:08Z foutrelis $
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=ncurses5-compat-libs
_pkgname=ncurses
pkgver=6.0
pkgrel=1
pkgdesc='System V Release 4.0 curses emulation library, ABI 5'
arch=('i686' 'x86_64')
url='http://invisible-island.net/ncurses/ncurses.html'
license=('MIT')
depends=('glibc' 'gcc-libs' 'sh')
source=(ftp://invisible-island.net/ncurses/ncurses-${pkgver/_/-}.tar.gz{,.asc})
md5sums=('ee13d052e1ead260d7c28071f46eefb1'
'SKIP')
validpgpkeys=('C52048C0C0748FEE227D47A2702353E0F7E48EDB') # Thomas Dickey
build() {
cd $_pkgname-${pkgver/_/-}
./configure --prefix=/usr --mandir=/usr/share/man \
--with-shared --with-normal --without-debug --without-ada \
--enable-widec --enable-pc-files --with-cxx-binding --with-cxx-shared \
--with-abi-version=5
make
}
package() {
cd $_pkgname-${pkgver/_/-}
make DESTDIR="$pkgdir" install.libs
rm -rf "$pkgdir"/usr/include/ "$pkgdir"/usr/lib/pkgconfig "$pkgdir"/usr/lib/*.so
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses ncurses++ form panel menu; do
ln -s /usr/lib/lib${lib}w.so.5 "$pkgdir"/usr/lib/lib${lib}.so.5
done
# install license, rip it from the readme
install -d "$pkgdir"/usr/share/licenses/$pkgname
grep -B 100 '$Id' README > "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
would do.
Last edited by xgdgsc (2015-09-19 04:02:51)
Offline
You are right @xgdgsc, not all programs are working with that PKGBUILD, some are giving that error:
error while loading shared libraries: /usr/lib/libncurses.so.5: file too short
.
Looks like that modify You suggested did the trick. Thank You!
for lib in ncurses ncurses++ form panel menu; do
ln -s /usr/lib/lib${lib}w.so.5 "$pkgdir"/usr/lib/lib${lib}.so.5
donewould be better for users that would use the lib directly instead of linking.
UNIX is user-friendly. It's just very selective about who is friends are.
Offline