From owner-freebsd-questions@FreeBSD.ORG Sat Jul 12 12:24:46 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0769106566B for ; Sat, 12 Jul 2008 12:24:46 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57010.mail.re3.yahoo.com (web57010.mail.re3.yahoo.com [66.196.97.114]) by mx1.freebsd.org (Postfix) with SMTP id 5241B8FC1D for ; Sat, 12 Jul 2008 12:24:46 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 43027 invoked by uid 60001); 12 Jul 2008 12:24:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=hZINCPvMhH5EeQpMTV9xT+j8LWJjSRvr+8Tb1r7Y0IcRPSsVecEjdzNILVLZ6aZ2MIMonFX+vg330lQYAK92zZdcgBNZ4KPDBF1Z7INrm0HlweQbMN9oOLYF+Y6SVtuvzauTN+BHfkhZYiWiZSyj7dEX1utmyaQ3KNLAQCRtQ9k=; Received: from [165.21.155.70] by web57010.mail.re3.yahoo.com via HTTP; Sat, 12 Jul 2008 05:24:45 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Sat, 12 Jul 2008 05:24:45 -0700 (PDT) From: Unga To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <451269.42968.qm@web57010.mail.re3.yahoo.com> Subject: A compiling issue with a new compiler X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: unga888@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2008 12:24:46 -0000 Hi all I have compiled GCC 4.3.1 from source. echo 'main(){}' > test.c cc test.c -v -Wl,--verbose Above two commands end up with: attempt to open /usr/lib/crtn.o succeeded /usr/lib/crtn.o/usr/lib/libc.so: undefined reference to `_nsyylex' /usr/lib/libc.so: undefined reference to `_nsyyin' /usr/lib/libc.so: undefined reference to `_nsyytext' /usr/lib/libc.so: undefined reference to `_nsyyerror' /usr/lib/libc.so: undefined reference to `_nsyylineno' collect2: ld returned 1 exit status ld --verbose | grep SEARCH SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); Some relevant portions from the compiler spec file: *linker: collect2 *startfile_prefix_spec: /usr/lib/ *fbsd_dynamic_linker: /libexec/ld-elf.so.1 *link_command: %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %{pie:-pie} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!no stdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(mfwrap) %(link_libgcc) %o %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib ) %{fprofile-arcs|fprofile-generate|coverage:-lgcov} %{!nostdlib:%{!nodefa ultlibs:%(link_ssp) %(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles :%E}}} %{T*} }}}}}} Is this something to do with the compiler spec file? What else should I look for? Any help in this regard is very much appreciated. Kind regards Unga