Re: dtc: build errors with swig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello,

2017-09-29 2:34 GMT+02:00 David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>:
> On Fri, Sep 29, 2017 at 12:28:19AM +0200, Héctor Orón Martínez wrote:

> Hrm, I haven't seen errors like that.  What swig and compiler version
> do you have?

GCC 7.2.0
Swig 3.0.12


>> pylibfdt/libfdt_wrap.c: In function ‘SWIG_Python_NewShadowInstance’:
>> pylibfdt/libfdt_wrap.c:2483:65: error: declaration of ‘swig_this’ shadows a global declaration [-Werror=shadow]
>>  SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
>>                                                                  ^~~~~~~~~
>> pylibfdt/libfdt_wrap.c:2224:18: note: shadowed declaration is here
>>  static PyObject *swig_this = NULL;
>>                   ^~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘SWIG_Python_SetSwigThis’:
>> pylibfdt/libfdt_wrap.c:2558:51: error: declaration of ‘swig_this’ shadows a global declaration [-Werror=shadow]
>>  SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
>>                                                    ^~~~~~~~~
>> pylibfdt/libfdt_wrap.c:2224:18: note: shadowed declaration is here
>>  static PyObject *swig_this = NULL;
>>                   ^~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘SWIG_FromCharPtrAndSize’:
>> pylibfdt/libfdt_wrap.c:3354:29: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>   SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
>>                              ^
>> pylibfdt/libfdt_wrap.c:1166:86: note: in definition of macro ‘SWIG_InternalNewPointerObj’
>>  #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
>>                                                                                       ^~~
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_new_fdt_header’:
>> pylibfdt/libfdt_wrap.c:3027:28: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>  #define SWIG_as_voidptr(a) (void *)((const void *)(a))
>>                             ^
>> pylibfdt/libfdt_wrap.c:1163:89: note: in definition of macro ‘SWIG_NewPointerObj’
>>  #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
>>                                                                                          ^~~
>> pylibfdt/libfdt_wrap.c:4041:34: note: in expansion of macro ‘SWIG_as_voidptr’
>>    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fdt_header, SWIG_POINTER_NEW |  0 );
>>                                   ^~~~~~~~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_new_fdt_reserve_entry’:
>> pylibfdt/libfdt_wrap.c:3027:28: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>  #define SWIG_as_voidptr(a) (void *)((const void *)(a))
>>                             ^
>> pylibfdt/libfdt_wrap.c:1163:89: note: in definition of macro ‘SWIG_NewPointerObj’
>>  #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
>>                                                                                          ^~~
>> pylibfdt/libfdt_wrap.c:4198:34: note: in expansion of macro ‘SWIG_as_voidptr’
>>    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fdt_reserve_entry, SWIG_POINTER_NEW |  0 );
>>                                   ^~~~~~~~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_new_fdt_node_header’:
>> pylibfdt/libfdt_wrap.c:3027:28: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>  #define SWIG_as_voidptr(a) (void *)((const void *)(a))
>>                             ^
>> pylibfdt/libfdt_wrap.c:1163:89: note: in definition of macro ‘SWIG_NewPointerObj’
>>  #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
>>                                                                                          ^~~
>> pylibfdt/libfdt_wrap.c:4350:34: note: in expansion of macro ‘SWIG_as_voidptr’
>>    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fdt_node_header, SWIG_POINTER_NEW |  0 );
>>                                   ^~~~~~~~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_new_fdt_property’:
>> pylibfdt/libfdt_wrap.c:3027:28: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>  #define SWIG_as_voidptr(a) (void *)((const void *)(a))
>>                             ^
>> pylibfdt/libfdt_wrap.c:1163:89: note: in definition of macro ‘SWIG_NewPointerObj’
>>  #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
>>                                                                                          ^~~
>> pylibfdt/libfdt_wrap.c:4606:34: note: in expansion of macro ‘SWIG_as_voidptr’
>>    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fdt_property, SWIG_POINTER_NEW |  0 );
>>                                   ^~~~~~~~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_offset_ptr_w’:
>> pylibfdt/libfdt_wrap.c:3027:28: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>  #define SWIG_as_voidptr(a) (void *)((const void *)(a))
>>                             ^
>> pylibfdt/libfdt_wrap.c:1163:89: note: in definition of macro ‘SWIG_NewPointerObj’
>>  #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
>>                                                                                          ^~~
>> pylibfdt/libfdt_wrap.c:4927:34: note: in expansion of macro ‘SWIG_as_voidptr’
>>    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
>>                                   ^~~~~~~~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_string’:
>> pylibfdt/libfdt_wrap.c:5515:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (char *)fdt_string((void const *)arg1,arg2);
>>             ^
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_get_name’:
>> pylibfdt/libfdt_wrap.c:5738:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (char *)fdt_get_name((void const *)arg1,arg2,arg3);
>>             ^
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_get_property_by_offset’:
>> pylibfdt/libfdt_wrap.c:5850:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (struct fdt_property *)fdt_get_property_by_offset((void const *)arg1,arg2,arg3);
>>             ^
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_get_property’:
>> pylibfdt/libfdt_wrap.c:5914:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (struct fdt_property *)fdt_get_property((void const *)arg1,arg2,(char const *)arg3,arg4);
>>             ^
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_getprop’:
>> pylibfdt/libfdt_wrap.c:6046:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (void *)fdt_getprop((void const *)arg1,arg2,(char const *)arg3,arg4);
>>             ^
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_getprop_w’:
>> pylibfdt/libfdt_wrap.c:3027:28: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>  #define SWIG_as_voidptr(a) (void *)((const void *)(a))
>>                             ^
>> pylibfdt/libfdt_wrap.c:1163:89: note: in definition of macro ‘SWIG_NewPointerObj’
>>  #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
>>                                                                                          ^~~
>> pylibfdt/libfdt_wrap.c:6108:34: note: in expansion of macro ‘SWIG_as_voidptr’
>>    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
>>                                   ^~~~~~~~~~~~~~~
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_get_alias’:
>> pylibfdt/libfdt_wrap.c:6184:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (char *)fdt_get_alias((void const *)arg1,(char const *)arg2);
>>             ^
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_stringlist_get’:
>> pylibfdt/libfdt_wrap.c:6761:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (char *)fdt_stringlist_get((void const *)arg1,arg2,(char const *)arg3,arg4,arg5);
>>             ^
>> pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_strerror’:
>> pylibfdt/libfdt_wrap.c:8451:12: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
>>    result = (char *)fdt_strerror(arg1);
>>             ^
>> pylibfdt/libfdt_wrap.c: At top level:
>> pylibfdt/libfdt_wrap.c:3018:24: error: no previous prototype for ‘init_libfdt’ [-Werror=missing-prototypes]
>>  #  define SWIG_init    init_libfdt
>>                         ^
>> pylibfdt/libfdt_wrap.c:9249:1: note: in expansion of macro ‘SWIG_init’
>>  SWIG_init(void) {
>>  ^~~~~~~~~
>> cc1: all warnings being treated as errors
>> error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>> pylibfdt/Makefile.pylibfdt:15: recipe for target 'pylibfdt/_libfdt.so' failed
>> make[3]: *** [pylibfdt/_libfdt.so] Error 1
>> make[3]: Leaving directory '/home/zumbi/SCM/GITAuth/Debian/device-tree-compiler'
>> Makefile:132: recipe for target 'maybe_pylibfdt' failed
>> make[2]: *** [maybe_pylibfdt] Error 2
>> make[2]: Leaving directory '/home/zumbi/SCM/GITAuth/Debian/device-tree-compiler'
>> dh_auto_build: make -j4 returned exit code 2
>> debian/rules:27: recipe for target 'override_dh_auto_build' failed
>> make[1]: *** [override_dh_auto_build] Error 2
>> make[1]: Leaving directory '/home/zumbi/SCM/GITAuth/Debian/device-tree-compiler'

Regards,
-- 
 Héctor Orón  -.. . -... .. .- -.   -.. . ...- . .-.. --- .--. . .-.
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux