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...

Conrad J. Sabatier conrads at cox.net
Fri Apr 20 03:11:43 UTC 2012


On Thu, 19 Apr 2012 15:23:39 -0700
Jason Evans <jasone at 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 at cox.net


More information about the svn-src-all mailing list