Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2012 22:11:34 -0500
From:      "Conrad J. Sabatier" <conrads@cox.net>
To:        Jason Evans <jasone@freebsd.org>
Cc:        svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r234370 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src inclu...
Message-ID:  <20120419221134.76128edc@cox.net>
In-Reply-To: <D08BCC8E-C20C-46BF-984F-C43876A0E7AB@freebsd.org>
References:  <201204170722.q3H7ME6A070934@svn.freebsd.org> <F43DDEEA-375B-4F1C-80A3-AAECFDFF414A@FreeBSD.org> <AECE03EF-CDEB-43DE-9222-CD94CC07CC95@FreeBSD.org> <CAJ-VmomRqGRbDD3B=NhtKY=E2pb1Lqrr9AcwNGtD91U_GfBi8Q@mail.gmail.com> <20120419091558.2ae655a0@cox.net> <A85EFF6D-6250-4A37-A051-6F852CB2FBF5@freebsd.org> <D08BCC8E-C20C-46BF-984F-C43876A0E7AB@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Apr 2012 15:23:39 -0700
Jason Evans <jasone@freebsd.org> wrote:

> On Apr 19, 2012, at 11:44 AM, Jason Evans wrote:
> > On Apr 19, 2012, at 7:15 AM, Conrad J. Sabatier wrote:
> >> Actually, I keep getting "undefined reference to _malloc_options"
> >> while building libexec/atrun on amd64.  Not sure what the problem
> >> may be. Could it have something to do with doing a debug build
> >> (with -g)?
> >> 
> >> ===> libexec/atrun (all)
> >> […]
> >> -lutil /usr/obj/usr/src/tmp/usr/lib/libc.so: undefined reference to
> >> `_malloc_options' clang: error: linker command failed with exit
> >> code 1 (use -v to see invocation) *** [atrun] Error code 1
> > 
> > Perhaps this is related to using clang rather than gcc.  I'll start
> > a clang-based buildworld to see if it reproduces here.
> > 
> > Jason
> 
> 
> With /etc/make.conf as:
> 
> 	CFLAGS+=-g
> 	STRIP=
> 	CC=clang
> 	CXX=clang++
> 	CPP=clang-cpp
> 
> I got this buildworld failure:
> ---
> clang -O2 -pipe -g  -I/usr/src/lib/csu/amd64/../common
> -I/usr/src/lib/csu/amd64/../../libc/include -fno-omit-frame-pointer
> -std=gnu99 -Qunused-arguments  -Wsystem-headers -Werror -Wall
> -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual
> -Wwrite-strin gs -Wswitch -Wshadow -Wunused-parameter -Wcast-align
> -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
> -Wold-style-definition -Wno-pointer-sign -Wno-empty-body
> -Wno-string-plus-int -c -o crt1.o crt1.scrt1.s:8:2: error: input
> can't have .file dwarf directives when -g is used to generate dwarf
> debug info for assembly code .file   1
> "/usr/src/lib/csu/amd64/crt1.c"        ^ crt1.s:8:8: error: file
> number already allocated        .file   1
> "/usr/src/lib/csu/amd64/crt1.c" ^crt1.s:9:2: error: input can't
> have .file dwarf directives when -g is used to generate dwarf debug
> info for assembly code .file   2
> "/usr/src/lib/csu/amd64/../common/crtbrand.c"        ^crt1.s:10:2:
> error: input can't have .file dwarf directives when -g is used to
> generate dwarf debug info for assembly code .file   3
> "/usr/src/lib/csu/amd64/../common/ignore_init.c"        ^ ---
> 
> I removed the CFLAGS+=-g line, and buildworld succeeded.
> 
> Jason

Yes, I've seen exactly the same on other, earlier builds (I've been
using essentially exactly the same make.conf settings as what you just
posted, as well as using "make -j8").  That other error output I posted
earlier in this thread resulted after I had already seen the above, and
tried another buildworld without -j8.

So, apparently, the thing to do for now is *not* attempt to build a
debug world, it would seem.  I suspected as much.  :-)

Thank you very much for giving your attention to this matter.

-- 
Conrad J. Sabatier
conrads@cox.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120419221134.76128edc>