Public bug reported:

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

** Affects: gprbuild (Ubuntu)
     Importance: Undecided
         Status: New

** Summary changed:

- It seems that GPRbuild is incompatiable with GNAT 6 on Zesty Zapus
+ Error building static library with GNAT 6 on Zesty Zapus

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1719080

Title:
  Error building static library with GNAT 6 on Zesty Zapus

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gprbuild/+bug/1719080/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to