reznikmm / als-alire-index

An Alire index to build ada_language_server
GNU General Public License v3.0
3 stars 1 forks source link

Building 23.0.7 fails with error from ld #2

Closed onox closed 2 years ago

onox commented 2 years ago

I tried to build ada_language_server_23.0.7_8706286a (22 wouldn't build at all because of a problem with LIBRARY_TYPE env var) and eventually got this:

gprbuild -p -P ./src/kb/collect_kb.gpr -XKB_BUILD_DIR=.build/kb --relocate-build-tree
gprbuild: "collect_kb" up to date
.build/kb/collect_kb -o .build/kb/config.kb ./gprconfig_kb/db
ⓘ Building libadalang_tools/src/lal_tools.gpr (1/2)...
gnatcoll.gpr:258:07: warning: value "windows" is not used as label
Compile
   [Ada]          libadalang-analysis.adb
   ...
Build Libraries
   ...
   [Ada]          b__langkit_support.adb
/usr/bin/ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
gprlib: call to linker driver /usr/bin/gcc failed
gprbuild: raised CONSTRAINT_ERROR : gprbuild-post_compile.adb:1113:39 range check failed
value 0 not in 1..2147483647
[/usr/bin/gprbuild]

Used GCC 11.2 on Arch.

reznikmm commented 2 years ago
onox commented 2 years ago

Just export LIBRARY_TYPE=static didn't help, but when I switched to gnat_native + gprbuild it linked and produced an executable :+1:

This is the output from alr toolchain with which als could be built:

CRATE         VERSION STATUS    NOTES
gprbuild      22.0.1  Default                            
gnat_native   11.2.4  Default                            
gnat_external 11.2.0  Available Detected at /usr/bin/gnat