Bug 507247 - Gnat is compiled without support for libraries.
Summary: Gnat is compiled without support for libraries.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 11
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PragmARC
TreeView+ depends on / blocked
 
Reported: 2009-06-21 23:49 UTC by Björn Persson
Modified: 2009-08-21 09:03 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-08-21 09:03:35 UTC
Type: ---
Embargoed:


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

Description Björn Persson 2009-06-21 23:49:07 UTC
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):
gcc-gnat-4.4.0-4

How reproducible:
Always.

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 22:00:52 UTC
It happens on x86_64 too.

Comment 2 Björn Persson 2009-06-27 18:50:20 UTC
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 18:20:58 UTC
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 13:00:11 UTC
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-15 00:27:48 UTC
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 07:46:12 UTC
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 09:03:35 UTC
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.