Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Puzzle: How did I break My linux system?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
maynardGK
n00b
n00b


Joined: 14 Apr 2014
Posts: 2
Location: Long Beach, CA - USA

PostPosted: Fri May 09, 2014 3:37 am    Post subject: Puzzle: How did I break My linux system? Reply with quote

I started experimentation with slackware on floppies some 15-20 years ago and have periodically returned to
install Linux periodically since. This time I've persisted until now I'm quite deep in the weeds, have re-installed,
re-partitioned, etc. many times over. Currently I'm running on cor-duo with 3 disk drives holding windows XP, Win 7, and
two copies of opensuse13.1 on 20 GB partitions, one of which is a fresh install without update the other of which
is my system that I've been doing builds on, and is now sick at the boot.
The last time I shut this down I was logged on (as root) to tty1 in addition to the X on tty7.

My suspected clue to the boot failure was that I made a version of libreadline.so(.6.3) in /usr/local/lib64 with gcc-4.8;
- gcc binaries 4.7 and above are not completely compatible with previuos gcc compiles -

My error, which comes very soon , is an inability to run /bin/bash because the shared library libreadline.so couldn't be loaded. I think the first failure it was able to find libreadline.so (located in /lib64 and pointing to libreadline.so.6.2) which was also located in usr/local/lib64, pointing to libreadline.so.6.3, which was recently compiled using gcc-4.8.
I then renamed /usr/local to /usr/newbld the the error is the same, traceback wise, but now it can't find libreadline.so; as if
bin/bash is looking where it shouldn't be, and ignoring the location where the library is waiting to be used. I'm 95% confident
the first error was not that it couldn't be found; now it is, even though /lib64 is there as it should be.

I've posted elsewhere about my concern with gcc < 4.7 to gcc >=4.7 incompatibilities; am I right to suspect this severe
error, by using local/lib64/libreadline.so.6.3(gcc-4.8) with bin/bash(gcc<gcc-4.7) ?

Now, however, having re-shuffled directories to (close to) their installed state, why might /bin/bash not find libreadline.so,
which it says is its problem.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2282
Location: Adendorf, Germany

PostPosted: Fri May 09, 2014 11:37 am    Post subject: Reply with quote

maynardGK wrote:
am I right to suspect this severe
error, by using local/lib64/libreadline.so.6.3(gcc-4.8 ) with bin/bash(gcc<gcc-4.7) ?
No. A program does not care which compiler compiled the library it uses unless you change the library since linking the program. Then it *might* be needed to be relinked.

Well, if /bin/bash is linked against libreadline.so.6.3 but only libreadline.so.6.2 is in /usr/lib[64] than this is your problem. Try this to check:
Code:
 ~ $ ldd /bin/bash
        linux-vdso.so.1 (0x00007ffff0bff000)
        libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f0701846000)
        libncurses.so.5 => /lib64/libncurses.so.5 (0x00007f07015ee000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f07013ea000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f0701047000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0701a92000)
Do you have anything in $LD_LIBRARY_PATH?
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
maynardGK
n00b
n00b


Joined: 14 Apr 2014
Posts: 2
Location: Long Beach, CA - USA

PostPosted: Fri May 09, 2014 1:31 pm    Post subject: Reply with quote

Here is some more info. In the following, the sick system is mounted (from the gentoo rescuecd) as /s7 and the virgin system is mounted as /s3.
Code:
root@sysresccd /root % ldd /s7/bin/bash
   not a dynamic executable
root@sysresccd /wf % strings -a /s7/bin/bash | grep lib 
/lib64/ld-linux-x86-64.so.2
libreadline.so.6
libtinfo.so.5
libdl.so.2
libc.so.6
__libc_start_main

(ldd worked on the rescuecd /bin/bash
I'm scared of the upgraded gcc, but not paranoid, Compiled code has to use consistent calling interfaces
Quote:
Binary incompatibility notice!
------------------------------

The C and C++ ABI changed in GCC 4.7.0, which means in general you can't
link together binaries compiled with this version of the compiler and
with versions before GCC 4.7.0. In particular:

* The option -mms-bitfields is enabled by default, which means the bitfield layout
follows the convention of the Microsoft compiler.

* C++ class-member functions now follow the __thiscall calling convention.

* The compiler now assumes that the caller pops the stack for the
implicit arguments pointing to an aggregate return value. This affects
functions returning structs by value, like the complex math type.


In answer to the last question,root@sysresccd /wf % cat /s7/etc/ld.so.conf
Code:

/opt/local/lib64
/opt/local/lib
/usr/local/lib64
/usr/local/lib
include /etc/ld.so.conf.d/*.conf
# /lib64, /lib, /usr/lib64 and /usr/lib gets added

I'm thinking, /bin/bash may be OK but the system trying to host it has been somehow corrupted.
/bin/bash is simply the first item to run in the startup.
I saved a few listings of /s7/boot, /s3/boot, and s7/var/log directories: root@sysresccd /wf % cat s3bootls
Code:

drwxr-xr-x  4 root root     4096 Mar 20 08:59 .
drwx[b]r-xr-x 30 root root     4096 May  8 22:16[/b] ..
-rw-r--r--  1 root root      512 Mar 20 06:05 backup_mbr
lrwxrwxrwx  1 root root        1 Mar 20 06:02 boot -> .
-rw-r--r--  1 root root     1484 Oct 18  2013 boot.readme
-rw-r--r--  1 root root   140360 Nov  1  2013 config-3.11.6-4-desktop
drwxr-xr-x  2 root root     4096 Mar 20 06:02 grub
drwxr-xr-x  7 root root     4096 Apr 16 20:30 grub2
lrwxrwxrwx  1 root root       23 Mar 20 08:59 initrd -> initrd-3.11.6-4-desktop
-rw-------  1 root root 23534212 Mar 20 08:59 initrd-3.11.6-4-desktop
-rw-r--r--  1 root root   620544 Nov  6  2013 message
-rw-r--r--  1 root root   261933 Nov  1  2013 symvers-3.11.6-4-desktop.gz
-rw-r--r--  1 root root      516 Nov  1  2013 sysctl.conf-3.11.6-4-desktop
-rw-r--r--  1 root root  2697475 Nov  1  2013 System.map-3.11.6-4-desktop
-rw-r--r--  1 root root  6075542 Nov  1  2013 vmlinux-3.11.6-4-desktop.gz
lrwxrwxrwx  1 root root       24 Mar 20 06:01 vmlinuz -> vmlinuz-3.11.6-4-desktop
-rw-r--r--  1 root root  5210216 Nov  1  2013 vmlinuz-3.11.6-4-desktop

The sick system part has been running 3.11.6-7 desktop. It appears /s7/boot was last accessed
May 5 23:56, fully 18 hours prior to the latest files found in /s7/var/log
root@sysresccd /wf % cat s7bootls
Code:

total 77816
drwxr-xr-x  4 root root     4096 May  5 23:56 .
drwxr-xr-x 31 root root     4096 May  5 23:46 ..
-rw-r--r--  1 root root      512 Mar 17 10:12 backup_mbr
lrwxrwxrwx  1 root root        1 Mar 17 06:22 boot -> .
-rw-r--r--  1 root root     1484 Oct 18  2013 boot.readme
-rw-r--r--  1 root root   140316 Feb  3 22:11 config-3.11.10-7-desktop
-rw-r--r--  1 root root   140360 Nov  1  2013 config-3.11.6-4-desktop
drwxr-xr-x  2 root root     4096 Apr 14 07:55 grub
drwxr-xr-x  7 root root     4096 May  5 23:56 grub2
lrwxrwxrwx  1 root root       24 May  5 23:56 initrd -> initrd-3.11.10-7-desktop
-rw-------  1 root root 25157482 May  5 23:56 initrd-3.11.10-7-desktop
-rw-------  1 root root 25158166 May  5 23:56 initrd-3.11.6-4-desktop
-rw-r--r--  1 root root   620544 Nov  6  2013 message


root@sysresccd /wf % tail s7varlog
Code:

-rw-r--r--  1 root root        0 May  5 23:46 pm-powersave.log
drwxr-x---  2 root root     4096 Mar 12 15:07 samba
-rw-r--r--  1 root root      276 Apr 18 04:27 vbox-install.log
-rw-r--r--  1 root root   654538 May  6 18:47 warn
-rw-r--r--  1 root root     1200 May  5 23:46 wpa_supplicant.log
-rw-rw-r--  1 root sshd   197376 May  6 18:57 wtmp
-rw-r--r--  1 root root    46706 May  6 18:57 Xorg.0.log
-rw-r--r--  1 root root    48323 May  4 06:20 Xorg.0.log.old
drwx------  2 root root     4096 May  3 16:37 YaST2


Final note: I've brought the 3.11.6-4 files over from the /s3 installation, and that successfully starts (previous attempt failed).
the only significant difference is, that I've brought in a new initrd file.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum