Error building static library with GNAT 6 on Zesty Zapus
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_
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/
library directory "/home/
gnatgcc -c example_package.adb
gprlib mystaticlib.lexch
gnatbind -n -o b__mystaticlib.adb -Lmystaticlib -a /home/artium/
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
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 |