comp.lang.ada
 help / color / mirror / Atom feed
* Trying to install the latest GtkAda for Mac on Mojave using Community 2018
@ 2019-01-31 15:56 ahlan
  2019-01-31 17:13 ` ahlan
  2019-01-31 18:10 ` Simon Wright
  0 siblings, 2 replies; 7+ messages in thread
From: ahlan @ 2019-01-31 15:56 UTC (permalink / raw)


Once upon a time, (2015), I successfully installed GtkAda 3.8.4 using Macports and then GtkAda from the sources provided in gtkada-gpl-2015-src.tar.gz and all was well.

However on buying a new Mac I tried to do the same thing but failed.
As I don't particularly want to remain on this version I have tried to install the latest and greatest.

But again without success.
Can someone give me a clue as to what I am doing wrong or what I should be doing.
Is there a better way of getting GtkAda running on my MAC?

I  installed the community 2018 version of GNAT for OSX.
Easy - so far so good.

I assume that GtkAda needs Gtk3 for Quartz and so I installed Macports 2.5.3 and then did a port install of gtk3 +quartz which installed 3.22.30
So far so good.

I then cloned the sources for GtkAda from GitHub.com/AdaCore/gtkada and then tried to build GtkAda.

Previously I changed directory to the sources and then entered

CC=/usr/bin/gcc ./configure --prefix=/Users/Ahlan/gtkada
make
make install

However the make now fails when trying to compile misc.c on line 32 
#include <stdio.h>
fatal error: stdio.h: No such file

and misc_generated.c fails to find limits.h

How is it supposed to find these files?
Do I need to install something else?
Am I installing GtkAda in the correct and recommended manner?

Any help very much appreciated.
Best wishes,
Ahlan

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

* Re: Trying to install the latest GtkAda for Mac on Mojave using Community 2018
  2019-01-31 15:56 Trying to install the latest GtkAda for Mac on Mojave using Community 2018 ahlan
@ 2019-01-31 17:13 ` ahlan
  2019-01-31 18:10 ` Simon Wright
  1 sibling, 0 replies; 7+ messages in thread
From: ahlan @ 2019-01-31 17:13 UTC (permalink / raw)


On Thursday, January 31, 2019 at 4:56:28 PM UTC+1, ah...@marriott.org wrote:
> Once upon a time, (2015), I successfully installed GtkAda 3.8.4 using Macports and then GtkAda from the sources provided in gtkada-gpl-2015-src.tar.gz and all was well.
> 
> However on buying a new Mac I tried to do the same thing but failed.
> As I don't particularly want to remain on this version I have tried to install the latest and greatest.
> 
> But again without success.
> Can someone give me a clue as to what I am doing wrong or what I should be doing.
> Is there a better way of getting GtkAda running on my MAC?
> 
> I  installed the community 2018 version of GNAT for OSX.
> Easy - so far so good.
> 
> I assume that GtkAda needs Gtk3 for Quartz and so I installed Macports 2.5.3 and then did a port install of gtk3 +quartz which installed 3.22.30
> So far so good.
> 
> I then cloned the sources for GtkAda from GitHub.com/AdaCore/gtkada and then tried to build GtkAda.
> 
> Previously I changed directory to the sources and then entered
> 
> CC=/usr/bin/gcc ./configure --prefix=/Users/Ahlan/gtkada
> make
> make install
> 
> However the make now fails when trying to compile misc.c on line 32 
> #include <stdio.h>
> fatal error: stdio.h: No such file
> 
> and misc_generated.c fails to find limits.h
> 
> How is it supposed to find these files?
> Do I need to install something else?
> Am I installing GtkAda in the correct and recommended manner?
> 
> Any help very much appreciated.
> Best wishes,
> Ahlan

To part answer my own question - a better way to install GtkAda is to simply copy Xnadalib-gpl-2018-quartz-x86_64-apple-darwin 17.7.0-bin.tar that some very thoughtful chaps have made available.
This seems to be a compilation of "everything" and is built with GNAT community 2018, so the binaries and libraries are all compatible with the version of GNAT I am using.

Double plus good!

If I had known about this before I could have saved myself such a lot of time ;-)
But now I do - so a very big thanks to those involved in creating this time saving pre-built collection.

I have made a donation - not much but enough for a beer - Enjoy!

MfG
Ahlan

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

* Re: Trying to install the latest GtkAda for Mac on Mojave using Community 2018
  2019-01-31 15:56 Trying to install the latest GtkAda for Mac on Mojave using Community 2018 ahlan
  2019-01-31 17:13 ` ahlan
@ 2019-01-31 18:10 ` Simon Wright
  2019-02-04 11:16   ` ahlan
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Wright @ 2019-01-31 18:10 UTC (permalink / raw)


ahlan@marriott.org writes:

> However the make now fails when trying to compile misc.c on line 32 
> #include <stdio.h>
> fatal error: stdio.h: No such file
>
> and misc_generated.c fails to find limits.h

I think you may have fallen foul of Apple's latest (not installing the
header files where they ought to be): see
https://forward-in-code.blogspot.com/2018/11/mojave-vs-gcc.html

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

* Re: Trying to install the latest GtkAda for Mac on Mojave using Community 2018
  2019-01-31 18:10 ` Simon Wright
@ 2019-02-04 11:16   ` ahlan
  2019-02-04 15:44     ` Simon Wright
  0 siblings, 1 reply; 7+ messages in thread
From: ahlan @ 2019-02-04 11:16 UTC (permalink / raw)


On Thursday, January 31, 2019 at 7:10:20 PM UTC+1, Simon Wright wrote:
> ahlan@marriott.org writes:
> 
> > However the make now fails when trying to compile misc.c on line 32 
> > #include <stdio.h>
> > fatal error: stdio.h: No such file
> >
> > and misc_generated.c fails to find limits.h
> 
> I think you may have fallen foul of Apple's latest (not installing the
> header files where they ought to be): see
> https://forward-in-code.blogspot.com/2018/11/mojave-vs-gcc.html

Dear Simon,
How right you are :-)
Typing your line of magic solves the problem.
Or at least takes me to the next.
As I wrote, I have a solution, in as much as I can simply copy the complete works as built by somebody else.
But just out of interest, and because I think I am tantalisingly close to successfully building GtkAda myself I wonder if you or anyone else can help me past the next hurdle.
When I type Make I now get

ld: unknown option: -Wl
collect2: error: ld returned 1 exit status
garlic: /users/ahlan/opt/gnat/2018/bin/gcc execution error
gprbuild: could not build library for project gtkada
make: *** [build_library_type/relocatable] Error 4

Any ideas what I should do?
Best wishes,
Ahlan

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

* Re: Trying to install the latest GtkAda for Mac on Mojave using Community 2018
  2019-02-04 11:16   ` ahlan
@ 2019-02-04 15:44     ` Simon Wright
  2019-07-12  6:06       ` Roger
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Wright @ 2019-02-04 15:44 UTC (permalink / raw)


ahlan@marriott.org writes:

> When I type Make I now get
>
> ld: unknown option: -Wl
> collect2: error: ld returned 1 exit status

This is odd.

gprbuild (or gnatmake) calls gnatlink which calls gcc (or maybe g++)
which eventually calls the system ld with appropriate arguments.

-Wl starts an instruction to gcc to pass an argument through to the
system linker: if you say -Wl,-foo,bar then ld sees

   ld ... -foo bar ...

(see https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html).

Ah! the first comma is important: I just tried this,

   $ gnatmake raiser.adb -largs -Wl
   gcc -c raiser.adb
   gnatbind -x raiser.ali
   gnatlink raiser.ali -Wl
   gcc: error: unrecognized command line option '-Wl'; did you mean '-W'?
   gnatlink: error when calling /opt/gcc-8.1.0/bin/gcc
   gnatmake: *** link failed.

Maybe there's a problem in the Makefile.

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

* Re: Trying to install the latest GtkAda for Mac on Mojave using Community 2018
  2019-02-04 15:44     ` Simon Wright
@ 2019-07-12  6:06       ` Roger
  2019-07-12  6:11         ` Roger
  0 siblings, 1 reply; 7+ messages in thread
From: Roger @ 2019-07-12  6:06 UTC (permalink / raw)


On Tuesday, February 5, 2019 at 2:44:36 AM UTC+11, Simon Wright wrote:
> ah...@marriott.org writes:
> 
> > When I type Make I now get
> >
> > ld: unknown option: -Wl
> > collect2: error: ld returned 1 exit status
> 
> This is odd.
> 
> gprbuild (or gnatmake) calls gnatlink which calls gcc (or maybe g++)
> which eventually calls the system ld with appropriate arguments.
> 
> -Wl starts an instruction to gcc to pass an argument through to the
> system linker: if you say -Wl,-foo,bar then ld sees
> 
>    ld ... -foo bar ...
> 
> (see https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html).
> 
> Ah! the first comma is important: I just tried this,
> 
>    $ gnatmake raiser.adb -largs -Wl
>    gcc -c raiser.adb
>    gnatbind -x raiser.ali
>    gnatlink raiser.ali -Wl
>    gcc: error: unrecognized command line option '-Wl'; did you mean '-W'?
>    gnatlink: error when calling /opt/gcc-8.1.0/bin/gcc
>    gnatmake: *** link failed.
> 
> Maybe there's a problem in the Makefile.

I have a configure problem!
Configure fails with 
checking for GTK - version >= 3.14.0... configure: error: pkg-config not found

brew installed gtk+3 version 3.24.10 which does contain pkgconfig/gtk+-3.0.pc

Any advice will be appreciated.
Thanks,
Roger

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

* Re: Trying to install the latest GtkAda for Mac on Mojave using Community 2018
  2019-07-12  6:06       ` Roger
@ 2019-07-12  6:11         ` Roger
  0 siblings, 0 replies; 7+ messages in thread
From: Roger @ 2019-07-12  6:11 UTC (permalink / raw)



 I  forgot to mention that I  am using the community 2019 version of GNAT for OSX.
Best regards,
Roger

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

end of thread, other threads:[~2019-07-12  6:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 15:56 Trying to install the latest GtkAda for Mac on Mojave using Community 2018 ahlan
2019-01-31 17:13 ` ahlan
2019-01-31 18:10 ` Simon Wright
2019-02-04 11:16   ` ahlan
2019-02-04 15:44     ` Simon Wright
2019-07-12  6:06       ` Roger
2019-07-12  6:11         ` Roger

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