Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 208161
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jiri Tyr <jiri.tyr@e-learning.tul.cz>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
emul-linux-x86-glibc-errno-compat-2.5.ebuild emul-linux-x86-glibc-errno-compat-2.5.ebuild text/plain SpanKY 2008-02-17 09:57 0000 1.65 KB Details
glibc-errno-wrapper files/glibc-errno-wrapper text/plain SpanKY 2008-02-17 09:57 0000 75 bytes Details
matlab.log matlab.log text/plain Jiri Tyr 2008-02-20 16:44 0000 12.79 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 208161 depends on: Show dependency tree
Bug 208161 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-01-30 10:47 0000
I have the same problem like in bug report #198657. I use old version of Matlab
application on product machine and it doesn't work anymore since I upgraded
glibc to version 2.6.1.

It's possible to compile glibc-2.6.1 with GLIBC_2.0 support? Or it's necessary
to downgrade glibc to version 2.5-r4? If so, how it will be with system
updates? If it doesn't work, I have to install an other distribution then
Gentoo because I need support for GLIBC_2.0.

$ emerge --info
Portage 2.1.3.19 (default-linux/x86/2007.0/server, gcc-4.1.2, glibc-2.6.1-r0,
2.6.23.9 i686)
=================================================================
System uname: 2.6.23.9 i686 AMD Athlon(tm) MP 2400+
Timestamp of tree: Tue, 29 Jan 2008 22:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-mp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias
/var/qmail/control /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild
/etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-mp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer sandbox sfperms strict
unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirror.web4u.cz
http://pandemonium.tiscali.de/pub/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow acl apache2 berkdb cli cracklib crypt dri fortran gdbm gpm iconv
ipv6 isdnlog logrotate mailwrapper midi mmx mudflap mysql ncurses nls openmp
pam pcre perl posix pppd python readline reflection session snmp spl sse ssl
unicode x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem
bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801
hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem
ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug
file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate
route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias
authn_anon authn_dbm authn_default authn_file authz_dbm authz_default
authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs
dav_lock deflate dir disk_cache env expires ext_filter file_cache filter
headers include info log_config logio mem_cache mime mime_magic negotiation
rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad
cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
VIDEO_CARDS="nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From SpanKY 2008-01-30 13:02:34 0000 -------
no, it is not possible ... the old glibc-2.0 compat interface requires
linuxthreads which does not exist in glibc-2.6+

please review this document:
http://dev.gentoo.org/~vapier/old-broken-errno-apps

perhaps we could convert this into a FAQ of some sorts ...

------- Comment #2 From Jiri Tyr 2008-01-30 15:39:36 0000 -------
(In reply to comment #1)
> no, it is not possible ... the old glibc-2.0 compat interface requires
> linuxthreads which does not exist in glibc-2.6+
> 
> please review this document:
> http://dev.gentoo.org/~vapier/old-broken-errno-apps
> 
> perhaps we could convert this into a FAQ of some sorts ...

OK. I understand. The only solution is to mask >=glibc-2.6. Then you should
keep all portage tree independent on >=glibc-2.6 because at the moment when you
make some update depending in >=glibc-2.6 all systems which are running old
commercial applications will be not updatable. This is also one of the
different between commercial and non-commercial Linux distributions. If you
manage that, Gentoo will be on the same level. I pray to you manage that,
otherwise I have to move to an other distro.

------- Comment #3 From Jiri Tyr 2008-01-30 16:18:28 0000 -------
Please could you add a breakpoint into the ebuild of glibc-2.6 that if somebody
have USE="glibc-compat20" that he shouldn't upgrade because of the
incompatibility with GLIBC_2.0? Because now, when I want to downgrade back to
glibc-2.5 it will cost me a lot of time with recompiling all the packages which
was compiled after the date of installing of the new glibc-2.6. Maybe I could
ask you what's the best way of downgrading of glibc, because I don't wanna
breakdown my system.

------- Comment #4 From Jakub Moc (RETIRED) 2008-01-30 23:05:17 0000 -------
(In reply to comment #3)
> Maybe I could ask you what's the best way of downgrading of glibc, because I 
> don't wanna breakdown my system.

There's no way to downgrade glibc version beyond reinstall from scratch.

------- Comment #5 From Jiri Tyr 2008-01-31 09:00:15 0000 -------
(In reply to comment #4)
> (In reply to comment #3)
> > Maybe I could ask you what's the best way of downgrading of glibc, because I 
> > don't wanna breakdown my system.
> 
> There's no way to downgrade glibc version beyond reinstall from scratch.
> 

Then I'm urging on you to you add a breakpoint into the ebuild >=glibc-2.6 to
avoid to install new version for users who use USE="glibc-compat20". It's not
fair to let people upgrade glibc without any notification that there is no
GLIBC_2.0 support anymore!

------- Comment #6 From SpanKY 2008-01-31 14:12:08 0000 -------
no, i'm not adding a die to the ebuild ... a better solution is to put together
a little emul package like "emul-linux-x86-glibc-2.0-compat" and have people
use that

------- Comment #7 From Jiri Tyr 2008-01-31 16:18:31 0000 -------
(In reply to comment #6)
> no, i'm not adding a die to the ebuild ... a better solution is to put together
> a little emul package like "emul-linux-x86-glibc-2.0-compat" and have people
> use that

OK, that sounds good! When can I expect this package in portage tree? ;o)

------- Comment #8 From SpanKY 2008-02-17 09:57:18 0000 -------
Created an attachment (id=143760) [details]
emul-linux-x86-glibc-errno-compat-2.5.ebuild

please test

------- Comment #9 From SpanKY 2008-02-17 09:57:40 0000 -------
Created an attachment (id=143762) [details]
files/glibc-errno-wrapper

------- Comment #10 From Jiri Tyr 2008-02-17 22:25:58 0000 -------
(In reply to comment #8)
> Created an attachment (id=143760) [edit] [details]
> emul-linux-x86-glibc-errno-compat-2.5.ebuild
> 
> please test

I just installed emul-linux-x86-glibc-errno-compat-2.5 and Matlab still doesn't
work:

$ /etc/lmboot_TMW -u matlab
/var/tmp/lm_TMW.ld: relocation error: /var/tmp/lm_TMW.ld: symbol errno, version
GLIBC_2.0 not defined in file libc.so.6 with link time reference

$ LD_ASSUME_KERNEL="2.4.1" /etc/lmboot_TMW -u matlab
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared
object file: No such file or directory

------- Comment #11 From SpanKY 2008-02-18 05:00:23 0000 -------
you arent supposed to execute the app, you need to run it through the wrapper

glibc-errno-wraper <your app>

------- Comment #12 From Jiri Tyr 2008-02-18 09:41:57 0000 -------
(In reply to comment #11)
> you arent supposed to execute the app, you need to run it through the wrapper
> 
> glibc-errno-wraper <your app>

OK, I didn't know how does it work. Now, I tried this:

$ glibc-errno-wrapper /etc/lmboot_TMW -u matlab
/usr/bin/glibc-errno-wrapper: line 2:
/usr/lib/glibc-errno-compat/lib/ld-linux.so.2: No such file or directory
/usr/bin/glibc-errno-wrapper: line 2: exec:
/usr/lib/glibc-errno-compat/lib/ld-linux.so.2: cannot execute: No such file or
directory

According to "epm -ql emul-linux-x86-glibc-errno-compat", the file
/usr/lib/glibc-errno-compat/lib/ld-linux.so.2 doesn't exist:

$ epm -ql emul-linux-x86-glibc-errno-compat
/usr/bin/glibc-errno-wrapper
/usr/lib/glibc-errno-compat/lib/ld-linux.so.6
/usr/lib/glibc-errno-compat/lib/libpthread.so.0
/usr/lib/glibc-errno-compat/lib/libc.so.6

So I changed ld-linux.so.2 to ld-linux.so.6 in glibc-errno-wrapper and it still
doesn't work:

$ glibc-errno-wrapper /etc/lmboot_TMW -u matlab
/etc/lmboot_TMW: error while loading shared libraries: /etc/lmboot_TMW: invalid
ELF header

Then I tried to execute the BIN file directly:

$ glibc-errno-wrapper "/usr/local/matlab/etc/lm_matlab -z -c /tmp/license.dat"
/usr/local/matlab/etc/lm_matlab -z -c /tmp/license.dat: error while loading
shared libraries: /usr/local/matlab/etc/lm_matlab -z -c /tmp/license.dat:
cannot open shared object file: No such file or directory

If you need any other informations, please let me know.

------- Comment #13 From SpanKY 2008-02-18 14:56:05 0000 -------
the ebuild has a typoe with the ld-linux install name ... renaming it like you
said works

if /etc/lmboot_TMW is a shell script, then you will have to modify it so that
it executes the binary with the wrapper

------- Comment #14 From Jiri Tyr 2008-02-18 15:13:06 0000 -------
(In reply to comment #13)
> if /etc/lmboot_TMW is a shell script, then you will have to modify it so that
> it executes the binary with the wrapper

That's it what I did (lm_matlab is binary file):

$ glibc-errno-wrapper "/usr/local/matlab/etc/lm_matlab -z -c /tmp/license.dat"
/usr/local/matlab/etc/lm_matlab -z -c /tmp/license.dat: error while loading
shared libraries: /usr/local/matlab/etc/lm_matlab -z -c /tmp/license.dat:
cannot open shared object file: No such file or directory

But it still doesn't work.

------- Comment #15 From SpanKY 2008-02-18 16:40:17 0000 -------
well, what you ran doesnt make sense

there is no binary named "/usr/local/matlab/etc/lm_matlab -z -c
/tmp/license.dat"

that would regardless of running it through the wrapper

just drop the broken quotes

------- Comment #16 From Jiri Tyr 2008-02-18 16:57:38 0000 -------
(In reply to comment #15)
> well, what you ran doesnt make sense
> 
> there is no binary named "/usr/local/matlab/etc/lm_matlab -z -c
> /tmp/license.dat"
> 
> that would regardless of running it through the wrapper
> 
> just drop the broken quotes
> 

OK, I did it without the quotes:

$ exec /usr/lib/glibc-errno-compat/lib/ld-linux.so.6 --library-path
/usr/lib/glibc-errno-compat/lib /usr/local/matlab/etc/glnx86/lm_matlab -z -c
/tmp/license.dat

and it logged me out (in case of "su -" it closed the su session; in case of
ssh session it closed ssh connection) and no precess is running.

------- Comment #17 From SpanKY 2008-02-18 23:50:44 0000 -------
well, obviously ... that is how `exec` works

added the fixed package to cvs

------- Comment #18 From Jiri Tyr 2008-02-20 16:42:53 0000 -------
(In reply to comment #17)
> well, obviously ... that is how `exec` works
> 
> added the fixed package to cvs

I have tested the emul-linux-x86-glibc-errno-compat from portage tree and it
doesn't work. It finish with "Segmentation fault".

------- Comment #19 From Jiri Tyr 2008-02-20 16:44:23 0000 -------
Created an attachment (id=144130) [details]
matlab.log

Strace of command glibc-errno-wrapper /usr/local/matlab/etc/glnx86/lm_matlab

------- Comment #20 From SpanKY 2008-02-20 17:34:15 0000 -------
sorry, you'll need to debug it

i have no old binary programs nor do i care about them

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug