Opened 11 years ago

Last modified 4 years ago

#25598 assigned update

GNAT GPL 2010 now available, update portfile to use it?

Reported by: sjs@… Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: larryv (Lawrence Velázquez), mikewolz@…, jarimatti@…, terry.droeger@…, cooljeanius (Eric Gallager)
Port: gnat-gcc

Description

GNAT GPL 2010 has now been released and supports Snow Leopard. This should make possible a working build on SL. At present the portfile uses GNAT GPL 2009. Request an update to use GNAT GPL 2010, or provide an option for it.

Attachments (2)

Portfile (22.2 KB) - added by krischik@… 10 years ago.
Portfile for gcc 4.5.2
test.commmand (2.5 KB) - added by krischik@… 10 years ago.
Test compile script useable for bug hunting.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 11 years ago by jmroot (Joshua Root)

Keywords: GNAT GPL 2010 removed
Owner: changed from macports-tickets@… to krischik@…
Type: requestupdate
Version: 1.9.1

Please remember to cc the maintainer.

comment:2 Changed 11 years ago by krischik@…

Status: newassigned

Yes I am currently updating the Portfile to create 4.5.1 with GPL 2010. Note that gnat-gcc is a very time consuming port - any help is welcome. Drop me a mail an I send you the current Portfile and test scripts.

comment:3 Changed 10 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

Cc Me!

comment:4 Changed 10 years ago by mikewolz@…

Cc: mikewolz@… added

Cc Me!

comment:5 Changed 10 years ago by jarimatti@…

Cc: jarimatti@… added

Cc Me!

comment:6 Changed 10 years ago by terry.droeger@…

Cc: terry.droeger@… added

Cc Me!

Changed 10 years ago by krischik@…

Attachment: Portfile added

Portfile for gcc 4.5.2

comment:7 Changed 10 years ago by krischik@…

Hello,

since there are now two users which want to help me fixing GNAT/GCC I have regained hope that it could be done between the now three of us.

I have update the make files to 4.5.2. If you just call port install you get:

configure: error: in `/opt/local/var/macports/build/_Volumes_Daten_Developer_MacPorts_dports_lang_gnat-gcc/work/build/gcc':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

This sanity checks are one of the more frustrating parts us using configure. The checks are often fail even everything is ok. Or /lib/cpp" is used even when configure was told to use "/opt/gnat-2010-x86_64-apple-darwin9.6.0-bin/bin/cpp".

Anyway, this is where attached test.command comes to play. After the failed port install you use test.command to compile again. Without Macports in my back I have better control over the options send to configure and as result the compile runs further.

How far I don't yet know as the compile is still running.

Regards

Martin

PS: I attach the files after submitting this comment.

Changed 10 years ago by krischik@…

Attachment: test.commmand added

Test compile script useable for bug hunting.

comment:8 Changed 10 years ago by krischik@…

Now I know how far it gets (faster then expected):

/opt/gnat-2010-x86_64-apple-darwin9.6.0-bin/bin/gcc -c -g -fkeep-inline-functions  -gnatpg -gnata -gnatwns -nostdinc -I- -I. -Iada -I../../gcc-4.5.2/gcc/ada -I../../gcc-4.5.2/gcc/ada/gcc-interface ../../gcc-4.5.2/gcc/ada/uintp.adb -o ada/uintp.o
uintp.adb:242:22: expect type "Hnum" defined at line 91
make[3]: *** [ada/uintp.o] Error 1
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

Looks like an incompatible change to the system. We have to analyse this now and create patch.

Martin

comment:9 in reply to:  8 ; Changed 10 years ago by jarimatti@…

Replying to krischik@…:

Now I know how far it gets (faster then expected):

/opt/gnat-2010-x86_64-apple-darwin9.6.0-bin/bin/gcc -c -g -fkeep-inline-functions  -gnatpg -gnata -gnatwns -nostdinc -I- -I. -Iada -I../../gcc-4.5.2/gcc/ada -I../../gcc-4.5.2/gcc/ada/gcc-interface ../../gcc-4.5.2/gcc/ada/uintp.adb -o ada/uintp.o
uintp.adb:242:22: expect type "Hnum" defined at line 91
make[3]: *** [ada/uintp.o] Error 1
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

Looks like an incompatible change to the system. We have to analyse this now and create patch.

I noticed that last weekend. The error is in the GNAT Ada sources

/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/gnat-gcc/work/gcc-4.5.1/gcc/ada/uintp.adb

Here's a fix, it's at line 242 or so (sorry, don't know how to make a proper patch yet):

   --------------
   -- Hash_Num --
   --------------

   function Hash_Num (F : Int) return Hnum is
   begin
      --  return Standard."mod" (F, Hnum'Range_Length);
      return Hnum (Standard."mod" (F, Hnum'Range_Length));
   end Hash_Num;

After this the compiler gets built but the output is different between stages and this causes it to fail.

-Jarimatti

comment:10 in reply to:  9 Changed 10 years ago by jarimatti@…

Hi,

Compiling using test.command and GCC 4.5.2 fails at:

/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/gnat-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/gnat-gcc/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin10/bin/ -B/opt/local/x86_64-apple-darwin10/lib/ -isystem /opt/local/x86_64-apple-darwin10/include -isystem /opt/local/x86_64-apple-darwin10/sys-include    -c -g -O2 -m32 -fPIC -pipe  -W -Wall -gnatpg -m32  a-direct.adb -o a-direct.o
a-direct.adb:676:13: warning: types for unchecked conversion have different sizes
make[8]: *** [a-direct.o] Error 1
make[7]: *** [gnatlib] Error 2
make[6]: *** [gnatlib-shared-darwin] Error 2
make[5]: *** [gnatlib-shared] Error 2
make[4]: *** [gnatlib-shared] Error 2
make[3]: *** [multi-do] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libada] Error 2
make: *** [all] Error 2

The error report comes from a-direct.adb, procedure Fetch_Next_Entry. Reading the build output I see that ADAFLAGS and CFLAGS both contain "-m32", which could explain the error (I'm compiling on iMac i3, SL 10.6.6). The error is in conversion between System.Address and access value, if I read it correctly.

Any idea where to fix those '-m32' flags?

comment:11 Changed 10 years ago by krischik@…

creating a patch file:

cd work
sudo gcp --archive gcc-4.5.2 gcc-4.5.2.orig
sudo gvim gcc-4.5.2/gcc/ada/uintp.adb
sudo zsh -c 'diff gcc-4.5.2.orig/gcc/ada/uintp.adb gcc-4.5.2/gcc/ada/uintp.adb >uintp.adb.diff'

And yes, the fact that the compile is done by root is a bloody pain in the arse. The next MacPorts is supposed to fix that.

comment:12 Changed 10 years ago by krischik@…

The current error message is:

/Volumes/Daten/Developer/MacPorts/dports/lang/gnat-gcc/work/build/./gcc/xgcc -B/Volumes/Daten/Developer/MacPorts/dports/lang/gnat-gcc/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin10/bin/ -B/opt/local/x86_64-apple-darwin10/lib/ -isystem /opt/local/x86_64-apple-darwin10/include -isystem /opt/local/x86_64-apple-darwin10/sys-include    -c -g -O2 -m32 -fPIC -pipe  -W -Wall -gnatpg -m32  a-direct.adb -o a-direct.o
a-direct.adb:676:13: warning: types for unchecked conversion have different sizes

The code in question is:

            function Address_To_Access is new
              Ada.Unchecked_Conversion
                (Source => Address,
                 Target => Path_String_Access);

Strange. Anybody got an idea what went wrong here?

comment:13 in reply to:  12 Changed 10 years ago by jarimatti@…

Replying to krischik@…:

The current error message is:

/Volumes/Daten/Developer/MacPorts/dports/lang/gnat-gcc/work/build/./gcc/xgcc -B/Volumes/Daten/Developer/MacPorts/dports/lang/gnat-gcc/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin10/bin/ -B/opt/local/x86_64-apple-darwin10/lib/ -isystem /opt/local/x86_64-apple-darwin10/include -isystem /opt/local/x86_64-apple-darwin10/sys-include    -c -g -O2 -m32 -fPIC -pipe  -W -Wall -gnatpg -m32  a-direct.adb -o a-direct.o
a-direct.adb:676:13: warning: types for unchecked conversion have different sizes

The code in question is:

            function Address_To_Access is new
              Ada.Unchecked_Conversion
                (Source => Address,
                 Target => Path_String_Access);

Strange. Anybody got an idea what went wrong here?

Could the issue be 32 bit vs. 64 bit? (see #comment:10). Is there any way to force -m64 instead of -m32 for the xgcc arguments?

comment:14 Changed 8 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:15 Changed 4 years ago by kurthindenburg (Kurt Hindenburg)

Owner: krischik@… deleted
Note: See TracTickets for help on using tickets.