Opened 9 months ago

Last modified 8 months ago

#69469 assigned defect

rizin fails to build on 10.12 and below: error: too many arguments provided to function-like macro invocation; error: use of undeclared identifier 'POSIX_SPAWN_CLOEXEC_DEFAULT'

Reported by: barracuda156 Owned by: l2dy (Zero King)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: sierra, elcapitan, yosemite, mavericks, mountainlion, lion, snowleopard, leopard, tiger Cc: herbygillot (Herby Gillot)
Port: rizin

Description

Upstream issue: https://github.com/rizinorg/rizin/issues/4352

There are two errors. On 10.12 and below:

FAILED: librz/analysis/librz_analysis.0.7.dylib.p/p_analysis_xtensa.c.o 
/usr/bin/clang -Ilibrz/analysis/librz_analysis.0.7.dylib.p -I. -I../rizin-v0.7.2 -Ilibrz -I../rizin-v0.7.2/librz -Ilibrz/include -I../rizin-v0.7.2/librz/include -I../rizin-v0.7.2/librz/analysis/arch/gb -Ilibrz/util/sdb/src -I../rizin-v0.7.2/librz/util/sdb/src -I../rizin-v0.7.2/librz/asm/arch/include -I../rizin-v0.7.2/librz/asm/arch -I../rizin-v0.7.2/librz/asm/arch/h8300 -I../rizin-v0.7.2/librz/asm/arch/hexagon -I../rizin-v0.7.2/librz/asm/arch/msp430 -I../rizin-v0.7.2/librz/asm/arch/rsp -I../rizin-v0.7.2/librz/asm/arch/mcore -I../rizin-v0.7.2/librz/asm/arch/v850 -I../rizin-v0.7.2/librz/asm/arch/propeller -I../rizin-v0.7.2/librz/asm/arch/ebc -I../rizin-v0.7.2/librz/asm/arch/cr16 -I../rizin-v0.7.2/librz/asm/arch/8051 -I../rizin-v0.7.2/librz/asm/arch/v810 -I../rizin-v0.7.2/librz/asm/arch/or1k -I../rizin-v0.7.2/librz/asm/arch/tricore -I../rizin-v0.7.2/librz/bin/format -I../rizin-v0.7.2/librz/type/parser -I/opt/local/include/capstone -I/opt/local/libexec/openssl3/include -fdiagnostics-color=always -Wall -Winvalid-pch -O2 -g -DRZ_PLUGIN_INCORE=1 -DUSE_SYS_CAPSTONE --std=gnu99 -Werror=sizeof-pointer-memaccess -fvisibility=hidden -pipe -Os -arch x86_64 -MD -MQ librz/analysis/librz_analysis.0.7.dylib.p/p_analysis_xtensa.c.o -MF librz/analysis/librz_analysis.0.7.dylib.p/p_analysis_xtensa.c.o.d -o librz/analysis/librz_analysis.0.7.dylib.p/p_analysis_xtensa.c.o -c ../rizin-v0.7.2/librz/analysis/p/analysis_xtensa.c
../rizin-v0.7.2/librz/analysis/p/analysis_xtensa.c:24:45: error: too many arguments provided to function-like macro invocation
        memcpy(ctx->length_table, (int[16]){ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 }, sizeof(ctx->length_table));
                                                   ^
/usr/include/secure/_string.h:64:9: note: macro 'memcpy' defined here
#define memcpy(dest, src, len)                                  \
        ^
../rizin-v0.7.2/librz/analysis/p/analysis_xtensa.c:24:2: note: parentheses are required around macro argument containing braced initializer list
        memcpy(ctx->length_table, (int[16]){ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 }, sizeof(ctx->length_table));
        ^
                                  (                                                          )
1 error generated.

https://build.macports.org/builders/ports-10.12_x86_64-builder/builds/263721/steps/install-port/logs/stdio

On 10.6 and below:

FAILED: librz/io/librz_io.0.7.dylib.p/p_io_debug.c.o 
/opt/local/bin/clang-mp-11 -Ilibrz/io/librz_io.0.7.dylib.p -I. -I../rizin-v0.7.2 -Ilibrz -I../rizin-v0.7.2/librz -Ilibrz/include -I../rizin-v0.7.2/librz/include -I../rizin-v0.7.2/subprojects/rzgdb/include -I../rizin-v0.7.2/subprojects/rzgdb/include/gdbclient -I../rizin-v0.7.2/subprojects/rzgdb/include/gdbserver -Isubprojects/rzwinkd -I../rizin-v0.7.2/subprojects/rzwinkd -Isubprojects/rzar -I../rizin-v0.7.2/subprojects/rzar -Ilibrz/util/sdb/src -I../rizin-v0.7.2/librz/util/sdb/src -I../rizin-v0.7.2/subprojects/rzqnx/include -I/opt/local/libexec/openssl3/include -fdiagnostics-color=always -Wall -Winvalid-pch -O2 -g -DRZ_PLUGIN_INCORE=1 -DUSE_SYS_CAPSTONE --std=gnu99 -Werror=sizeof-pointer-memaccess -fvisibility=hidden -pipe -Os -arch x86_64 -MD -MQ librz/io/librz_io.0.7.dylib.p/p_io_debug.c.o -MF librz/io/librz_io.0.7.dylib.p/p_io_debug.c.o.d -o librz/io/librz_io.0.7.dylib.p/p_io_debug.c.o -c ../rizin-v0.7.2/librz/io/p/io_debug.c
../rizin-v0.7.2/librz/io/p/io_debug.c:302:2: warning: implicit declaration of function 'posix_spawn_file_actions_addinherit_np' is invalid in C99 [-Wimplicit-function-declaration]
        posix_spawn_file_actions_addinherit_np(&fileActions, STDIN_FILENO);
        ^
../rizin-v0.7.2/librz/io/p/io_debug.c:306:14: error: use of undeclared identifier 'POSIX_SPAWN_CLOEXEC_DEFAULT'
        ps_flags |= POSIX_SPAWN_CLOEXEC_DEFAULT;
                    ^
1 warning and 1 error generated.

https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/192137/steps/install-port/logs/stdio

Change History (1)

comment:1 Changed 8 months ago by barracuda156

UPD. On 10.6 and below with gcc-4.2 fails here:

FAILED: librz/io/librz_io.0.7.dylib.p/p_io_zip.c.o 
/usr/bin/gcc-4.2 -Ilibrz/io/librz_io.0.7.dylib.p -I. -I../rizin-v0.7.2 -Ilibrz -I../rizin-v0.7.2/librz -Ilibrz/include -I../rizin-v0.7.2/librz/include -I../rizin-v0.7.2/subprojects/rzgdb/include -I../rizin-v0.7.2/subprojects/rzgdb/include/gdbclient -I../rizin-v0.7.2/subprojects/rzgdb/include/gdbserver -Isubprojects/rzwinkd -I../rizin-v0.7.2/subprojects/rzwinkd -Isubprojects/rzar -I../rizin-v0.7.2/subprojects/rzar -Ilibrz/util/sdb/src -I../rizin-v0.7.2/librz/util/sdb/src -I../rizin-v0.7.2/subprojects/rzqnx/include -I/opt/local/libexec/openssl3/include -Wall -Winvalid-pch -O2 -g -DRZ_PLUGIN_INCORE=1 -DUSE_SYS_CAPSTONE --std=gnu99 -fvisibility=hidden -pipe -Os -arch ppc -MD -MQ librz/io/librz_io.0.7.dylib.p/p_io_zip.c.o -MF librz/io/librz_io.0.7.dylib.p/p_io_zip.c.o.d -o librz/io/librz_io.0.7.dylib.p/p_io_zip.c.o -c ../rizin-v0.7.2/librz/io/p/io_zip.c
In file included from ../rizin-v0.7.2/librz/io/p/io_zip.c:9:
/opt/local/include/zip.h:378: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:380: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:381: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:382: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:383: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:384: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:385: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:386: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:387: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:388: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:389: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:390: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:391: error: wrong number of arguments specified for ‘deprecated’ attribute
/opt/local/include/zip.h:392: error: wrong number of arguments specified for ‘deprecated’ attribute
Note: See TracTickets for help on using tickets.