← Back to team overview

kicad-developers team mailing list archive

Re: KiCad 5 RC1 fails to build on armel (mips, powerpc and ppc64el due undeclared initializer LIBCONTEXT_CALL_CONVENTION)

 

Hi up there,

a small update for the issue on armel (armvt4, armvt5t).

Am 09.03.2018 um 07:45 schrieb Carsten Schoenert:
> 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.
I added '-mthumb -mfloat-abi=soft -mfpu=neon' to CXXFLAGS and the build
was going till the end until the final big linking is done. And then ...
it fails again.

> [100%] Linking CXX shared module _pcbnew.kiface
> cd "/build/kicad-5.0.0~rc1+dfsg1/debian/build/pcbnew" && /usr/bin/cmake -E cmake_link_script CMakeFiles/pcbnew_kiface.dir/link.txt --verbose=1
> /usr/lib/ccache/c++ -fPIC -Wall -g -O2 -fdebug-prefix-map=/build/kicad-5.0.0~rc1+dfsg1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -mthumb -mfloat-abi=soft -mfpu=neon -Wdate-time -D_FORTIFY_
> SOURCE=2 -Wsuggest-override -Wno-unused-local-typedefs -Wno-strict-aliasing -fopenmp -pthread -Wl,--no-undefined -Wl,-Bsymbolic -shared  -o _pcbnew.kiface CMakeFiles/pcbnew_kiface.dir/pcbnew.cpp.o CMakeFiles/pcbnew_kiface.dir/microwave/mi
> crowave_inductor.cpp.o CMakeFiles/pcbnew_kiface.dir/dialogs/dialog_SVG_print.cpp.o CMakeFiles/pcbnew_kiface.dir/dialogs/dialog_SVG_print_base.cpp.o CMakeFiles/pcbnew_kiface.dir/dialogs/dialog_block_options.cpp.o CMakeFiles/pcbnew_kiface.d
> ...
> _tool.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/footprint_editor_tools.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/pad_tool.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/pcb_actions.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/pcb_bright_box.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/pcb_editor_control.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/pcb_selection_conditions.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/pcb_tool.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/pcbnew_control.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/picker_tool.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/placement_tool.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/point_editor.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/position_relative_tool.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/selection.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/selection_tool.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/size_menu.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/tool_event_utils.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/tools_common.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/zone_create_helper.cpp.o CMakeFiles/pcbnew_kiface.dir/tools/zone_filler_tool.cpp.o CMakeFiles/pcbnew_kiface.dir/footprint_preview_panel.cpp.o CMakeFiles/pcbnew_kiface.dir/__/common/dialogs/dialog_page_settings.cpp.o CMakeFiles/pcbnew_kiface.dir/__/common/base_units.cpp.o CMakeFiles/pcbnew_kiface.dir/dialogs/dialog_scripting.cpp.o CMakeFiles/pcbnew_kiface.dir/dialogs/dialog_scripting_base.cpp.o CMakeFiles/pcbnew_kiface.dir/pcbnew_wrap.cxx.o CMakeFiles/pcbnew_kiface.dir/__/common/swig/wx_python_helpers.cpp.o CMakeFiles/pcbnew_kiface.dir/swig/pcbnew_action_plugins.cpp.o CMakeFiles/pcbnew_kiface.dir/swig/pcbnew_footprint_wizards.cpp.o CMakeFiles/pcbnew_kiface.dir/swig/pcbnew_scripting_helpers.cpp.o CMakeFiles/pcbnew_kiface.dir/swig/python_scripting.cpp.o -Wl,-rpath,"/build/kicad-5.0.0~rc1+dfsg1/debian/build/3d-viewer/3d_cache/sg:" ../3d-viewer/lib3d-viewer.a ../common/libpcbcommon.a router/libpnsrouter.a pcad2kicadpcb_plugin/libpcad2kicadpcb.a ../common/libcommon.a ../polygon/libpolygon.a ../bitmaps_png/libbitmaps.a ../common/libgal.a ../lib_dxf/liblib_dxf.a ../utils/idftools/libidf3.a -L/usr/lib/arm-linux-gnueabi -pthread -lwx_gtk2u_gl-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_stc-3.0 github/libgithub_plugin.a -lpython2.7 -lrt ../3d-viewer/3d_cache/sg/libkicad_3dsg.so.2.0.0 -L/usr/lib/arm-linux-gnueabi -pthread -lwx_gtk2u_gl-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_stc-3.0 ../common/libcommon.a ../common/libgal.a -lGLEW -lcairo -lpixman-1 -lGL -lGLU -lcurl -lssl -lcrypto
> CMakeFiles/pcbnew_kiface.dir/pcbnew.cpp.o: In function `_GLOBAL__sub_I_pcbnew.cpp':
> ./debian/build/pcbnew/./pcbnew/pcbnew.cpp:312:(.text.startup+0x1ae): relocation truncated to fit: R_ARM_THM_CALL against symbol `FP_LIB_TABLE::FP_LIB_TABLE(FP_LIB_TABLE*)' defined in .text section in ../common/libpcbcommon.a(fp_lib_table.cpp.o)
> collect2: error: ld returned 1 exit status 
> pcbnew/CMakeFiles/pcbnew_kiface.dir/build.make:6808: recipe for target 'pcbnew/_pcbnew.kiface' failed
> make[3]: *** [pcbnew/_pcbnew.kiface] Error 1
> make[3]: Leaving directory '/build/kicad-5.0.0~rc1+dfsg1/debian/build'
> CMakeFiles/Makefile2:1573: recipe for target 'pcbnew/CMakeFiles/pcbnew_kiface.dir/all' failed

So I tried to understand what this 'relocation truncated' means [1]. But
this is area there I'm definitely not an expert. The longer I'm thinking
about I assume it's better the solution will be made upstream.

I tried to add 'Wl,--image-base -Wl,0x10000000' to LDFLAGS but cmake
isn't happy about this and I gave up for now.

For Debian we want to support much as possible of the hardware platforms
so I don't like to drop KiCad on armel if upstream isn't abandoned this
platform. Anyone has a idea how to proceed here?


[1]
https://stackoverflow.com/questions/10486116/what-does-this-gcc-error-relocation-truncated-to-fit-mean

-- 
Regards
Carsten Schoenert

References