Error building static library with GNAT 6 on Zesty Zapus

Bug #1719080 reported by alkhimey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gprbuild (Ubuntu)
New
Undecided
Unassigned

Bug Description

Here is a minimal example that demonstrates the problem:

In essense, the error message is "/usr/bin/ld: -r and -pie may not be used together"

$ gprbuild --version
GPRBUILD 2015 (unknown) (x86_64-linux-gnu)
Copyright (C) 2004-2016, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gnat --version
GNAT 6.3.0
Copyright (C) 1996-2016, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ls
example_package.adb example_package.ads proj.gpr
$ cat proj.gpr
project Proj is

   for Source_Dirs use (".");
   for Object_Dir use "obj";
   for Library_Dir use "lib";
   for Library_Name use "mystaticlib";
   for Library_Kind use "static";

   for Library_Interface use ("Example_Package");

end Proj;

$ cat example_package.ads example_package.adb
package Example_Package is

   function F return Integer;

end Example_Package;
package body Example_Package is

   function F return Integer is
   begin
      return 1;
   end F;
begin
   null;
end Example_Package;
$ gprbuild -Pproj.gpr -p
object directory "/home/artium/Projects/gpr_test/obj/" created
library directory "/home/artium/Projects/gpr_test/lib" created for project proj
gnatgcc -c example_package.adb
gprlib mystaticlib.lexch
gnatbind -n -o b__mystaticlib.adb -Lmystaticlib -a /home/artium/Projects/gpr_test/obj/example_package.ali
gnatgcc -c -x ada -gnatA -gnatws b__mystaticlib.adb -o b__mystaticlib.o ...
gnatgcc -nostdlib -Wl,-r -o p__mystaticlib_0.o ...
/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/gnatgcc failed
gprbuild: could not build library for project proj

Tags: zesty
alkhimey (alkhimey)
summary: - It seems that GPRbuild is incompatiable with GNAT 6 on Zesty Zapus
+ Error building static library with GNAT 6 on Zesty Zapus
tags: added: zesty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.