← Back to team overview

kicad-developers team mailing list archive

KiCad 5 RC1 fails to build on mips, powerpc and ppc64el due undeclared initializer LIBCONTEXT_CALL_CONVENTION

 

Hi,

I uploaded a prepared version KiCad 5.0.0-rc1 to Debian experimental a
few days ago. Due the adding of new binary packages my upload was needed
tp go through the NEW queue. Last night it got accepted by the FTP
masters and was moving over to the buildd's [1] for the experimental
release. The buildd machines started to build the package for the
various platforms.

The platforms mips, powerpc and ppc64el fails to build because of an
issue on the same file. There may be more platforms with this issue due
a not created initializer.

> cd "/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/debian/build/common" && /usr/bin/c++  -DHAVE_STDINT_H -DKICAD_SCRIPTING -DKICAD_SCRIPTING_MODULES -DKICAD_SCRIPTING_WXPYTHON -DKICAD_USE_OCE -DUSE_OPENMP -DWXUSINGDLL -DWX_COMPATIBILITY -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/include" -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/." -isystem /usr/lib/powerpc-linux-gnu/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/./dialogs" -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/./widgets" -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/./dialog_about" -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/powerpc-linux-gnu -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/../3d-viewer" -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/../pcbnew" -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/../polygon" -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/debian/build" -I/usr/include/python2.7 -I"/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/scripting"  -Wall -g -O2 -fdebug-prefix-map=/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wsuggest-override -Wno-unused-local-typedefs -Wno-strict-aliasing -fopenmp -pthread -Wshadow -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -std=gnu++11 -o CMakeFiles/common.dir/system/libcontext.cpp.o -c "/«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/system/libcontext.cpp"
> In file included from /«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/common/system/libcontext.cpp:16:0:
> /«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/include/system/libcontext.h:82:37: error: expected initializer before 'jump_fcontext'
>  intptr_t LIBCONTEXT_CALL_CONVENTION jump_fcontext( fcontext_t* ofc, fcontext_t nfc,
>                                      ^~~~~~~~~~~~~
> /«BUILDDIR»/kicad-5.0.0~rc1+dfsg1/include/system/libcontext.h:84:39: error: expected initializer before 'make_fcontext'
>  fcontext_t LIBCONTEXT_CALL_CONVENTION make_fcontext( void* sp, size_t size,
>                                        ^~~~~~~~~~~~~
> make[4]: *** [common/CMakeFiles/common.dir/build.make:3411: common/CMakeFiles/common.dir/system/libcontext.cpp.o] Error 1

Looking into include/system/libcontext.h the reason for this is quite
obvious. The initializer LIBCONTEXT_CALL_CONVENTION isn't set up on
these platforms.

>  25 #if defined(__GNUC__) || defined(__APPLE__) || defined(__FreeBSD__)
>  26 
>  27     #define LIBCONTEXT_COMPILER_gcc
>  28 
>  29     #if defined(__linux__) || defined(__FreeBSD__)
>  30     #if defined(__x86_64__) || defined(__amd64__)
>  31         #define LIBCONTEXT_PLATFORM_linux_x86_64
>  32         #define LIBCONTEXT_CALL_CONVENTION
>  33     #elif __i386__
>  34         #define LIBCONTEXT_PLATFORM_linux_i386
>  35         #define LIBCONTEXT_CALL_CONVENTION
>  36     #elif __arm__
>  37         #define LIBCONTEXT_PLATFORM_linux_arm32
>  38         #define LIBCONTEXT_CALL_CONVENTION
>  39     #elif __aarch64__
>  40         #define LIBCONTEXT_PLATFORM_linux_arm64
>  41         #define LIBCONTEXT_CALL_CONVENTION
>  42     #endif

I can try to fix this on a Debian porter box but I've no clues if it is
enough to simply add more define lines like the existing ones. Can
someone of the more experienced devs give me an advise please as using a
porterbox is always a bit of extra work and will of course also need
extra free time (I'm currently lacking of course). Thanks!

PS: The build issue on armel is probably related to a missing '-mfpu=vfp
-msoft-float' option or similar, I will try to reproduce this on one of
my cubieboards. If someone has a quicker solution I'm also happy to try
this out.

[1] https://buildd.debian.org/status/package.php?p=kicad&suite=experimental

-- 
Regards
Carsten Schoenert

Follow ups