Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2016 21:36:10 -0453.75
From:      "William A. Mahaffey III" <wam@hiwaay.net>
Cc:        ports@freebsd.org
Subject:   Re: FreeBSD Port: tcc-0.9.26_3
Message-ID:  <570F00D0.1050102@hiwaay.net>
In-Reply-To: <570EE298.401@gmail.com>
References:  <570EE298.401@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 04/13/16 19:27, Ben Wiederhake wrote:
> Hello,
>
> "#include <stdint.h>" seems to be impossible with tcc on FreeBSD.
>
> Steps to reproduce:
> Try to compile the following program:
> """
> #include <stdint.h>
> #include <stdio.h>
> 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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?570F00D0.1050102>