RFH: gnat-gps fails to link with "relocation truncated to fit"
Hello.
When building gnat-gps, I see the ugly message below.
The two first lines should be unrelated. The dependency solver always
selects the unstable version, then installs the version from
experimental because it is required (by gprbuild).
I have tried to re-link with and without -PIE, with the same result.
Any hint is welcome before re-compiling without random options, as my
machine is too slow for this.
/usr/bin/ld: warning: libxmlada_sax.so.4.5.2015, needed by /usr/lib/x86_64-linux-gnu//libxmlada_dom.so, may conflict with libxmlada_sax.so.4.6.2016
/usr/bin/ld: warning: libxmlada_unicode.so.4.5.2015, needed by /usr/lib/x86_64-linux-gnu//libxmlada_dom.so, may conflict with libxmlada_unicode.so.4.6.2016
gps-main.o: In function `gps__main__file_open_callback':
./obj/./gps/src/gps-main.adb:1487:(.text+0x2e2eb): relocation truncated to fit: R_X86_64_PC32 against symbol `gps__kernel__hooks__open_file_action_hook' defined in .bss section in /build/gnat-gps-6.1.2016/obj/gps-kernel-hooks.o
gps-main.o: In function `gps__main__on_gps_started':
./obj/./gps/src/gps-main.adb:1578:(.text+0x3045f): relocation truncated to fit: R_X86_64_PC32 against symbol `gps__kernel__hooks__gps_started_hook' defined in .bss section in /build/gnat-gps-6.1.2016/obj/gps-kernel-hooks.o
gps-main.o: In function `gps__main__finish_setup':
./obj/./gps/src/gps-main.adb:2234:(.text+0x39e07): relocation truncated to fit: R_X86_64_PC32 against symbol `gps__kernel__no_context' defined in .bss section in /build/gnat-gps-6.1.2016/obj/gps-kernel.o
./obj/./gps/src/gps-main.adb:2386:(.text+0x3bf5f): relocation truncated to fit: R_X86_64_PC32 against symbol `gps__kernel__hooks__preferences_changed_hook' defined in .bss section in /build/gnat-gps-6.1.2016/obj/gps-kernel-hooks.o
gps-main.o: In function `gps__main__finish_setup__load_sources':
./obj/./gps/src/gps-main.adb:1901:(.text+0x3eac7): relocation truncated to fit: R_X86_64_PC32 against symbol `gps__kernel__hooks__open_file_action_hook' defined in .bss section in /build/gnat-gps-6.1.2016/obj/gps-kernel-hooks.o
gps-main.o: In function `gps__main__error_message':
./obj/./gps/src/gps-main.adb:2539:(.text+0x41707): relocation truncated to fit: R_X86_64_PC32 against symbol `gps__kernel__testsuite_handle' defined in .bss section in /build/gnat-gps-6.1.2016/obj/gps-kernel.o
gps-main.o: In function `gps__main__P3225b.21421':
./obj/./gps/src/gps-main.adb:2641:(.text+0x42e8c): relocation truncated to fit: R_X86_64_PC32 against symbol `gps__main_window__gps_applicationFM' defined in .bss section in /build/gnat-gps-6.1.2016/obj/gps-main_window.o
/build/gnat-gps-6.1.2016/obj/codefix-error_lists.o: In function `codefix__error_lists__internal_add_error':
./obj/./codefix/core/src/codefix-error_lists.adb:128:(.text+0x1d8b0): relocation truncated to fit: R_X86_64_PC32 against symbol `codefix__formal_errors__invalid_error_message' defined in .bss section in /build/gnat-gps-6.1.2016/obj/codefix-formal_errors.o
/build/gnat-gps-6.1.2016/obj/codefix-errors_manager.o: In function `codefix__errors_manager__error_id_recordIP':
./obj/./common/core/src/generic_list.adb:568:(.text+0x3132): relocation truncated to fit: R_X86_64_PC32 against symbol `codefix__formal_errors__invalid_error_message' defined in .bss section in /build/gnat-gps-6.1.2016/obj/codefix-formal_errors.o
./obj/./common/core/src/generic_list.adb:568:(.text+0x313c): relocation truncated to fit: R_X86_64_PC32 against symbol `codefix__formal_errors__invalid_error_message' defined in .bss section in /build/gnat-gps-6.1.2016/obj/codefix-formal_errors.o
./obj/./common/core/src/generic_list.adb:568:(.text+0x3147): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
In case you are interested to give it a try, you may reproduce with these steps.
# wget http://mirrors.cdn.adacore.com/art/573996dec7a447658e0affaa -O gps-gpl-2016-src.tar.gz
I assume that you have cloned the monotone server, as already discussed on this list.
The key is f8a11727e8983cf9083c08c6a2acaa27e439dd39.
# mtn -d ~/jack/debian_sources.mtn -r h:org.debian.gnat-gps checkout
# cd org.debian.gnat-gps
# mk-origtargz ../gps-gpl-2016-src.tar.gz --repack --compression=xz
# sha512sum ../gnat-gps_6.1.2016.orig.tar.xz
should match e6136475217ad1492e80c3778af33327d35f7e59bc4e676cfa731be9023cc0615e320f2ea8e32f1e02370cf2241b371b7131ec49af6fe8a880668f2f42dd2c31
# tar xf ../gnat-gps_6.1.2016.orig.tar.xz --strip-components=1
# DEB_BUILD_OPTIONS=noopt nice pdebuild --debbuildopts -nc -- --override-config --othermirror 'deb http://httpredir.debian.org/debian experimental main'
In case libgnatcoll/16.1.0 is still in NEW, you will need to build it
in a similar way, then append
'| deb [trusted=yes] file:///var/cache/pbuilder/result ./'
to the quoted string in the previous line.
Thanks.
Reply to: