From owner-freebsd-current@FreeBSD.ORG Mon Jun 22 03:08:50 2015 Return-Path: Delivered-To: freebsd-current@nevdull.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABD1B86C for ; Mon, 22 Jun 2015 03:08:50 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B9301605 for ; Mon, 22 Jun 2015 03:08:50 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-250-133.lns20.per4.internode.on.net [121.45.250.133]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t5M38iar027434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sun, 21 Jun 2015 20:08:47 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <55877C36.70407@freebsd.org> Date: Mon, 22 Jun 2015 11:08:38 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-current Subject: odd compile failure with both clang and gcc.. weird (standard) library install Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2015 03:08:50 -0000 Working on -current as of about March 7. I'm building some software that uses the standard FreeBSD Makefile includes but it's failing on its library linking (the linking of a library which is part of the application) with the following error [...] building shared library libcbc.so.1 FreeBSD clang version 3.5.1 (tags/RELEASE_351/final 225668) 20150115 Target: i386-unknown-freebsd11.0 Thread model: posix "/usr/bin/ld" --eh-frame-hdr -Bshareable --hash-style=both --enable-new-dtags -m elf_i386_fbsd -o libcbc.so.1 /usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/lib -x --fatal-warnings --warn-shared-textrel -soname libcbc.so.1 valii.So val.So using.So ucase.So toconsole.So time.So tan.So tab.So sval.So strs.So string.So strassign.So sqr.So spawn.So size.So sin.So shift.So sgn.So setfile.So setarray.So save_string.So rnd.So right.So rename.So readstr.So readreal.So readlong.So readline.So readint.So putget.So prline.So printstr.So printreal.So printlong.So printlf.So printint.So printdollar.So printcomma.So printbyte.So pos.So outpipe.So mod.So mid.So match.So log.So len.So left.So lcase.So keyboard.So ipwr.So inti.So integer.So input.So inline.So inkey.So if_end.So gosubstack.So getline.So getenv.So fre.So float.So finishio.So files.So extendstr.So exp.So dfree.So csize.So cos.So constat.So conout.So conchar.So commonload.So chr.So checkarray.So chain2.So cent_up.So cent_round.So bconcat.So basopen.So basinit.So basclose.So b_strcmp.So b_readbyte.So b_funcstr.So b_fnroutines.So atan.So asc.So array.So abs.So writebyte.So readbyte.So loadarray.So handle_err.So findchannel.So dumparray.So commonstr.So b_tmpstrings.So addtostr.So b_stralloc.So setinput.So cutpipe.So catch_signal.So printerror.So ltoa.So flushbuffer.So -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtendS.o /usr/lib/crtn.o /usr/bin/ld: cannot find -lgcc_s clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. the same error happens with gcc as the compiler.. so the obvious question is "why does clang want to link with libgcc?" and another question is: why can't it find it? At least for that there is an answer: julian@vps1:ls -la /usr/lib/libgcc_s.so lrwxr-xr-x 1 root wheel 46 Apr 30 08:13 /usr/lib/libgcc_s.so -> /usr/obj/usr/src-current/tmp/lib/libgcc_s.so.1 but I've deleted /usr/obj. Does anyone know WHY the "make installworld" back in March just made symlinks for this (and a whole bunch more) libraries? and has it been fixed? As for the libgcc question, the Makefile appears as shown below. If there is anything I should have done differently I'd like to know. # @(#)Makefile 8.1 (Berkeley) 6/4/93 # # Compile up the cbc support library # CBCROOT=${HOME}/cbc LIBDIR=${CBCROOT}/lib CFLAGS += -I $(.CURDIR)/../../include LIB= cbc SHLIB_MAJOR= 1 SHLIB_MINOR= 0 SRCS= abs.c addtostr.c array.c asc.c atan.c b_fnroutines.c b_funcstr.c \ b_readbyte.c b_stralloc.c b_strcmp.c b_tmpstrings.c basclose.c \ basinit.c basopen.c bconcat.c catch_signal.c cent_round.c \ cent_up.c chain2.c checkarray.c chr.c commonload.c commonstr.c \ conchar.c conout.c constat.c cos.c csize.c cutpipe.c dfree.c \ dumparray.c exp.c extendstr.c files.c findchannel.c finishio.c \ float.c flushbuffer.c fre.c getenv.c getline.c gosubstack.c \ handle_err.c if_end.c inkey.c inline.c input.c integer.c inti.c \ ipwr.c keyboard.c lcase.c left.c len.c loadarray.c log.c ltoa.c \ match.c mid.c mod.c outpipe.c pos.c printbyte.c printcomma.c \ printdollar.c printerror.c printint.c printlf.c printlong.c \ printreal.c printstr.c prline.c putget.c readbyte.c readint.c \ readline.c readlong.c readreal.c readstr.c rename.c right.c \ rnd.c save_string.c setarray.c setfile.c setinput.c sgn.c shift.c \ sin.c size.c spawn.c sqr.c strassign.c string.c strs.c sval.c \ tab.c tan.c time.c toconsole.c ucase.c using.c val.c valii.c \ writebyte.c NO_MAN= beforeinstall: -@mkdir -p ${LIBDIR} # ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/search.h \ # ${DESTDIR}/usr/include #afterinstall: # ln -f lib$(LIB) ../../libcbc.a .include