Menu

#710 porting64-gcc-debug_gcsafety fails on macosx

build problems
open
gcsafety (1)
5
2018-01-22
2017-10-23
No

make -f Makefile.devel build-porting64-gcc-debug_gcsafety on

$ uname -a
Darwin Clr-Sam.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

fails with

depbase=`echo malloca.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        g++ -DHAVE_CONFIG_H -I. -I../../src/gllib -I..   -I/usr/local/include   -g -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -Wno-invalid-offsetof -fwrapv -fno-strict-aliasing -ggdb -O0 -DDEBUG_OS_ERROR -DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DDEBUG_GCSAFETY -DUNIX_BINARY_DISTRIB -DENABLE_UNICODE -DNO_GETTEXT   -MT malloca.o -MD -MP -MF $depbase.Tpo -c -o malloca.o ../../src/gllib/malloca.c &&\
        mv -f $depbase.Tpo $depbase.Po
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
../../src/gllib/malloca.c:98:25: error: cannot initialize a variable of type 'union header *' with an lvalue of type 'void *'
          union header *h = p;
                        ^   ~
../../src/gllib/malloca.c:143:29: error: cannot initialize a variable of type 'union header *' with an lvalue of type 'void *'
              union header *h = p;
                            ^   ~
2 errors generated.
make[4]: *** [malloca.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [gllib/libgnu.a] Error 2

logs are attached

4 Attachments

Discussion

  • Sam Steingold

    Sam Steingold - 2017-10-23
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,4 @@
     cbcstep1.log (37.4 kB; application/octet-stream)
     cbcstep2.log (48.4 kB; application/octet-stream)
     cbcstep3.log (1.9 kB; application/octet-stream)
    +config.log (1.8 MB; application/octet-stream)
    
     
  • Bruno Haible

    Bruno Haible - 2017-10-23

    Fixing this will be part of the Makefile / build system improvements effort. Thanks for the report, I've took note of it.

     
  • Sam Steingold

    Sam Steingold - 2017-12-05

    however, when gnulib is built, the clisp build still fails:

    In file included from ../src/spvwtabf.d:34:
    ../src/subr.d:217:1: error: initializer element is not a compile-time constant
    LISPFUNNF(funtabref,1)
    ^~~~~~~~~~~~~~~~~~~~~~
    ../src/subr.d:27:3: note: expanded from macro 'LISPFUNNF'
      LISPFUN(name,seclass_foldable,req_count,0,norest,nokey,0,NIL)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/spvwtabf.d:30:28: note: expanded from macro 'LISPFUN'
              #define LISPFUN  LISPFUN_G
                               ^
    ../src/subr.d:185:5: note: expanded from macro 'LISPFUN_G'
      { subr_tab_ptr_as_object(&subr_tab.D_##name),                         \
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
    ../src/lispbibl.d:3858:63: note: expanded from macro 'as_object'
        #define as_object(o)  ((object){designated_init(one_o,(o))INIT_ALLOCSTAMP})
                                                                  ^~~~~~~~~~~~~~~
    ../src/lispbibl.d:5226:57: note: expanded from macro 'INIT_ALLOCSTAMP'
      #define INIT_ALLOCSTAMP  , designated_init(allocstamp,alloccount)
                                                            ^~~~~~~~~~
    ../src/lispbibl.d:524:47: note: expanded from macro 'designated_init'
      #define designated_init(field,value) .field=value
                                                  ^~~~~
    In file included from ../src/spvwtabf.d:34:
    
     
  • Sam Steingold

    Sam Steingold - 2017-12-05

    note also that clang-900.0.38 on x86_64-apple-darwin16.7.0 pretends to be "gcc 4.2.1", thus lispbibl.d:432:

       #if defined(__cplusplus) && (__GNUC__ == 4) && ((__GNUC_MINOR__ == 2) || ((__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ < 1)))
         #error g++ 4.2.* and 4.3.0 are not supported due to g++ bug 35708
       #endif
    

    has to be modified too...

     
  • Sam Steingold

    Sam Steingold - 2018-01-22

    at this time clisp boot builds ootb on macosx with build-porting64-gcc-debug_gcsafety.
    modules fail with

    /Users/sds/src/clisp/current/modules/i18n/gettext.c:512:3: error: initializer element is not a compile-time constant
      LISPFUN_F(subr_i18n_gettext,seclass_read,1,2,norest,nokey,0,NIL)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/sds/src/clisp/current/build-porting64-gcc-debug_gcsafety/linkkit/clisp.h:6312:90: note: expanded from macro 'LISPFUN_F'
    #define LISPFUN_F(name,sec,req_count,opt_count,rest_flag,key_flag,key_count,keywords)  { gcv_nullobj, 8UL,0UL,2UL,0x18UL, gcv_nullobj, gcv_nullobj, (lisp_function_t)(&C_##name), 0, req_count, opt_c...
                                                                                             ^~~~~~~~~~~
    /Users/sds/src/clisp/current/build-porting64-gcc-debug_gcsafety/linkkit/clisp.h:2712:114: note: expanded from macro 'gcv_nullobj'
    #define gcv_nullobj  (gcv_object_t)((object){.one_o=((oint)((UBYTE*)((0))+((oint)(tint)((0))<<40))), .allocstamp=alloccount})
                                                                                                                     ^~~~~~~~~~
    /Users/sds/src/clisp/current/modules/i18n/gettext.c:512:3: error: initializer element is not a compile-time constant
      LISPFUN_F(subr_i18n_gettext,seclass_read,1,2,norest,nokey,0,NIL)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/sds/src/clisp/current/build-porting64-gcc-debug_gcsafety/linkkit/clisp.h:6312:123: note: expanded from macro 'LISPFUN_F'
    #define LISPFUN_F(name,sec,req_count,opt_count,rest_flag,key_flag,key_count,keywords)  { gcv_nullobj, 8UL,0UL,2UL,0x18UL, gcv_nullobj, gcv_nullobj, (lisp_function_t)(&C_##name), 0, req_count, opt_c...
                                                                                                                              ^~~~~~~~~~~
    /Users/sds/src/clisp/current/build-porting64-gcc-debug_gcsafety/linkkit/clisp.h:2712:114: note: expanded from macro 'gcv_nullobj'
    #define gcv_nullobj  (gcv_object_t)((object){.one_o=((oint)((UBYTE*)((0))+((oint)(tint)((0))<<40))), .allocstamp=alloccount})
                                                                                                                     ^~~~~~~~~~
    /Users/sds/src/clisp/current/modules/i18n/gettext.c:512:3: error: initializer element is not a compile-time constant
      LISPFUN_F(subr_i18n_gettext,seclass_read,1,2,norest,nokey,0,NIL)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.