Bug 223843 - lang/gcc6-aux: fails to build on arm64 due to fixincludes
Summary: lang/gcc6-aux: fails to build on arm64 due to fixincludes
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2017-11-24 14:54 UTC by Ed Maste
Modified: 2018-03-11 06:56 UTC (History)
2 users (show)

See Also:
ericturgeon.bsd: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2017-11-24 14:54:50 UTC
From http://thunderx1.nyi.freebsd.org/data/head-arm64-default/p454157_s325785/logs/errors/gcc6-aux-20170802.log:

checking size of long long... configure: error: in `/wrkdirs/usr/ports/lang/gcc6-aux/work/build/libiberty':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details.

configure:5452: checking size of long long
configure:5457: /root/freebsd-ports/lang/gcc6-aux/work/bootstrap/bin/gcc -o conftest -O2 -pipe  -DLIBICONV_PLUG -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -static-libstdc++ -static-libgcc -L/usr/local/lib conftest.c  >&5
In file included from conftest.c:71:0:
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h: In function 'posix_memalign':
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:46: error: expected declaration specifiers before '__nonnull'
 int  posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */
                                              ^~~~~~~~~
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:252:20: error: storage class specified for parameter 'malloc_conf'
 extern const char *malloc_conf;
                    ^~~~~~~~~~~
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:253:15: error: storage class specified for parameter 'malloc_message'
 extern void (*malloc_message)(void *, const char *);
               ^~~~~~~~~~~~~~
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:341:14: error: storage class specified for parameter 'suboptarg'
 extern char *suboptarg;   /* getsubopt(3) external variable */
              ^~~~~~~~~
conftest.c:74:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
In file included from conftest.c:71:0:
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:6: error: old-style parameter declarations in prototyped function definition
 int  posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */
      ^~~~~~~~~~~~~~
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:1: error: parameter name omitted
 int  posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */
 ^~~
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:1: error: parameter name omitted
/root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h:192:1: error: parameter name omitted
conftest.c:99:1: error: expected '{' at end of input
 }
 ^
configure:5457: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_TIME_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_SYS_SYSCTL_H 1
| #define HAVE_STDINT_H 1
| #define SIZEOF_INT 0
| #define SIZEOF_LONG 0
| #define SIZEOF_SIZE_T 0
| #define HAVE_LONG_LONG 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| static long int longval () { return (long int) (sizeof (long long)); }
| static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
| #include <stdio.h>
| #include <stdlib.h>
| int
| main ()
| {
|
|   FILE *f = fopen ("conftest.val", "w");
|   if (! f)
|     return 1;
|   if (((long int) (sizeof (long long))) < 0)
|     {
|       long int i = longval ();
|       if (i != ((long int) (sizeof (long long))))
|       return 1;
|       fprintf (f, "%ld", i);
|     }
|   else
|     {
|       unsigned long int i = ulongval ();
|       if (i != ((long int) (sizeof (long long))))
|       return 1;
|       fprintf (f, "%lu", i);
|     }
|   /* Do not output a trailing newline, as this causes \r\n confusion
|      on some platforms.  */
|   return ferror (f) || fclose (f) != 0;
|
|   ;
|   return 0;
| }

root@od1000:~/freebsd-ports/lang/gcc6-aux # diff -u3 /usr/include/stdlib.h /root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.
h                                                                                          
--- /usr/include/stdlib.h       2017-06-10 19:10:36.662153000 -0400                        
+++ /root/freebsd-ports/lang/gcc6-aux/work/bootstrap/lib/gcc/aarch64-aux-freebsd12.0/6.3.1/include-fixed/stdlib.h       2017-02-04 12:49:07.000000000 -0500
@@ -1,3 +1,12 @@                             
+/*  DO NOT EDIT THIS FILE.                                                                
+                                            
+    It has been auto-edited by fixincludes from:    
+                                            
+       "/usr/include/stdlib.h"              
+                                            
+    This had to be done to correct non-standard usages in the                             
+    original, manufacturer supplied header file.  */
+                                            
 /*-                                         
  * Copyright (c) 1990, 1993                 
  *     The Regents of the University of California.  All rights reserved.
@@ -27,7 +36,7 @@                            
  * SUCH DAMAGE.                             
  *                                          
  *     @(#)stdlib.h    8.5 (Berkeley) 5/19/95
- * $FreeBSD$                                                                              
+ * $FreeBSD: head/include/stdlib.h 303427 2016-07-28 09:50:19Z ed $                       
  */                                                                                       
                                                    
 #ifndef _STDLIB_H_                                                                        
@@ -37,8 +46,6 @@                                                                          
 #include <sys/_null.h>                                                                    
 #include <sys/_types.h>                     
                                             
-__NULLABILITY_PRAGMA_PUSH                                                                 
-                                                                         
 #if __BSD_VISIBLE                                                                         
 #ifndef _RUNE_T_DECLARED                                                                  
 typedef        __rune_t        rune_t;                   
@@ -47,13 +54,21 @@                              
 #endif                                                                                    
                                                                                           
 #ifndef _SIZE_T_DECLARED                    
-typedef        __size_t        size_t;                                                    
+#if !defined(_GCC_SIZE_T)                                                                 
+#define _GCC_SIZE_T                         
+typedef __SIZE_TYPE__ size_t;                                                                                                                                                         
+#endif                                                                                    
+                                                                                                                                                                                      
 #define        _SIZE_T_DECLARED                                                           
 #endif                                                                                    
                                                                                                                                                           
 #ifndef        __cplusplus                  
 #ifndef _WCHAR_T_DECLARED                                                                 
-typedef        ___wchar_t      wchar_t;     
+#if !defined(_GCC_WCHAR_T) && ! defined(__cplusplus)
+#define _GCC_WCHAR_T                        
+typedef __WCHAR_TYPE__ wchar_t;             
+#endif                                      
+                                                                                          
 #define        _WCHAR_T_DECLARED                    
 #endif                                      
 #endif                                      
@@ -83,12 +98,12 @@                          
                                                                          
 _Noreturn void  abort(void);                
 int     abs(int) __pure2;                   
-int     atexit(void (* _Nonnull)(void));    
+int     atexit(void (*)(void));              
 double  atof(const char *);                                                               
 int     atoi(const char *);                                                               
 long    atol(const char *);                                                               
 void   *bsearch(const void *, const void *, size_t,
-           size_t, int (*)(const void * _Nonnull, const void *));                         
+           size_t, int (*)(const void *, const void *));                                  
 void   *calloc(size_t, size_t) __malloc_like __result_use_check                           
             __alloc_size(1) __alloc_size(2);
 div_t   div(int, int) __pure2;              
@@ -102,7 +117,7 @@                                                                        
 size_t  mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
 int     mbtowc(wchar_t * __restrict, const char * __restrict, size_t);                    
 void    qsort(void *, size_t, size_t,                                                     
-           int (* _Nonnull)(const void *, const void *));
+           int (*)(const void *, const void *));
 int     rand(void);                                                                       
 void   *realloc(void *, size_t) __result_use_check __alloc_size(2);                       
 void    srand(unsigned);                    
@@ -174,7 +189,7 @@                                                                        
 int     rand_r(unsigned *);                    /* (TSF) */                                
 #endif                                      
 #if __POSIX_VISIBLE >= 200112                                                                                                                                                         
-int     posix_memalign(void **, size_t, size_t); /* (ADV) */                              
+int     posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */                                                                                                             
 int     setenv(const char *, const char *, int);                                          
 int     unsetenv(const char *);                                                           
 #endif                                                                                                                                                    
@@ -223,6 +238,10 @@                         
 long    random(void);                                                                     
 unsigned short                              
        *seed48(unsigned short[3]);                  
+#ifndef _SETKEY_DECLARED                    
+int     setkey(const char *);               
+#define        _SETKEY_DECLARED             
+#endif                                                                                    
 char   *setstate(/* const */ char *);               
 void    srand48(long);                      
 void    srandom(unsigned int);              
@@ -258,9 +277,9 @@                          
 __uint32_t                                                               
         arc4random_uniform(__uint32_t);     
 #ifdef __BLOCKS__                           
-int     atexit_b(void (^ _Nonnull)(void));  
+int     atexit_b(void (^)(void));            
 void   *bsearch_b(const void *, const void *, size_t,                                     
-           size_t, int (^ _Nonnull)(const void *, const void *));                         
+           size_t, int (^)(const void *, const void *));                                  
 #endif                                             
 char   *getbsize(int *, long *);                                                          
                                        /* getcap(3) functions */                          
@@ -284,13 +303,11 @@                                                                      
 const char *                                
         getprogname(void);                  
                                                                                           
-int     heapsort(void *, size_t, size_t,                                 
-           int (* _Nonnull)(const void *, const void *));                                 
+int     heapsort(void *, size_t, size_t, int (*)(const void *, const void *));            
 #ifdef __BLOCKS__                                        
-int     heapsort_b(void *, size_t, size_t,      
-           int (^ _Nonnull)(const void *, const void *));                                 
+int     heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *));          
 void    qsort_b(void *, size_t, size_t,     
-           int (^ _Nonnull)(const void *, const void *));                                 
+           int (^)(const void *, const void *));                                          
 #endif                                      
 int     l64a_r(long, char *, int);                                                                                                                                                    
 int     mergesort(void *, size_t, size_t, int (*)(const void *, const void *));           
@@ -315,7 +332,7 @@                                                                                                                                                                    
 long long                                                                                 
        strtonum(const char *, long long, long long, const char **);                       
                                                                                                                                                           
-/* Deprecated interfaces, to be removed. */ 
+/* Deprecated interfaces, to be removed in FreeBSD 6.0. */                                
 __int64_t                                   
         strtoq(const char *, char **, int);         
 __uint64_t                                  
@@ -323,27 +340,6 @@                         
                                             
 extern char *suboptarg;                        /* getsubopt(3) external variable */       
 #endif /* __BSD_VISIBLE */                          
-                                            
-#if __EXT1_VISIBLE                          
-                                            
-#ifndef _ERRNO_T_DEFINED                                                 
-#define _ERRNO_T_DEFINED                    
-typedef int errno_t;                        
-#endif                                      
-                                             
-/* K.3.6 */                                                                               
-typedef void (*constraint_handler_t)(const char * __restrict,                             
-    void * __restrict, errno_t);                                                          
-/* K.3.6.1.1 */                                    
-constraint_handler_t set_constraint_handler_s(constraint_handler_t handler);              
-/* K.3.6.1.2 */                                                                           
-_Noreturn void abort_handler_s(const char * __restrict, void * __restrict,                
-    errno_t);                               
-/* K3.6.1.3 */                              
-void ignore_handler_s(const char * __restrict, void * __restrict, errno_t);               
-#endif /* __EXT1_VISIBLE */                                              
-                                                                                          
 __END_DECLS                                                                               
-__NULLABILITY_PRAGMA_POP                                 
                                                 
 #endif /* !_STDLIB_H_ */
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2018-03-11 06:56:16 UTC
Marked as broken in r464145.