You are not logged in.

#26 2015-09-19 21:35:20

gdea73
Member
Registered: 2012-07-16
Posts: 34

Re: updating ncurses break MATLAB

This solution (with the modified PKGBUILD) also saved me and fixed MATLAB, and Wine also shut up about ncursesw.so.5. Thanks for this fix.

Offline

#27 2015-09-20 14:42:39

NM5TF
Member
From: Magdalena, New Mexico USA
Registered: 2015-06-24
Posts: 18
Website

Re: updating ncurses break MATLAB

I just made a softlink like this

sudo ln -s /usr/lib/libncursesw.so.6 /usr/lib/libncursesw.so.5

worked perfectly...

YMMV....


Registered Linux User # 529389
Arch Linux, Linux Mint 18 Sara, Fedora 24 Linux
my improved web page  http://users.gilanet.com/~tfrost

Offline

#28 2015-09-20 15:54:04

mcmillan
Member
Registered: 2006-04-06
Posts: 712

Re: updating ncurses break MATLAB

NM5TF wrote:

I just made a softlink like this

sudo ln -s /usr/lib/libncursesw.so.6 /usr/lib/libncursesw.so.5

worked perfectly...

YMMV....

It worked for now, until something tries to use the libncursesw.so.5 library that is incompatible with libncursesw.so.6. The proper fix is to use the ncurses5-lib-compat package that was already linked

Offline

#29 2015-09-20 17:54:18

NM5TF
Member
From: Magdalena, New Mexico USA
Registered: 2015-06-24
Posts: 18
Website

Re: updating ncurses break MATLAB

seems to be broken links for ncurses5-compat-libs....neither pacman or yaourt can find it....

maybe you can point me to the correct url ???


Registered Linux User # 529389
Arch Linux, Linux Mint 18 Sara, Fedora 24 Linux
my improved web page  http://users.gilanet.com/~tfrost

Offline

#30 2015-09-20 19:02:07

slithery
Member
Registered: 2013-12-01
Posts: 1,346

Re: updating ncurses break MATLAB

A typo from @mcmillan, it's meant to be...
https://aur.archlinux.org/packages/ncurses5-compat-libs

And of course pacman won't find it, it's an AUR package.

Last edited by slithery (2015-09-20 19:02:55)

Offline

#31 2015-09-20 23:04:57

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: updating ncurses break MATLAB

slithery wrote:

A typo from @mcmillan, it's meant to be...
https://aur.archlinux.org/packages/ncurses5-compat-libs

And of course pacman won't find it, it's an AUR package.

Sry if this is a dumb question but I'm still pretty new. I found this thread b/c matlab broke. Do I just use packer to download this? or is there something else I need to do?

Offline

#32 2015-09-20 23:15:58

slithery
Member
Registered: 2013-12-01
Posts: 1,346

Re: updating ncurses break MATLAB

Just install it as you would any other package from the AUR.

Offline

#33 2015-09-20 23:35:04

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: updating ncurses break MATLAB

slithery wrote:

Just install it as you would any other package from the AUR.

This fixed the issue I was getting with ipython, but matlab now has the error

/usr/local/MATLAB/R2015a/bin/glnxa64/need_softwareopengl: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short
MATLAB is selecting SOFTWARE OPENGL rendering.
/usr/local/MATLAB/R2015a/bin/glnxa64/MATLAB: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short

Offline

#34 2015-09-20 23:48:53

anatolik
Developer
Registered: 2012-09-27
Posts: 399

Re: updating ncurses break MATLAB

Sanic wrote:

This fixed the issue I was getting with ipython, but matlab now has the error

/usr/local/MATLAB/R2015a/bin/glnxa64/need_softwareopengl: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short
MATLAB is selecting SOFTWARE OPENGL rendering.
/usr/local/MATLAB/R2015a/bin/glnxa64/MATLAB: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short

It sounds like /usr/lib/libncurses.so.5 at your system is corrupted. Try rebuilding the ncurses5-compat-libs package from AUR. If the problem still exists show us the build log and output of `ls -l /usr/lib/libncurses.so.5`

Offline

#35 2015-09-20 23:56:59

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: updating ncurses break MATLAB

anatolik wrote:
Sanic wrote:

This fixed the issue I was getting with ipython, but matlab now has the error

/usr/local/MATLAB/R2015a/bin/glnxa64/need_softwareopengl: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short
MATLAB is selecting SOFTWARE OPENGL rendering.
/usr/local/MATLAB/R2015a/bin/glnxa64/MATLAB: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short

It sounds like /usr/lib/libncurses.so.5 at your system is corrupted. Try rebuilding the ncurses5-compat-libs package from AUR. If the problem still exists show us the build log and output of `ls -l /usr/lib/libncurses.so.5`

Rebuild as in reinstall?

Offline

#36 2015-09-21 00:00:11

anatolik
Developer
Registered: 2012-09-27
Posts: 399

Re: updating ncurses break MATLAB

Sanic wrote:

Rebuild as in reinstall?

Both. Rebuild the package and install it.

Offline

#37 2015-09-21 00:23:34

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: updating ncurses break MATLAB

anatolik wrote:
Sanic wrote:

This fixed the issue I was getting with ipython, but matlab now has the error

/usr/local/MATLAB/R2015a/bin/glnxa64/need_softwareopengl: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short
MATLAB is selecting SOFTWARE OPENGL rendering.
/usr/local/MATLAB/R2015a/bin/glnxa64/MATLAB: error while loading shared libraries: /usr/lib/libncurses.so.5: file too short

It sounds like /usr/lib/libncurses.so.5 at your system is corrupted. Try rebuilding the ncurses5-compat-libs package from AUR. If the problem still exists show us the build log and output of `ls -l /usr/lib/libncurses.so.5`


I'm not sure how to show the build log from packer. The output from ls -l... is

    -rw-r--r-- 1 root root 18 Sep 20 19:05 /usr/lib/libncurses.so.5

Offline

#38 2015-09-21 06:55:45

navi_se
Member
Registered: 2015-07-06
Posts: 117

Re: updating ncurses break MATLAB

No, it is not corrupt.

You need to replace the lines in the PKGBUILD after

 # fool packages looking to link to non-wide-character ncurses libraries

with

  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

as suggested by user xdggsc here https://bbs.archlinux.org/viewtopic.php … 9#p1563139 in this very thread.

Then rebuild the package and install it.

Offline

#39 2015-09-21 14:04:23

Sanic
Member
Registered: 2015-06-30
Posts: 29

Re: updating ncurses break MATLAB

This worked, thank you!

Offline

#40 2015-09-21 20:04:43

NM5TF
Member
From: Magdalena, New Mexico USA
Registered: 2015-06-24
Posts: 18
Website

Re: updating ncurses break MATLAB

slithery wrote:

A typo from @mcmillan, it's meant to be...
https://aur.archlinux.org/packages/ncurses5-compat-libs

And of course pacman won't find it, it's an AUR package.

that is correct...pacman won't find stuff in the AUR....but yaourt will...automagically...

not familar with yaourt ???

go here:

https://wiki.archlinux.org/index.php/Yaourt

Last edited by NM5TF (2015-09-21 20:05:16)


Registered Linux User # 529389
Arch Linux, Linux Mint 18 Sara, Fedora 24 Linux
my improved web page  http://users.gilanet.com/~tfrost

Offline

#41 2015-09-21 21:19:19

htedrom
Member
Registered: 2012-04-21
Posts: 21

Re: updating ncurses break MATLAB

thanks for this, worked perfectly and rescued my matlab

Offline

#42 2015-09-21 21:46:40

ag
Member
Registered: 2015-09-21
Posts: 2

Re: updating ncurses break MATLAB

xgdgsc wrote:
Minbari wrote:

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.

Yes, this worked for me. Thank you. Although Matlab runs now and I ran some benchmark tests too using bench(2) in Matlab, but it still gives some warnings in the terminal when I first invoke it.

libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  31
  Current serial number in output stream:  34

This is not presenting any functional problem for me, but I still would like to understand how to read, interpret and follow on this warning/error. Can anyone guide me on this?

Offline

#43 2015-09-21 22:33:35

Alad
Wiki Admin/IRC Op
Registered: 2014-05-04
Posts: 1,507

Re: updating ncurses break MATLAB

NM5TF wrote:

that is correct...pacman won't find stuff in the AUR....but yaourt will...automagically...

not familar with yaourt ???

go here:

https://wiki.archlinux.org/index.php/Yaourt

Please refrain from such horrible advice.

http://jasonwryan.com/blog/2013/04/09/helpers/


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
User:Alad

Offline

#44 2015-09-22 10:23:59

solariiknight
Member
Registered: 2014-05-30
Posts: 7

Re: updating ncurses break MATLAB

Thanks for the solutions here. It helped me to overcome the same problem with MATLAB

Offline

#45 2015-09-22 10:28:17

navi_se
Member
Registered: 2015-07-06
Posts: 117

Re: updating ncurses break MATLAB

OP, remember to mark this thread as solved.

Offline

#46 2015-09-22 16:37:58

vishwin
Member
From: /dev/us/by-state/pa
Registered: 2013-07-12
Posts: 11

Re: updating ncurses break MATLAB

This apparently broke vmware-installer too. Much thanks for compat-libs.


ThinkPad W550s: Intel Core i7-5500U | 8 GB DDR3L RAM | Nvidia Quadro K620M 2 GB DDR3 VRAM | 128 GB SSD | 1 TB WD Blue HDD
Retired: Lenovo IdeaPad Y580

Offline

#47 2015-09-23 16:58:00

srivats2
Member
Registered: 2015-06-04
Posts: 6
Website

Re: updating ncurses break MATLAB

OP hasn't marked this as solved yet so let me just post something simpler too. While the AUR option is great you can also just do a simple build of the ncurses 5.9 (latest v5) and do this WITHOUT root privileges (run only as a NON-SUDO user!!!!).

Get the source and untar :
http://ftp.gnu.org/gnu/ncurses/

Make sure you have GCC 4.7.4 (AUR). I haven't tested with any other GCC 4.x.x but I think it should work. The compile wont work with GCC 5.2.0 so don't bother.

Open up a fresh terminal (ha! Newbie corner). Type in

 export CC=gcc-4.7 
 ./configure --prefix=some_path_in_your_home_folder/bin/ --with-shared

We will make sure that the library is built locally in some folder in home well away from all the system stuff. Also we are building shared libs and not static. After configure, its the usual make and then REMEMBER to make install.
All this as a non sudo user and if you haven't messed up your --prefix as shown above then configure will show you the final paths and make install will finally create the /some_path_in_your_home_folder/bin/ and if the compile was successful then you will get a /lib/ folder under which you will have all the lib files.

All you have to do now is find and cd to your matlab executable directory and do a ln -s /some_path_in_your_home_folder/bin/lib/libncurses.so.5 libncurses.so.5

This is harmless and doesn't affect a single thing on your system and every matlab executable or program that needs this you can just do soft links. Don't even bother putting this in as your LD_LIBRARY_PATH and that way its entirely safe.

Offline

#48 2015-09-24 00:40:50

anatolik
Developer
Registered: 2012-09-27
Posts: 399

Re: updating ncurses break MATLAB

srivats2 wrote:

OP hasn't marked this as solved yet so let me just post something simpler too

I do not think your solution is simpler. And it is definitely wrong to compile a binary with ancient GCC and manually put shared libraries somewhere at your filesystem. Let package manager handle the system binaries.

Offline

#49 2015-09-24 07:12:45

srivats2
Member
Registered: 2015-06-04
Posts: 6
Website

Re: updating ncurses break MATLAB

Anatolik wrote:

And it is definitely wrong to compile a binary with ancient GCC and manually put shared libraries somewhere at your filesystem. Let package manager handle the system binaries.

It's maybe not simpler than getting it from aur but there is nothing "wrong" in compiling a library that is not used at system level and soft linking it. This is NOT a library that is used at the system level anymore. Besides gcc 4.7 is from last year and is not ancient. Sigh...

Offline

#50 2015-09-26 22:10:07

andradx
Member
From: Portugal
Registered: 2015-07-16
Posts: 10

Re: updating ncurses break MATLAB

Apologies in advance if I'm bumping this. I solved my problem by going to the local cache of pacman and downgraded to ncurses5. As said that pretty much breaks just about everything on the system (well, it's manageable). Then for some reason I need to update again. Since libncurses5.7 and 5.9 were not compiling for my GCC version and I avoid going down that road I took another approach. I have access to an Ubuntu box whose libncurses are at 5.9, so I took libncurses.so.5.9 and libtinfo.so.5.9 from one of the Ubuntu workstations at my lab. I placed them somewhere, made a sym link to them as libncurses.so.5 and libtinfo.so.5. Them I add the somewhere to my LD_LIBRARY_PATH.


Matlab is up and running. I would make an AUR package if I knew how and had the time (thesis submission coming up in 5 days). If anyone is interested, the libs can be found here and here.


Hope this helps.


I like my offshore with longboard and shorts

Offline

Board footer

Powered by FluxBB