bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/14234] New: /usr/bin/ld: cannot find -lz collect2: ld returned


From: pdemil+bug at gmail dot com
Subject: [Bug ld/14234] New: /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status
Date: Thu, 14 Jun 2012 09:47:08 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=14234

             Bug #: 14234
           Summary: /usr/bin/ld: cannot find -lz  collect2: ld returned 1
                    exit status
           Product: binutils
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


I'm want to use
http://sourceforge.net/projects/mspgcc/files/mspgcc/DEVEL-4.7.x/
mspgcc-20120606

I have patched and compiled binutils and gcc succesfully (bin in
/usr/local/msp430/bin but the msp430-ld is not used in the compilation of gdb)


Next, I have to patch, configure and compile gdb.
Following the instructions in msp430-gdb-7.2a-20111205.patch

  tar xjf gdb-7.2a.tar.bz2
  ( cd gdb-7.2 ; patch -p1 < ../msp430-gdb-7.2a-20111205.patch )
  mkdir -p BUILD/gdb
  cd BUILD/gdb
  ../../gdb-7.2/configure \
    --target=msp430 \
    --prefix=/usr/local/msp430 \
  2>&1 | tee co
  make 2>&1 | tee mo

output make:
...
make[2]: Entering directory `/root/downloads/BUILD/gdb/sim'
make[3]: Entering directory `/root/downloads/BUILD/gdb/sim/msp430'
gcc ../../../../gdb-7.2/sim/msp430/../common/gentmap.c -o gentmap -g -O -I.
-I../../../../gdb-7.2/sim/msp430 -I../common
-I../../../../gdb-7.2/sim/msp430/../common -I../../include
-I../../../../gdb-7.2/sim/msp430/../../include -I../../bfd
-I../../../../gdb-7.2/sim/msp430/../../bfd -I../../opcodes
-I../../../../gdb-7.2/sim/msp430/../../opcodes 
rm -f tmp-tvals.h tmp-tmap.c
./gentmap -h >tmp-tvals.h
/bin/bash ../../../../gdb-7.2/sim/msp430/../../move-if-change tmp-tvals.h
targ-vals.h
./gentmap -c >tmp-tmap.c
/bin/bash ../../../../gdb-7.2/sim/msp430/../../move-if-change tmp-tmap.c
targ-map.c
touch stamp-tvals
rm -f version.c-tmp version.c
echo '#include "version.h"' >> version.c-tmp
echo 'const char version[] = "'"`sed q
../../../../gdb-7.2/sim/msp430/../../gdb/version.in`"'";' >> version.c-tmp
mv version.c-tmp version.c
gcc -c -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1         
-DDEFAULT_INLINE=0              -I. -I../../../../gdb-7.2/sim/msp430
-I../common -I../../../../gdb-7.2/sim/msp430/../common -I../../include
-I../../../../gdb-7.2/sim/msp430/../../include -I../../bfd
-I../../../../gdb-7.2/sim/msp430/../../bfd -I../../opcodes
-I../../../../gdb-7.2/sim/msp430/../../opcodes  -g -O2 version.c
rm -f libsim.a
ar rc libsim.a callback.o syscall.o targ-map.o version.o interp.o sim-load.o
ranlib libsim.a
gcc -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1         
-DDEFAULT_INLINE=0              -I. -I../../../../gdb-7.2/sim/msp430
-I../common -I../../../../gdb-7.2/sim/msp430/../common -I../../include
-I../../../../gdb-7.2/sim/msp430/../../include -I../../bfd
-I../../../../gdb-7.2/sim/msp430/../../bfd -I../../opcodes
-I../../../../gdb-7.2/sim/msp430/../../opcodes  -g -O2  -o run \
      run.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a 
../../libiberty/libiberty.a -lnsl  -lm -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[3]: *** [run] Error 1
make[3]: Leaving directory `/root/downloads/BUILD/gdb/sim/msp430'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/root/downloads/BUILD/gdb/sim'
make[1]: *** [all-sim] Error 2
make[1]: Leaving directory `/root/downloads/BUILD/gdb'
make: *** [all] Error 2


Extra info:

OS: ubuntu 12.04
Linux ubuntu 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux


address@hidden:~/downloads/BUILD/gdb# /usr/bin/ld --version
GNU ld (GNU Binutils for Ubuntu) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

I don't think that msp430-ld should be used for compiling the patched gdb.
address@hidden:~/downloads/BUILD/gdb# msp430-ld --version
GNU ld (GNU Binutils) 2.22 (mspgcc dev 20120606)
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
address@hidden:~/downloads/BUILD/gdb#

address@hidden:~/downloads/BUILD/gdb# env $PATH
env:
/usr/gcc_4_7/bin:/usr/local/msp430/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:
No such file or directory
address@hidden:~/downloads/BUILD/gdb#

Any hints?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]