Date: Sat, 14 Jun 2014 15:38:58 -0700 From: Peter Wemm <peter@wemm.org> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: freebsd-current@freebsd.org Subject: Re: In tree builds broken in lib/ncurses? Message-ID: <4610322.zAJlsEjG1I@overcee.wemm.org> In-Reply-To: <20140614223002.GB66187@troutmask.apl.washington.edu> References: <20140614201933.GA65847@troutmask.apl.washington.edu> <20140614221236.GA66187@troutmask.apl.washington.edu> <20140614223002.GB66187@troutmask.apl.washington.edu>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Saturday 14 June 2014 15:30:02 Steve Kargl wrote:
> On Sat, Jun 14, 2014 at 03:12:36PM -0700, Steve Kargl wrote:
> > On Sat, Jun 14, 2014 at 03:01:20PM -0700, Peter Wemm wrote:
> > > On Saturday 14 June 2014 14:44:39 Steve Kargl wrote:
> > > > On Sat, Jun 14, 2014 at 01:19:33PM -0700, Steve Kargl wrote:
> > > > > Long story short. I have laptop that is normally limited in
> > > > > available diskspace, so I do not install profiled libraries.
> > > > > I however have the need for running some code under the profiler
> > > > > (assuming clang can generate proper profiling). I do the
> > > > > following,
> > > >
> > > > Is it possible to using profiling on FreeBSD-current? After
> > > > installing
> > > > libc_p.a, I try to build math/lapack. It dies with
> > > >
> > > > /usr/local/bin/ld: //usr/lib/libc_p.a(sbrk.po): undefined reference to
> > > > symbol '_end' //lib/libc.so.7: error adding symbols: DSO missing from
> > > > command line collect2: error: ld returned 1 exit status
> > > > *** Error code 1
> > >
> > > collect2? I think you've got something odd going on there..
> >
> > Maybe. math/lapack is built with gfortran, which is from
> > lang/gcc47 on my system. lang/gcc47 is probably picking
> > up the installed devel/binutils. This would explain the
> > /usr/local/bin/ld instead of our /usr/bin/ld. libc_p.a is
> > built with clang, so I'm probably running into yet-another
> > clang vs gcc problem.
>
> Where is the symbol _end suppose to come from?
>
> Script started on Sat Jun 14 15:26:08 2014
> laptop-kargl:kargl[201] foreach i (/usr/lib/*.a)
> foreach? echo $i
> foreach? nm $i | grep 'U _end'
> foreach? nm $i | grep 'T _end'
> foreach? end
> /usr/lib/libc.a
> U _end
_end is a dynamic symbol that is synthesized by ld or linker scripts.
Normally that would be /usr/bin/ld
peter@hub[10:35pm]~-110> grep _end /usr/libdata/ldscripts/elf_x86_64_fbsd.x
...
_end. Align after .bss to ensure correct alignment even if the
_end = .; PROVIDE (end = .);
It used to be built into the a.out linker, but it's in the built-in linker
scripts since the ELF switch.
Your problem isn't clang vs gcc or libc_p, it's /usr/local/bin/ld or a linker
script the gfortran stuff is using.
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)
iQEcBAABAgAGBQJTnM8CAAoJEDXWlwnsgJ4EdGkH/Rjin4Fyc6xeNUsAPROiUgn5
uqp1EEZBeq79vTXJEejKlmFriIEG+pTrtOO4k9PcDFu3ptN6zOYSohVgAQxSOYU9
ZgmyJqbyvG4muPSi8ncwBo3itcAHBZCga9bnnTWoSIattftuXzC9lzI7D7e+ZeCY
JChHyr9BFVWf5PsXlTPCNb6ZWBN/mZkAmhHOfyVq2CNaFDO5Tj4p7qQV9495Bux4
MKFymvVCe9GjbBsdG3hRt4KHnsKoBVJHLPyFuQ5x7SrV7G+eHB0T4SeHeuqUAcOs
GZY1TTYOligkU8FvRACo1fvTinXErUq1k4wZ4OtRp2Ngj+BjueziiW5yBio1UFQ=
=N7L+
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4610322.zAJlsEjG1I>
