From owner-freebsd-ports@freebsd.org Thu Apr 14 02:30:48 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACF7DB0FC22 for ; Thu, 14 Apr 2016 02:30:48 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE8B1BEE for ; Thu, 14 Apr 2016 02:30:48 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: by mailman.ysv.freebsd.org (Postfix) id 9B480B0FC21; Thu, 14 Apr 2016 02:30:48 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AEFEB0FC20 for ; Thu, 14 Apr 2016 02:30:48 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DB841BEA for ; Thu, 14 Apr 2016 02:30:48 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (user-24-214-48-39.knology.net [24.214.48.39]) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id u3E2UeSc031989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 13 Apr 2016 21:30:41 -0500 Subject: Re: FreeBSD Port: tcc-0.9.26_3 References: <570EE298.401@gmail.com> Cc: ports@freebsd.org From: "William A. Mahaffey III" Message-ID: <570F00D0.1050102@hiwaay.net> Date: Wed, 13 Apr 2016 21:36:10 -0453.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <570EE298.401@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 02:30:48 -0000 On 04/13/16 19:27, Ben Wiederhake wrote: > Hello, > > "#include " seems to be impossible with tcc on FreeBSD. > > Steps to reproduce: > Try to compile the following program: > """ > #include > #include > int main(void){printf("Hello world\n");} > """ > > Excepted results: > Compilation finishes with no errors. > > Actual results: > """ > In file included from foo.c:1: > In file included from /usr/include/stdint.h:33: > In file included from /usr/include/sys/_types.h:33: > In file included from /usr/include/machine/_types.h:6: > /usr/include/x86/_types.h:161: error: too many basic types > """ > And compilation fails. > In a real life project, it fails at exactly the same spot [2] > > Diagnostics from the meatbag (hello!): > - Using gcc and clang instead works fine. This must be tcc's fault, > not system-headers'. > - On Ubuntu and Debian, tcc 0.9.26 works fine, too. This must be some > fault in the compilation, environment, or libraries of tcc, not tcc's > code itself. > - The error message stems from line 2510 in tccgen.c [1]. However, I > don't understand how it got there and where it "counts". > - This might also be due to a forgotten semicolon [3], which I deem > inlikely for a system header. > - Note that tcc is one-pass, so it doesn't even know anything except > the first line of foo.c. Thus, tcc is currently unusable for me. > > Versions, as far as I can tell: > - 'tcc -dumpversion' says '0.9.26'. > - `pkg upgrade` says 'Your packages are up to date.' > - `uname -a` says 'FreeBSD 10.3-RELEASE FreeBSD 10.3-RELEASE #0 > r297264: Fri Mar 25 02:10:02 UTC 2016' > > Regards, > Ben Wiederhake > > [1] > https://github.com/search?utf8=%E2%9C%93&q=%22too+many+basic+types%22&type=Code&ref=searchresults > [2] https://gitlab.com/BenWiederhake/endian-ci/builds/1077867 > [3] https://lists.gnu.org/archive/html/tinycc-devel/2008-09/msg00033.html > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > Interesting. I am seeing (almost) the same error in another thread ('porting' open64 compiler), same issue, some problem w/ getting some basic system types defined, same type of error, same system header files. I am on 9.3R, not 10.3, but interesting coincidence .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.