From owner-freebsd-ports@freebsd.org Thu Apr 14 03:40:04 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 809B1B0EBD8 for ; Thu, 14 Apr 2016 03:40:04 +0000 (UTC) (envelope-from gobble.wa@gmail.com) 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 620A516E9 for ; Thu, 14 Apr 2016 03:40:04 +0000 (UTC) (envelope-from gobble.wa@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 5DAA6B0EBD7; Thu, 14 Apr 2016 03:40:04 +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 5AE1CB0EBD6 for ; Thu, 14 Apr 2016 03:40:04 +0000 (UTC) (envelope-from gobble.wa@gmail.com) Received: from mail-oi0-x244.google.com (mail-oi0-x244.google.com [IPv6:2607:f8b0:4003:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 226BB16E8 for ; Thu, 14 Apr 2016 03:40:04 +0000 (UTC) (envelope-from gobble.wa@gmail.com) Received: by mail-oi0-x244.google.com with SMTP id w18so8349642oie.2 for ; Wed, 13 Apr 2016 20:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=BOOITsT9wV6rREiJUkc/+OjjEW9PysBF1xhEwqholFg=; b=QP1VoFb0Z1H+7W61wcFW6VLFQrnNWcIusW2Oqr41q4lG6+PUmyC/c7z028vmrditaX UH6YhG3f0iLdaEWTxZiuewE4Q+UWPrT7Ih4+U2fsPdS0BrNUCMhjheA6BbCYuZIuPSCW 7+sL6oG9RH2DhN6CwJ0smVLK28Gva62pOHpcY1ZTB00Ooqm2bQj0GF3/ftWUwAwetHds Xw7Ayp7L8bSq9+93LqkMzt0qL/62oK/qQMpuIa3aHjItAlmRa3WOGDlrfp9WEbBPnFD4 7JVEQnw6OGHyqCzfPr/ORUpTtFozQxKGBscytKD3mxBTQseem7+H7BB0U8T1fuzHwusI p1Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=BOOITsT9wV6rREiJUkc/+OjjEW9PysBF1xhEwqholFg=; b=C4J4oxFplE2BkntooKKqp1TRRY3XFWCuWdzvEzZQqwbVvNSnoTz7LJodZLFMgdeXw2 vmQMiP1fJn7nE/yQSUgKUS2g1LdWMdR1DFDJXh2cg9zN1EhIzKswyMnvMi8dggPuK5Rj SlGslR2dFBVcNJKkoNFX2sVN5tyz92e75C3EvfAksgwuOaIS7gzWxMB57hWUHOXN+Cal JaPCO/VOyfVovwRjJRzMZ+FdbNCtQwfE06Jz8s/Hl8iNQTwzfkkgOQNAHk3x7BnuCJ8x Do52EimLq4YjIyPciu3T2PO8lQ8Vx0qgAFJSp8sZTFtaeYGkK2qzSyhjmCQ4VeJWilI2 aIJg== X-Gm-Message-State: AOPr4FVWkVMwVDICOlwBf5O5hmeQN3FYrRgdClnZvbQ3La4n4VQdTvBJxQAW5zRJU9wIIqcaZahWv4/05DhZig== MIME-Version: 1.0 X-Received: by 10.202.56.4 with SMTP id f4mr3402102oia.125.1460605203475; Wed, 13 Apr 2016 20:40:03 -0700 (PDT) Received: by 10.202.207.142 with HTTP; Wed, 13 Apr 2016 20:40:03 -0700 (PDT) In-Reply-To: <570EE298.401@gmail.com> References: <570EE298.401@gmail.com> Date: Wed, 13 Apr 2016 20:40:03 -0700 Message-ID: Subject: Re: FreeBSD Port: tcc-0.9.26_3 From: Waitman Gobble To: Ben Wiederhake Cc: cpm@fbsd.es, "freebsd-ports@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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 03:40:04 -0000 On Wed, Apr 13, 2016 at 5:21 PM, 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 > > You want to be using the headers provided with tcc? # tcc -run -I/usr/local/lib/tcc/include test.c Hello world -- Waitman Gobble Los Altos California USA 510-830-7975