comp.lang.ada
 help / color / mirror / Atom feed
* Gnat says libraries are not supported.
@ 2009-06-20 17:56 Björn Persson
  2009-06-20 21:41 ` Ludovic Brenta
  2009-06-22 16:14 ` Martin Krischik
  0 siblings, 2 replies; 17+ messages in thread
From: Björn Persson @ 2009-06-20 17:56 UTC (permalink / raw)


I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.

Does anyone know what that warning means? That Fedora wouldn't support
libraries is just plain wrong. Has Gnat somehow been built without support
for libraries?

-- 
Bj�rn Persson
PGP key A88682FD



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-20 17:56 Gnat says libraries are not supported Björn Persson
@ 2009-06-20 21:41 ` Ludovic Brenta
  2009-06-21 14:20   ` Björn Persson
  2009-06-29  9:24   ` Martin Krischik
  2009-06-22 16:14 ` Martin Krischik
  1 sibling, 2 replies; 17+ messages in thread
From: Ludovic Brenta @ 2009-06-20 21:41 UTC (permalink / raw)


Björn Persson wrote:
> I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.
>
> Does anyone know what that warning means? That Fedora wouldn't support
> libraries is just plain wrong. Has Gnat somehow been built without support
> for libraries?

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.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-20 21:41 ` Ludovic Brenta
@ 2009-06-21 14:20   ` Björn Persson
  2009-06-22  7:35     ` Ludovic Brenta
  2009-06-29  9:24   ` Martin Krischik
  1 sibling, 1 reply; 17+ messages in thread
From: Björn Persson @ 2009-06-21 14:20 UTC (permalink / raw)


Ludovic Brenta wrote:

> 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.

Thank you Ludovic. Now I can write a good bug report.

-- 
Bj�rn Persson
PGP key A88682FD



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-21 14:20   ` Björn Persson
@ 2009-06-22  7:35     ` Ludovic Brenta
  2009-06-22  9:25       ` Tomek Wałkuski
  0 siblings, 1 reply; 17+ messages in thread
From: Ludovic Brenta @ 2009-06-22  7:35 UTC (permalink / raw)


Björn Persson wrote on comp.lang.ada:
> Ludovic Brenta wrote:
> > 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.
>
> Thank you Ludovic. Now I can write a good bug report.

Out of curiosity, does Fedora include GNAT by default or did your
package come from a third party repository?

--
Ludovic Brenta.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-22  7:35     ` Ludovic Brenta
@ 2009-06-22  9:25       ` Tomek Wałkuski
  0 siblings, 0 replies; 17+ messages in thread
From: Tomek Wałkuski @ 2009-06-22  9:25 UTC (permalink / raw)


On 22 Cze, 09:35, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:

> Out of curiosity, does Fedora include GNAT by default or did your
> package come from a third party repository?
>
Fedora includes GNAT and GtkAda by default.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-20 17:56 Gnat says libraries are not supported Björn Persson
  2009-06-20 21:41 ` Ludovic Brenta
@ 2009-06-22 16:14 ` Martin Krischik
  2009-06-22 16:33   ` Tero Koskinen
                     ` (2 more replies)
  1 sibling, 3 replies; 17+ messages in thread
From: Martin Krischik @ 2009-06-22 16:14 UTC (permalink / raw)


Björn Persson schrieb:
> I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.

Funny that you say - the Mac OS X 4.3 says the same.

Martin

-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-22 16:14 ` Martin Krischik
@ 2009-06-22 16:33   ` Tero Koskinen
  2009-06-22 17:31   ` John B. Matthews
  2009-06-22 20:03   ` sjw
  2 siblings, 0 replies; 17+ messages in thread
From: Tero Koskinen @ 2009-06-22 16:33 UTC (permalink / raw)


On Mon, 22 Jun 2009 18:14:00 +0200 Martin Krischik wrote:

> Björn Persson schrieb:
> > I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.
> 
> Funny that you say - the Mac OS X 4.3 says the same.
> 
> Martin

I have seen same with GNAT GPL 2008 on Windows and FSF GCC 4.5 on OpenBSD.

The warning comes from gcc/ada/prj-nmsc.adb:
>       if Data.Library then
>          if Get_Mode = Multi_Language then
>             Support_For_Libraries := Data.Config.Lib_Support;
> 
>          else
>             Support_For_Libraries := MLib.Tgt.Support_For_Libraries;
>          end if;
> 
>          if Support_For_Libraries = Prj.None then
>             Error_Msg
>               (Project, In_Tree,
>                "?libraries are not supported on this platform",
>                Lib_Name.Location);
>             Data.Library := False;
> 
>          else
...

-- 
Tero Koskinen - http://iki.fi/tero.koskinen/



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-22 16:14 ` Martin Krischik
  2009-06-22 16:33   ` Tero Koskinen
@ 2009-06-22 17:31   ` John B. Matthews
  2009-06-22 20:03   ` sjw
  2 siblings, 0 replies; 17+ messages in thread
From: John B. Matthews @ 2009-06-22 17:31 UTC (permalink / raw)


In article <4a3fadc9@news.post.ch>,
 Martin Krischik <krischik@users.sourceforge.net> wrote:

> Björn Persson schrieb:
> > I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.
> 
> Funny that you say - the Mac OS X 4.3 says the same.

Shared libraries work OK on Mac OS X [1], so I guess it's a limitation 
of GNAT project files on the platform.

[1] <http://home.roadrunner.com/~jbmatthews/misc/shared.html>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-22 16:14 ` Martin Krischik
  2009-06-22 16:33   ` Tero Koskinen
  2009-06-22 17:31   ` John B. Matthews
@ 2009-06-22 20:03   ` sjw
  2 siblings, 0 replies; 17+ messages in thread
From: sjw @ 2009-06-22 20:03 UTC (permalink / raw)


On Jun 22, 5:14 pm, Martin Krischik <krisc...@users.sourceforge.net>
wrote:
> Björn Persson schrieb:
>
> > I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.
>
> Funny that you say - the Mac OS X 4.3 says the same.

gprbuild is quite capable of building shared libraries on (intel) Mac
OS X with both GCC 4.3.3 and GNAT GPL 2009. So is gnatmake so long as
there are only Ada sources.

Where there is an issue is with locating the shared libraries at run
time. GNAT GPL 2009 gets this right - to an extent - but sometimes
it's easier to just set DYLD_LIBRARY_PATH.

Or to use static libraries!



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-20 21:41 ` Ludovic Brenta
  2009-06-21 14:20   ` Björn Persson
@ 2009-06-29  9:24   ` Martin Krischik
  2009-06-29 10:15     ` Ludovic Brenta
  1 sibling, 1 reply; 17+ messages in thread
From: Martin Krischik @ 2009-06-29  9:24 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ludovic Brenta schrieb:
> Bj�rn Persson wrote:
>> I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.
>>
>> Does anyone know what that warning means? That Fedora wouldn't support
>> libraries is just plain wrong. Has Gnat somehow been built without support
>> for libraries?
> 
> 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.

So, how did you fix it?

Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKSIhjijwKaHyem9cRAicYAKDvilICqjjj4Y9NBcCsWq+uv77GCwCeIYHQ
gsmWpPFFU6sI5CDDvievsKg=
=lYYB
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-29  9:24   ` Martin Krischik
@ 2009-06-29 10:15     ` Ludovic Brenta
  2009-07-25 18:23       ` Björn Persson
  0 siblings, 1 reply; 17+ messages in thread
From: Ludovic Brenta @ 2009-06-29 10:15 UTC (permalink / raw)


On Jun 29, 11:24 am, Martin Krischik <krisc...@me.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ludovic Brenta schrieb:
>
> > Björn Persson wrote:
> >> I have a problem with Gnat of GCC 4.4.0 on Fedora 11. 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 any shared libraries.
>
> >> Does anyone know what that warning means? That Fedora wouldn't support
> >> libraries is just plain wrong. Has Gnat somehow been built without support
> >> for libraries?
>
> > 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.
>
> So, how did you fix it?

By adjusting the TOOLS_TARGET_PAIRS in src/gcc/ada/gcc-interface/
Makefile.in where mlib-tgt{,-specific} appears.  In Debian, this is
actually part of a much larger and invasive patch that builds
libgnatprj, the project manager library used by all GNAT tools and by
GPS, so the TOOLS_TARGET_PAIRS are now in src/libgnatprj/Makefile.in.
(Note that the value of TOOLS_TARGET_PAIRS depends on the target
triplet).

Since the pristine version of src/gcc/ada/gcc-interface/Makefile.in
seems fine, I think the problem on Fedora 11 was triggered by a patch
that was not adjusted for the change from mlib-tgt to mlib-tgt-
specific.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-06-29 10:15     ` Ludovic Brenta
@ 2009-07-25 18:23       ` Björn Persson
  2009-07-25 19:22         ` Tomek Wałkuski
  2009-07-26 10:13         ` Ludovic Brenta
  0 siblings, 2 replies; 17+ messages in thread
From: Björn Persson @ 2009-07-25 18:23 UTC (permalink / raw)


Ludovic Brenta wrote:

> By adjusting the TOOLS_TARGET_PAIRS in src/gcc/ada/gcc-interface/
> Makefile.in where mlib-tgt{,-specific} appears.  In Debian, this is
> actually part of a much larger and invasive patch that builds
> libgnatprj, the project manager library used by all GNAT tools and by
> GPS, so the TOOLS_TARGET_PAIRS are now in src/libgnatprj/Makefile.in.
> (Note that the value of TOOLS_TARGET_PAIRS depends on the target
> triplet).
> 
> Since the pristine version of src/gcc/ada/gcc-interface/Makefile.in
> seems fine, I think the problem on Fedora 11 was triggered by a patch
> that was not adjusted for the change from mlib-tgt to mlib-tgt-
> specific.

I've finally found the error. It's in gnattools/Makefile.in. It makes 
symbolic links pointing to the wrong directory. This is the patch I applied:

--- gnattools/Makefile.in~	2009-04-14 16:25:44.000000000 +0200
+++ gnattools/Makefile.in	2009-07-25 04:31:38.000000000 +0200
@@ -164,7 +164,7 @@
 	-(cd $(GCC_DIR)/ada/tools; $(LN_S) ../sdefault.adb .)
 	-$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
 	          rm -f $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));\
-	          $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
+	          $(LN_S) $(fsrcdir)/ada/$(word 2,$(subst <, ,$(PAIR))) \
 	                $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));)
 	touch $(GCC_DIR)/stamp-tools
 

It wasn't caused by a Fedora patch. The error is present in the GCC 4.4.0 
release, but it's been fixed in 4.4.1.

I can't see that TOOLS_TARGET_PAIRS in gcc/ada/gcc-interface/Makefile.in is 
used for anything. The value of TOOLS_TARGET_PAIRS in gnattools/Makefile.in 
most likely comes from gnattools/configure. But the GCC build system is deep 
magic to me so I may have missed something.

-- 
Bj�rn Persson
PGP key A88682FD




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-07-25 18:23       ` Björn Persson
@ 2009-07-25 19:22         ` Tomek Wałkuski
  2009-07-26 12:35           ` Björn Persson
  2009-07-26 10:13         ` Ludovic Brenta
  1 sibling, 1 reply; 17+ messages in thread
From: Tomek Wałkuski @ 2009-07-25 19:22 UTC (permalink / raw)


On 25 Lip, 20:23, Björn Persson <bj...@xn--rombobjrn-67a.se> wrote:
> I've finally found the error. It's in gnattools/Makefile.in. It makes
> symbolic links pointing to the wrong directory. This is the patch I applied:
Have you submited this patch to Fedora?



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-07-25 18:23       ` Björn Persson
  2009-07-25 19:22         ` Tomek Wałkuski
@ 2009-07-26 10:13         ` Ludovic Brenta
  1 sibling, 0 replies; 17+ messages in thread
From: Ludovic Brenta @ 2009-07-26 10:13 UTC (permalink / raw)


Björn Persson wrote:
> [...] The error is present in the GCC 4.4.0
> release, but it's been fixed in 4.4.1.

That explains why several people saw it on other platforms (OpenBSD
and Mac OS X were mentioned), whereas Debian never had the problem.
The Debian patches hide it by replacing gnattools/Makefile.in almost
completely.

> I can't see that TOOLS_TARGET_PAIRS in gcc/ada/gcc-interface/Makefile.in is
> used for anything. The value of TOOLS_TARGET_PAIRS in gnattools/Makefile.in
> most likely comes from gnattools/configure. But the GCC build system is deep
> magic to me so I may have missed something.

Mmh, that's a good point.  I cannot see any references to gcc/ada/gcc-
interface/Makefile.in's TOOLS_TARGET_PAIRS either.  I think this is
worth reporting upstream.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-07-25 19:22         ` Tomek Wałkuski
@ 2009-07-26 12:35           ` Björn Persson
  2009-08-21  6:59             ` Tomek Wałkuski
  0 siblings, 1 reply; 17+ messages in thread
From: Björn Persson @ 2009-07-26 12:35 UTC (permalink / raw)


Tomek Wa?kuski wrote:

> On 25 Lip, 20:23, Bj�rn Persson <bj...@xn--rombobjrn-67a.se> wrote:
>> I've finally found the error. It's in gnattools/Makefile.in. It makes
>> symbolic links pointing to the wrong directory. This is the patch I
>> applied:
> Have you submited this patch to Fedora?

Yes.
https://bugzilla.redhat.com/show_bug.cgi?id=507247

-- 
Bj�rn Persson
PGP key A88682FD




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-07-26 12:35           ` Björn Persson
@ 2009-08-21  6:59             ` Tomek Wałkuski
  2009-08-21  9:35               ` Björn Persson
  0 siblings, 1 reply; 17+ messages in thread
From: Tomek Wałkuski @ 2009-08-21  6:59 UTC (permalink / raw)


Today I got update of gcc-gnat, libgnat and libgnat-devel and problem
is gone.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Gnat says libraries are not supported.
  2009-08-21  6:59             ` Tomek Wałkuski
@ 2009-08-21  9:35               ` Björn Persson
  0 siblings, 0 replies; 17+ messages in thread
From: Björn Persson @ 2009-08-21  9:35 UTC (permalink / raw)


Tomek Wa?kuski wrote:

> Today I got update of gcc-gnat, libgnat and libgnat-devel and problem
> is gone.

And in the changelog there's a reference to 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40166, where I see that the 
problem was identified and fixed a month before I first encountered it. I 
could have saved a lot of time by searching in GCC Bugzilla. Oh well, it's 
easy to be wise after the event.

-- 
Bj�rn Persson
PGP key A88682FD




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-08-21  9:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-20 17:56 Gnat says libraries are not supported Björn Persson
2009-06-20 21:41 ` Ludovic Brenta
2009-06-21 14:20   ` Björn Persson
2009-06-22  7:35     ` Ludovic Brenta
2009-06-22  9:25       ` Tomek Wałkuski
2009-06-29  9:24   ` Martin Krischik
2009-06-29 10:15     ` Ludovic Brenta
2009-07-25 18:23       ` Björn Persson
2009-07-25 19:22         ` Tomek Wałkuski
2009-07-26 12:35           ` Björn Persson
2009-08-21  6:59             ` Tomek Wałkuski
2009-08-21  9:35               ` Björn Persson
2009-07-26 10:13         ` Ludovic Brenta
2009-06-22 16:14 ` Martin Krischik
2009-06-22 16:33   ` Tero Koskinen
2009-06-22 17:31   ` John B. Matthews
2009-06-22 20:03   ` sjw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox