Bug 507247 - Gnat is compiled without support for libraries.
Gnat is compiled without support for libraries.
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
Blocks: PragmARC
  Show dependency treegraph
Reported: 2009-06-21 19:49 EDT by Björn Persson
Modified: 2009-08-21 05:03 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-21 05:03:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
spec hack to enable libraries (424 bytes, patch)
2009-06-27 14:50 EDT, Björn Persson
no flags Details | Diff
fix to the library support (553 bytes, patch)
2009-07-25 14:20 EDT, Björn Persson
no flags Details | Diff

  None (edit)
Description Björn Persson 2009-06-21 19:49:07 EDT
Description of problem:
When Gnatmake encounters a Library_Name attribute in a project file it says "warning: libraries are not supported on this platform", and I can't get it to generate or link to any shared libraries. I think the same message also appears in other cases that have to do with libraries.

Ludovic Brenta, maintainer of Gnat in Debian, explains: "This indicates that GCC was compiled with the wrong version of mlib-tgt.adb.  In GCC 4.4, the proper version was renamed from mlib-tgt-linux.adb to mlib-tgt-specific-linux.adb.   I know because I had to fix this problem for the Debian package, which is now in the NEW queue awaiting inspection by an FTP master."

I looked at the mlib-tgt* files and it looks like "cp mlib-tgt-specific-linux.adb mlib-tgt-specific.adb" should be done at some point in the build process.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Try to compile some Ada project, for example one of the GTKada examples:
1. yum install gcc-gnat GtkAda-doc
2. cp -a /usr/share/doc/GtkAda-doc-2.10.2/examples/base_widget/ .
3. cd base_widget/
4. make
Actual results (Fedora 11, i586):
gnatmake -Pdefault
gtkada.gpr:13:31: warning: libraries are not supported on this platform
gcc -c -I- -gnatA /home/beorn/base_widget/main.adb
gcc -c -I- -gnatA /home/beorn/base_widget/my_widget.adb
gnatbind -I- -x /home/beorn/base_widget/main.ali
error: "gtk.ali" not found, "gtk.ads" must be compiled
gnatmake: *** bind failed.
make: *** [all] Error 4

Expected results (Fedora 9, x86_64):
gnatmake -Pdefault
gcc -c -I- -gnatA /home/beorn/base_widget/main.adb
gcc -c -I- -gnatA /home/beorn/base_widget/my_widget.adb
gnatbind -shared -I- -x /home/beorn/base_widget/main.ali
gnatlink /home/beorn/base_widget/main.ali -shared-libgcc -L/usr/lib64/gtkada/relocatable -lgtkada -Wl,-rpath,/usr/lib64/gtkada/relocatable:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/adalib/ /usr/lib64/gtkada/static/libgtkada.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -o /home/beorn/base_widget/main

Additional info:
I have Fedora 11 only on a Pentium III test machine so far. I don't know whether the problem occurs on other platforms. I have no reason to think it's architecture-specific.
Comment 1 Björn Persson 2009-06-25 18:00:52 EDT
It happens on x86_64 too.
Comment 2 Björn Persson 2009-06-27 14:50:20 EDT
Created attachment 349668 [details]
spec hack to enable libraries

This is probably not the way it's meant to be done but this patch gets GNAT working again.
Comment 3 Björn Persson 2009-07-25 14:20:58 EDT
Created attachment 355155 [details]
fix to the library support

I've finally found the error. This is the real fix.

The bug is already fixed in GCC 4.4.1 but 4.4.0 needs this patch.
Comment 4 Michal Nowak 2009-08-14 09:00:11 EDT
Björn: F-11 features gcc-4.4.1-2.fc11.x86_64, where is it fixed right? So, only F-10, which features 4.3.2, is affected? Flipping version "10".
Comment 5 Björn Persson 2009-08-14 20:27:48 EDT
This bug is new in GCC 4.4.0. Fedora 10 is not affected. At least it wasn't when I went to Fedora 11.

The current version in Fedora 11 is still gcc-4.4.0-4. After some confusion I found gcc-4.4.1-2.fc11 in updates-testing, and tried it. It works. This bug can be closed when that gets released to the updates repository.
Comment 6 Michal Nowak 2009-08-17 03:46:12 EDT
OK. In F-10 there's GCC 4.3.2 and not gonna be updated to 4.4.X. Since 4.4.1 is in updates-testing flipping to ON_QA.
Comment 7 Björn Persson 2009-08-21 05:03:35 EDT
I see the update to gcc-4.4.1-2.fc11 is released now.

Note You need to log in before you can comment on or make changes to this bug.