comp.lang.ada
 help / color / mirror / Atom feed
* problems with gnat on yosemite macox
@ 2014-10-18  0:10 Leo Brewin
  2014-10-18 11:14 ` vincent.diemunsch
                   ` (5 more replies)
  0 siblings, 6 replies; 35+ messages in thread
From: Leo Brewin @ 2014-10-18  0:10 UTC (permalink / raw)


Hi Troops,

I just tried running gnatmake and friends under yosemite on MacOSX 10.10.
It failed badly.

Using the AdaCore 2014 GPL binaries I get

   /usr/local/gnat/bin/gcc -v
   Segmentation fault

   /usr/local/gnat/bin/gnatmake -v

   GNATMAKE GPL 2014 (20140331)
   Copyright (C) 1992-2014, Free Software Foundation, Inc.
   try "gnatmake --help" for more information.

Simon's gcc-4.8.0 binaries yield a small improvement but they too fail on a simple Hello World code,

   which gnatmake
   /opt/gcc-4.8.0/bin/gnatmake
   
   gnatmake lcb01.adb
   gnatbind -x lcb01.ali
   gnatlink lcb01.ali
   gcc: warning: couldn't understand kern.osversion '14.0.0
   gcc: warning: couldn't understand kern.osversion '14.0.0
   Undefined symbols for architecture x86_64:
     "__Unwind_Backtrace", referenced from:
         ___gnat_backtrace in libgnat.a(tracebak.o)
   	... similar lines deleted ...
   ld: symbol(s) not found for architecture x86_64
   collect2: error: ld returned 1 exit status
   gnatlink: error when calling /opt/gcc-4.8.0/bin/gcc
   gnatmake: *** link failed.

The file lcb01.adb is a trivial Hello World code

   with Ada.Text_IO; use Ada.Text_IO;
   procedure lcb01 is
   begin
      Put_line("Hello world");
   end lcb01;

I'm running Xcode 6.0.1 (not the developer 6.1 beta) and I've installed the command line tools.
I'm running this on a late 2013 MacBook Pro.

Any suggestions would be gratefully appreciated.

Cheers,
Leo


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

* Re: problems with gnat on yosemite macox
  2014-10-18  0:10 problems with gnat on yosemite macox Leo Brewin
@ 2014-10-18 11:14 ` vincent.diemunsch
  2014-10-18 12:52   ` Leo Brewin
  2014-10-18 11:34 ` Simon Wright
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 35+ messages in thread
From: vincent.diemunsch @ 2014-10-18 11:14 UTC (permalink / raw)


Hi Leo,

Thank you very much for sharing this information. 
It prevented me from doing the same mistake !

Are older versions of gnat (2012 or 2013) working properly ?
What about Spark 2012 ? I fear to install Yosemite if a lose Ada
and Spark !

Vincent



On Saturday, October 18, 2014 2:10:13 AM UTC+2, Leo Brewin wrote:
> Hi Troops,
> 
> 
> 
> I just tried running gnatmake and friends under yosemite on MacOSX 10.10.
> 
> It failed badly.
> 
> 
> 
> Using the AdaCore 2014 GPL binaries I get
> 
> 
> 
>    /usr/local/gnat/bin/gcc -v
> 
>    Segmentation fault
> 
> 
> 
>    /usr/local/gnat/bin/gnatmake -v
> 
> 
> 
>    GNATMAKE GPL 2014 (20140331)
> 
>    Copyright (C) 1992-2014, Free Software Foundation, Inc.
> 
>    try "gnatmake --help" for more information.
> 
> 
> 
> Simon's gcc-4.8.0 binaries yield a small improvement but they too fail on a simple Hello World code,
> 
> 
> 
>    which gnatmake
> 
>    /opt/gcc-4.8.0/bin/gnatmake
> 
>    
> 
>    gnatmake lcb01.adb
> 
>    gnatbind -x lcb01.ali
> 
>    gnatlink lcb01.ali
> 
>    gcc: warning: couldn't understand kern.osversion '14.0.0
> 
>    gcc: warning: couldn't understand kern.osversion '14.0.0
> 
>    Undefined symbols for architecture x86_64:
> 
>      "__Unwind_Backtrace", referenced from:
> 
>          ___gnat_backtrace in libgnat.a(tracebak.o)
> 
>    	... similar lines deleted ...
> 
>    ld: symbol(s) not found for architecture x86_64
> 
>    collect2: error: ld returned 1 exit status
> 
>    gnatlink: error when calling /opt/gcc-4.8.0/bin/gcc
> 
>    gnatmake: *** link failed.
> 
> 
> 
> The file lcb01.adb is a trivial Hello World code
> 
> 
> 
>    with Ada.Text_IO; use Ada.Text_IO;
> 
>    procedure lcb01 is
> 
>    begin
> 
>       Put_line("Hello world");
> 
>    end lcb01;
> 
> 
> 
> I'm running Xcode 6.0.1 (not the developer 6.1 beta) and I've installed the command line tools.
> 
> I'm running this on a late 2013 MacBook Pro.
> 
> 
> 
> Any suggestions would be gratefully appreciated.
> 
> 
> 
> Cheers,
> 
> Leo

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

* Re: problems with gnat on yosemite macox
  2014-10-18  0:10 problems with gnat on yosemite macox Leo Brewin
  2014-10-18 11:14 ` vincent.diemunsch
@ 2014-10-18 11:34 ` Simon Wright
  2014-10-18 16:01 ` Simon Wright
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-10-18 11:34 UTC (permalink / raw)


Leo Brewin <leo.brewin@internode.on.net> writes:

> I just tried running gnatmake and friends under yosemite on MacOSX
> 10.10.  It failed badly.

Thanks for the heads up.

I'm going to install Yosemite on an external drive and see how it goes.


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

* Re: problems with gnat on yosemite macox
  2014-10-18 11:14 ` vincent.diemunsch
@ 2014-10-18 12:52   ` Leo Brewin
  0 siblings, 0 replies; 35+ messages in thread
From: Leo Brewin @ 2014-10-18 12:52 UTC (permalink / raw)


Hi Vincent,

I haven't tried versions other than GNAT GPL 2014. I don't use Spark so I
can't comment. I suspect that too will be broken.

I did take the precaution of not installing yosemite on my main computer but
rather on a spare mac book I had lying around. Better safe than sorry.

> Are older versions of gnat (2012 or 2013) working properly ?
> 
> What about Spark 2012 ? I fear to install Yosemite if a lose Ada
> 
> and Spark !
> 


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

* Re: problems with gnat on yosemite macox
  2014-10-18  0:10 problems with gnat on yosemite macox Leo Brewin
  2014-10-18 11:14 ` vincent.diemunsch
  2014-10-18 11:34 ` Simon Wright
@ 2014-10-18 16:01 ` Simon Wright
  2014-10-18 19:33   ` Simon Wright
  2014-10-18 16:11 ` Simon Wright
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-18 16:01 UTC (permalink / raw)


Leo Brewin <leo.brewin@internode.on.net> writes:

> Simon's gcc-4.8.0 binaries yield a small improvement but they too fail
> on a simple Hello World code,
>
>    which gnatmake
>    /opt/gcc-4.8.0/bin/gnatmake
>    
>    gnatmake lcb01.adb
>    gnatbind -x lcb01.ali
>    gnatlink lcb01.ali
>    gcc: warning: couldn't understand kern.osversion '14.0.0
>    gcc: warning: couldn't understand kern.osversion '14.0.0
>    Undefined symbols for architecture x86_64:
>      "__Unwind_Backtrace", referenced from:
>          ___gnat_backtrace in libgnat.a(tracebak.o)
>    	... similar lines deleted ...
>    ld: symbol(s) not found for architecture x86_64
>    collect2: error: ld returned 1 exit status
>    gnatlink: error when calling /opt/gcc-4.8.0/bin/gcc
>    gnatmake: *** link failed.

4.9.1 has the same problem.

The "couldn't understand kern.osversion" is related to GCC PR/61407;
apparently the pre-Yosemite version of this interface produced something
like "13.4" but Yosemite produces "14.0.0". I will see if I can backport
the relevant patch (SVN revision 215690, it looks like).

__Unwind_Backtrace (& friends, I expect) are provided by
libgcc_s.1.dylib, which is required by libgcc_ext.10.{4,5}.dylib.

The Mavericks link of hello.adb includes

   -macosx_version_min 10.9.4 
   [...]
   -no_compact_unwind 
   -lSystem 
   -lgcc_ext.10.5 
   -lgcc 
   -lSystem

The Yosemite link includes

   -macosx_version_min 10.4 
   [...]
   -lgcc_ext.10.4 
   -lgcc 
   -lSystem

and I think this is the cause of our problems.

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

* Re: problems with gnat on yosemite macox
  2014-10-18  0:10 problems with gnat on yosemite macox Leo Brewin
                   ` (2 preceding siblings ...)
  2014-10-18 16:01 ` Simon Wright
@ 2014-10-18 16:11 ` Simon Wright
  2014-10-18 21:46   ` Leo Brewin
  2014-11-07  2:51 ` smndl
  2014-11-20  8:17 ` Simon Wright
  5 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-18 16:11 UTC (permalink / raw)


Leo Brewin <leo.brewin@internode.on.net> writes:

> I just tried running gnatmake and friends under yosemite on MacOSX
> 10.10.  It failed badly.

I started off with a different problem: 

   ld: library not found for -lcrt1.o
   collect2: error: ld returned 1 exit status

I'd installed Xcode 6 but there was no /usr/include and no crt1.* in
/usr/lib.

I put symlinks in /usr/local to the relevant places in the SDK and was
able to proceed.

But as I remember it in the past, installing Xcode would copy the
relevant files from the SDK to the corresponding /usr directories. At
some point in the Xcode saga.

You said you installed Xcode *and* the command line tools, would an
explicit install of the command line tools (xcode-select --install, I
think?) do the job "properly"?

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

* Re: problems with gnat on yosemite macox
  2014-10-18 16:01 ` Simon Wright
@ 2014-10-18 19:33   ` Simon Wright
  2014-10-18 23:39     ` Leo Brewin
  0 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-18 19:33 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> The "couldn't understand kern.osversion" is related to GCC PR/61407;
> apparently the pre-Yosemite version of this interface produced something
> like "13.4" but Yosemite produces "14.0.0". I will see if I can backport
> the relevant patch (SVN revision 215690, it looks like).

Looking good.

Compiler & the patch (but no AdaCore tools included yet, sorry) at
https://www.dropbox.com/sh/q9prig1gdz2s3b3/AAABoz_UOLQA2-Ww4yRGXfZxa?dl=0

The compiler installs at /opt/gcc-4.9.1-yosemite and works for me on
Mavericks and Yosemite (come to think, though, I haven't tried exception
handling yet)

Let us know how you get on.

If all seems OK I'll put this (plus tools) in the usual place on
Sourceforge.

By the way, I'm pretty sure you can now install the compiler wherever
you like and call /where/ever/bin/gnat* directly or via your PATH!


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

* Re: problems with gnat on yosemite macox
  2014-10-18 16:11 ` Simon Wright
@ 2014-10-18 21:46   ` Leo Brewin
  0 siblings, 0 replies; 35+ messages in thread
From: Leo Brewin @ 2014-10-18 21:46 UTC (permalink / raw)


On Sunday, October 19, 2014 3:11:48 AM UTC+11, Simon Wright wrote:

> You said you installed Xcode *and* the command line tools, would an
> 
> explicit install of the command line tools (xcode-select --install, I
> 
> think?) do the job "properly"?

I installed Xcode and the command line tools over the top of a previous
release (can't recall which version). i.e., I didn't do a clean install.

I used the App store to install Xcode 6.0.1 and then xcode-select --install
for the command line tools. Late last night I installed Xcode 6.1 (its no longer
in beta) and the command line tools for 10.10 by downloading the .dmg files
from the Mac developer website. In all of this I din't add any symlinks.

And thanks very much for the very quick fix for 4.9.1 -- very much appreciated!

Cheers,
Leo


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

* Re: problems with gnat on yosemite macox
  2014-10-18 19:33   ` Simon Wright
@ 2014-10-18 23:39     ` Leo Brewin
  2014-10-19 13:55       ` Simon Wright
  0 siblings, 1 reply; 35+ messages in thread
From: Leo Brewin @ 2014-10-18 23:39 UTC (permalink / raw)


Hi Simon,

I just tried compiling my Hello World code using your gcc-4.9.1-yosemite version and I still get problems. The good news is that the 13.4 vs. 14.0.0 issue is resolved but the linker issue remains. Should I be setting some options for the linker?

   which gnatmake
   /opt/gcc-4.9.1-yosemite/bin/gnatmake
	
   gnatmake lcb01.adb
	
   gnatbind -x lcb01.ali
   gnatlink lcb01.ali
   Undefined symbols for architecture x86_64:
     "__Unwind_Backtrace", referenced from:
         ___gnat_backtrace in libgnat.a(tracebak.o)
   ... and more of the same ...
   ld: symbol(s) not found for architecture x86_64
   collect2: error: ld returned 1 exit status
   gnatlink: error when calling /opt/gcc-4.9.1-yosemite/bin/gcc
   gnatmake: *** link failed.

Cheers,
Leo

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

* Re: problems with gnat on yosemite macox
  2014-10-18 23:39     ` Leo Brewin
@ 2014-10-19 13:55       ` Simon Wright
  2014-10-19 20:37         ` vincent.diemunsch
  2014-10-19 20:59         ` Leo Brewin
  0 siblings, 2 replies; 35+ messages in thread
From: Simon Wright @ 2014-10-19 13:55 UTC (permalink / raw)


Leo Brewin <leo.brewin@internode.on.net> writes:

> I just tried compiling my Hello World code using your
> gcc-4.9.1-yosemite version and I still get problems. The good news is
> that the 13.4 vs. 14.0.0 issue is resolved but the linker issue
> remains. Should I be setting some options for the linker?
>
>    which gnatmake
>    /opt/gcc-4.9.1-yosemite/bin/gnatmake
> 	
>    gnatmake lcb01.adb
> 	
>    gnatbind -x lcb01.ali
>    gnatlink lcb01.ali
>    Undefined symbols for architecture x86_64:
>      "__Unwind_Backtrace", referenced from:
>          ___gnat_backtrace in libgnat.a(tracebak.o)
>    ... and more of the same ...
>    ld: symbol(s) not found for architecture x86_64
>    collect2: error: ld returned 1 exit status
>    gnatlink: error when calling /opt/gcc-4.9.1-yosemite/bin/gcc
>    gnatmake: *** link failed.

It works for me.

Could you build with "gnatmake lcb01.adb -largs -Wl,-v" to print the
command line passed to ld?


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

* Re: problems with gnat on yosemite macox
  2014-10-19 13:55       ` Simon Wright
@ 2014-10-19 20:37         ` vincent.diemunsch
  2014-10-20  8:43           ` Simon Wright
  2014-10-19 20:59         ` Leo Brewin
  1 sibling, 1 reply; 35+ messages in thread
From: vincent.diemunsch @ 2014-10-19 20:37 UTC (permalink / raw)


On Sunday, October 19, 2014 3:55:15 PM UTC+2, Simon Wright wrote:
> Leo Brewin writes:
> 
> 
> 
> > I just tried compiling my Hello World code using your
> 
> > gcc-4.9.1-yosemite version and I still get problems. The good news is
> 
> > that the 13.4 vs. 14.0.0 issue is resolved but the linker issue
> 
> > remains. Should I be setting some options for the linker?
> 
> >
> 
> >    which gnatmake
> 
> >    /opt/gcc-4.9.1-yosemite/bin/gnatmake
> 
> > 	
> 
> >    gnatmake lcb01.adb
> 
> > 	
> 
> >    gnatbind -x lcb01.ali
> 
> >    gnatlink lcb01.ali
> 
> >    Undefined symbols for architecture x86_64:
> 
> >      "__Unwind_Backtrace", referenced from:
> 
> >          ___gnat_backtrace in libgnat.a(tracebak.o)
> 
> >    ... and more of the same ...
> 
> >    ld: symbol(s) not found for architecture x86_64
> 
> >    collect2: error: ld returned 1 exit status
> 
> >    gnatlink: error when calling /opt/gcc-4.9.1-yosemite/bin/gcc
> 
> >    gnatmake: *** link failed.
> 
> 
> 
> It works for me.
> 
> 
> 
> Could you build with "gnatmake lcb01.adb -largs -Wl,-v" to print the
> 
> command line passed to ld?

Simon, can you explain me using simple words what the problem was and
how you did solve it (without details... ). In fact I have both GNAT GPL 2014,
and GNAT GPL 2012 / SPARK 2012 on my iMac, and I want to avoid loosing
the 2012 version that I use for Spark... So do you think that there will be a
problem with Spark or not ?

Kind regards,

Vincent


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

* Re: problems with gnat on yosemite macox
  2014-10-19 13:55       ` Simon Wright
  2014-10-19 20:37         ` vincent.diemunsch
@ 2014-10-19 20:59         ` Leo Brewin
  2014-10-19 21:28           ` Leo Brewin
  2014-10-20  7:41           ` Simon Wright
  1 sibling, 2 replies; 35+ messages in thread
From: Leo Brewin @ 2014-10-19 20:59 UTC (permalink / raw)


On Monday, October 20, 2014 12:55:15 AM UTC+11, Simon Wright wrote:
> 
> Could you build with "gnatmake lcb01.adb -largs -Wl,-v" to print the
> 
> command line passed to ld?

Hi Simon,
Here is the output,

> gnatmake lcb01.adb -largs -Wl,-v

gcc -c lcb01.adb
gnatbind -x lcb01.ali
gnatlink lcb01.ali -Wl,-v
collect2 version 4.9.1
/opt/local/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.10.0 -weak_reference_mismatches non-weak -o lcb01 -L./ -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/ -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1 -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/../../.. b~lcb01.o ./lcb01.o -v /opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/libgnat.a -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem
@(#)PROGRAM:ld  PROJECT:ld64-136
configured to support archs: i386 x86_64 armv7 armv7s
Library search paths:
	./
	/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/
	/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1
	/opt/gcc-4.9.1-yosemite/lib
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/
Undefined symbols for architecture x86_64:
  "__Unwind_Backtrace", referenced from:
      ___gnat_backtrace in libgnat.a(tracebak.o)
... and more ...

Cheers,
Leo


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

* Re: problems with gnat on yosemite macox
  2014-10-19 20:59         ` Leo Brewin
@ 2014-10-19 21:28           ` Leo Brewin
  2014-10-20  7:41           ` Simon Wright
  1 sibling, 0 replies; 35+ messages in thread
From: Leo Brewin @ 2014-10-19 21:28 UTC (permalink / raw)


Hi Simon,

I did a crazy test and I was surprised to find that the following worked,

   gnatmake lcb01.adb -largs -Wl,-macosx_version_min,10.99.0

(it works for 10.80.0 and above, no idea why).

Using -Wl,-v I get

gnatbind -x lcb01.ali
gnatlink lcb01.ali -Wl,-macosx_version_min,10.99.0 -Wl,-v
collect2 version 4.9.1
/opt/local/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.10.0 -weak_reference_mismatches non-weak -o lcb01 -L./ -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/ -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1 -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/../../.. b~lcb01.o ./lcb01.o -macosx_version_min 10.99.0 -v /opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/libgnat.a -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem
@(#)PROGRAM:ld  PROJECT:ld64-136
configured to support archs: i386 x86_64 armv7 armv7s
Library search paths:
	./
	/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/
	/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1
	/opt/gcc-4.9.1-yosemite/lib
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/

Cheers,
Leo

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

* Re: problems with gnat on yosemite macox
  2014-10-19 20:59         ` Leo Brewin
  2014-10-19 21:28           ` Leo Brewin
@ 2014-10-20  7:41           ` Simon Wright
  2014-10-20  9:15             ` Leo Brewin
  2014-10-20 10:10             ` Simon Wright
  1 sibling, 2 replies; 35+ messages in thread
From: Simon Wright @ 2014-10-20  7:41 UTC (permalink / raw)


Leo Brewin <leo.brewin@internode.on.net> writes:

> /opt/local/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.10.0 -weak_reference_mismatches non-weak -o lcb01 -L./ -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/ -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1 -L/opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/../../.. b~lcb01.o ./lcb01.o -v /opt/gcc-4.9.1-yosemite/lib/gcc/x86_64-apple-darwin13/4.9.1/adalib/libgnat.a -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem
> @(#)PROGRAM:ld  PROJECT:ld64-136
> configured to support archs: i386 x86_64 armv7 armv7s

On my systems (both Mavericks & Yosemite), it's /usr/bin/ld and it
reports itself as

   @(#)PROGRAM:ld  PROJECT:ld64-241.8
   configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64
   x86_64h armv6m armv7m armv7em

I don't have Yosemite on another machine (it's an alternate boot on this
machine), so I can't immediately check the build that works, but those
are the only changes from a Mavericks build.

Where did /opt/local/bin/ld come from? It's clearly an Apple build, not
GNU.


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

* Re: problems with gnat on yosemite macox
  2014-10-19 20:37         ` vincent.diemunsch
@ 2014-10-20  8:43           ` Simon Wright
  2014-10-20 11:53             ` Simon Wright
  0 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-20  8:43 UTC (permalink / raw)


vincent.diemunsch@gmail.com writes:

> Simon, can you explain me using simple words what the problem was and
> how you did solve it (without details... ). In fact I have both
> GNAT GPL 2014, and GNAT GPL 2012 / SPARK 2012 on my iMac, and I want
> to avoid loosing the 2012 version that I use for Spark... So do you
> think that there will be a problem with Spark or not ?

I haven't tried the GPL software on Yosemite; Leo did (the 2014 version)
and the compiler (gcc) crashed.

I don't know whether the 2012 versions will crash or not, but there has
to be a good chance. Will try ...

The problem that we had with FSF GCC was that the compiler couldn't
determine the operating system version correctly because the format of
the version string returned by the OS has changed (it used to be "10.n",
now it's "10.n.m"); so it fell back to 10.4.

This meant that when it invoked the system linker (ld) it did it wrong.

The fix that I applied handles the new-format OS version string.


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

* Re: problems with gnat on yosemite macox
  2014-10-20  7:41           ` Simon Wright
@ 2014-10-20  9:15             ` Leo Brewin
  2014-10-20 10:12               ` Simon Wright
  2014-10-20 10:10             ` Simon Wright
  1 sibling, 1 reply; 35+ messages in thread
From: Leo Brewin @ 2014-10-20  9:15 UTC (permalink / raw)


Hi Simon,

Well spotted. The /opt/local/bin/ld was installed by MacPorts as part of failed attempt to install a port called Cadabra. That required the macport apple-gcc42 and in that port the offending /opt/local/bin/ld was installed.

I removed /opt/local/bin from my path and gnatmake now works perfectly.

Thank you very much for the time and effort you've put in in sorting this out, it's very much appreciated.

Cheers,
Leo


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

* Re: problems with gnat on yosemite macox
  2014-10-20  7:41           ` Simon Wright
  2014-10-20  9:15             ` Leo Brewin
@ 2014-10-20 10:10             ` Simon Wright
  2014-10-27 14:30               ` Luke A. Guest
  1 sibling, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-20 10:10 UTC (permalink / raw)


On Monday, 20 October 2014 08:41:55 UTC+1, Simon Wright  wrote:

>    @(#)PROGRAM:ld  PROJECT:ld64-241.8

Since I updated the Command Line Tools, it's

 @(#)PROGRAM:ld  PROJECT:ld64-241.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7m armv7em

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

* Re: problems with gnat on yosemite macox
  2014-10-20  9:15             ` Leo Brewin
@ 2014-10-20 10:12               ` Simon Wright
  0 siblings, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-10-20 10:12 UTC (permalink / raw)


On Monday, 20 October 2014 10:15:43 UTC+1, Leo Brewin  wrote:

> Thank you very much for the time and effort you've put in in sorting this out, it's very much appreciated.

Not a problem - I'll need it too!

(from Yosemite via Google Groups)


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

* Re: problems with gnat on yosemite macox
  2014-10-20  8:43           ` Simon Wright
@ 2014-10-20 11:53             ` Simon Wright
  2014-10-20 20:28               ` vincent.diemunsch
  0 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-20 11:53 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> I haven't tried the GPL software on Yosemite; Leo did (the 2014
> version) and the compiler (gcc) crashed.

Same here; a segv in gcc.

> I don't know whether the 2012 versions will crash or not, but there
> has to be a good chance. Will try ...

gnatmake GPL 2012 needs the macosx version spec:

   $ gnatmake hello.adb -largs -Wl,-macosx_version_min,10.10.0

I don't know SPARK, but the Examiner (spark) ran apparently OK (that is,
it produced a report telling me my code was wrong!) - so that should be
good.

If you don't like the -Wl,-macosx stuff (and if we can't find a way to
make it unnecessary) I'd have thought you could use Spark GPL 2012 to
check and FSF GCC 4.9.1 to build.

I've just realised that there may be a problem with GPS; I forgot to try
it, since I don't use it myself. Does GPS GPL 2014 support the older
SPARK? Can try both 2012 & 2014 next time I'm booted into Yosemite ...


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

* Re: problems with gnat on yosemite macox
  2014-10-20 11:53             ` Simon Wright
@ 2014-10-20 20:28               ` vincent.diemunsch
  2014-10-20 20:34                 ` David Botton
  0 siblings, 1 reply; 35+ messages in thread
From: vincent.diemunsch @ 2014-10-20 20:28 UTC (permalink / raw)


On Monday, October 20, 2014 1:53:51 PM UTC+2, Simon Wright wrote:
> Simon Wright <simon@pushface.org> writes:
> 
> 
> 
> > I haven't tried the GPL software on Yosemite; Leo did (the 2014
> 
> > version) and the compiler (gcc) crashed.
> 
> 
> 
> Same here; a segv in gcc.
> 
> 
> 
> > I don't know whether the 2012 versions will crash or not, but there
> 
> > has to be a good chance. Will try ...
> 
> 
> 
> gnatmake GPL 2012 needs the macosx version spec:
> 
> 
> 
>    $ gnatmake hello.adb -largs -Wl,-macosx_version_min,10.10.0
> 
> 
> 
> I don't know SPARK, but the Examiner (spark) ran apparently OK (that is,
> 
> it produced a report telling me my code was wrong!) - so that should be
> 
> good.
> 
> 
> 
> If you don't like the -Wl,-macosx stuff (and if we can't find a way to
> 
> make it unnecessary) I'd have thought you could use Spark GPL 2012 to
> 
> check and FSF GCC 4.9.1 to build.
> 
> 
> 
> I've just realised that there may be a problem with GPS; I forgot to try
> 
> it, since I don't use it myself. Does GPS GPL 2014 support the older
> 
> SPARK? Can try both 2012 & 2014 next time I'm booted into Yosemite ...

Thank you Simon, this is good news, since in fact the most important is the
examiner ! GPS 2014 doesn't support the older spark, as far as I have tried...
So I use the old GPS (from Gnat 2012) but in fact I think that the compiler
is GNAT GPL 2014. So yes, you are right, I could use FSF GCC to build !

Regards,

Vincent

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

* Re: problems with gnat on yosemite macox
  2014-10-20 20:28               ` vincent.diemunsch
@ 2014-10-20 20:34                 ` David Botton
  2014-10-21  7:52                   ` Simon Wright
  0 siblings, 1 reply; 35+ messages in thread
From: David Botton @ 2014-10-20 20:34 UTC (permalink / raw)


Simon, not pushing anything but do you have an ETA for an update GNAT-FSF for Yosemite to download now that you have things working?

Thanks
David Botton

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

* Re: problems with gnat on yosemite macox
  2014-10-20 20:34                 ` David Botton
@ 2014-10-21  7:52                   ` Simon Wright
  0 siblings, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-10-21  7:52 UTC (permalink / raw)


David Botton <david@botton.com> writes:

> Simon, not pushing anything but do you have an ETA for an update
> GNAT-FSF for Yosemite to download now that you have things working?

Today, I hope.


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

* Re: problems with gnat on yosemite macox
  2014-10-20 10:10             ` Simon Wright
@ 2014-10-27 14:30               ` Luke A. Guest
  2014-10-27 16:46                 ` Simon Wright
  0 siblings, 1 reply; 35+ messages in thread
From: Luke A. Guest @ 2014-10-27 14:30 UTC (permalink / raw)


Simon Wright <simon.john.wright@gmail.com> wrote:
> On Monday, 20 October 2014 08:41:55 UTC+1, Simon Wright  wrote:
> 
>>    @(#)PROGRAM:ld  PROJECT:ld64-241.8
> 
> Since I updated the Command Line Tools, it's
> 
>  @(#)PROGRAM:ld  PROJECT:ld64-241.9
> configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h
> armv6m armv7m armv7em

Does this mean ios target is trivial?

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

* Re: problems with gnat on yosemite macox
  2014-10-27 14:30               ` Luke A. Guest
@ 2014-10-27 16:46                 ` Simon Wright
  2014-10-28 23:50                   ` Luke A. Guest
  0 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-27 16:46 UTC (permalink / raw)


Luke A. Guest <laguest@archeia.com> writes:

> Simon Wright <simon.john.wright@gmail.com> wrote:
>> On Monday, 20 October 2014 08:41:55 UTC+1, Simon Wright  wrote:
>> 
>>>    @(#)PROGRAM:ld  PROJECT:ld64-241.8
>> 
>> Since I updated the Command Line Tools, it's
>> 
>>  @(#)PROGRAM:ld  PROJECT:ld64-241.9
>> configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h
>> armv6m armv7m armv7em
>
> Does this mean ios target is trivial?

For ld & other binutils, presumably. For GCC not so much, I expect.


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

* Re: problems with gnat on yosemite macox
  2014-10-27 16:46                 ` Simon Wright
@ 2014-10-28 23:50                   ` Luke A. Guest
  2014-10-29  6:44                     ` Simon Wright
  0 siblings, 1 reply; 35+ messages in thread
From: Luke A. Guest @ 2014-10-28 23:50 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote:

>> Does this mean ios target is trivial?
> 
> For ld & other binutils, presumably. For GCC not so much, I expect.

Ios and MacOS use Mach afaik so surely same tasking mechanisms/calls so
should be easily doable, right?


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

* Re: problems with gnat on yosemite macox
  2014-10-28 23:50                   ` Luke A. Guest
@ 2014-10-29  6:44                     ` Simon Wright
  2014-10-29  9:24                       ` Georg Bauhaus
  0 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-10-29  6:44 UTC (permalink / raw)


Luke A. Guest <laguest@archeia.com> writes:

> Simon Wright <simon@pushface.org> wrote:
>
>>> Does this mean ios target is trivial?
>> 
>> For ld & other binutils, presumably. For GCC not so much, I expect.
>
> Ios and MacOS use Mach afaik so surely same tasking mechanisms/calls so
> should be easily doable, right?

Is there anyone here who develops for iOS and can answer that?


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

* Re: problems with gnat on yosemite macox
  2014-10-29  6:44                     ` Simon Wright
@ 2014-10-29  9:24                       ` Georg Bauhaus
  0 siblings, 0 replies; 35+ messages in thread
From: Georg Bauhaus @ 2014-10-29  9:24 UTC (permalink / raw)


On 29.10.14 07:44, Simon Wright wrote:
> Luke A. Guest <laguest@archeia.com> writes:
>
>> Simon Wright <simon@pushface.org> wrote:
>>
>>>> Does this mean ios target is trivial?
>>>
>>> For ld & other binutils, presumably. For GCC not so much, I expect.
>>
>> Ios and MacOS use Mach afaik so surely same tasking mechanisms/calls so
>> should be easily doable, right?
>
> Is there anyone here who develops for iOS and can answer that?
>

I can't answer it, but, nevertheless, in  "Using POSIX Threads",
Apple's official documentation lets me think that GNAT's RTS can be
tweaked, at least where based on POSIX:

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html

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

* Re: problems with gnat on yosemite macox
  2014-10-18  0:10 problems with gnat on yosemite macox Leo Brewin
                   ` (3 preceding siblings ...)
  2014-10-18 16:11 ` Simon Wright
@ 2014-11-07  2:51 ` smndl
  2014-11-07  2:53   ` David Botton
  2014-11-20  8:17 ` Simon Wright
  5 siblings, 1 reply; 35+ messages in thread
From: smndl @ 2014-11-07  2:51 UTC (permalink / raw)


Hi folks,

same issue here. If you google for kern.osversion you'll find that there are some issues around that topic. One could try to apply the patches proposed for gcc... but currently I have not running gnat so I can't build gnat 2014 from sources under Yosemite.

I also tried gnat 2013 and 2012. They all die with segmentation faults.

smndl
--





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

* Re: problems with gnat on yosemite macox
  2014-11-07  2:51 ` smndl
@ 2014-11-07  2:53   ` David Botton
  2014-11-07  7:10     ` Simon Wright
  0 siblings, 1 reply; 35+ messages in thread
From: David Botton @ 2014-11-07  2:53 UTC (permalink / raw)



> same issue here.

What issue?

Simon's latest GNAT-FSF in the gnuada project has been working very well for me and others.

David Botton



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

* Re: problems with gnat on yosemite macox
  2014-11-07  2:53   ` David Botton
@ 2014-11-07  7:10     ` Simon Wright
  0 siblings, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-11-07  7:10 UTC (permalink / raw)


David Botton <david@botton.com> writes:

> Simon's latest GNAT-FSF in the gnuada project has been working very
> well for me and others.

Here -
http://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/4.9.1/

I've just noticed that the README doesn't say explicitly that this build
works on Yosemite, but - it does.

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

* Re: problems with gnat on yosemite macox
  2014-10-18  0:10 problems with gnat on yosemite macox Leo Brewin
                   ` (4 preceding siblings ...)
  2014-11-07  2:51 ` smndl
@ 2014-11-20  8:17 ` Simon Wright
  2014-11-20 21:41   ` Leo Brewin
  5 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-11-20  8:17 UTC (permalink / raw)


Leo Brewin <leo.brewin@internode.on.net> writes:

> I just tried running gnatmake and friends under yosemite on MacOSX 10.10.
> It failed badly.

David Botton points us to this from the AdaCore Libre site (README.txt
on opening up the GNAT Ada GPL 2014 section):

[...]
  - MacOS X Yosemite users need to:

    - either add the following environment variable in their environment:

      $ export MACOSX_DEPLOYMENT_TARGET=10.9

    - or add -mmacosx-version-min=10.9 to their compiler switches


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

* Re: problems with gnat on yosemite macox
  2014-11-20  8:17 ` Simon Wright
@ 2014-11-20 21:41   ` Leo Brewin
  2014-11-21  1:13     ` David Botton
  2014-12-03 20:39     ` fastrgv
  0 siblings, 2 replies; 35+ messages in thread
From: Leo Brewin @ 2014-11-20 21:41 UTC (permalink / raw)


On Thursday, November 20, 2014 7:17:54 PM UTC+11, Simon Wright wrote:

>   - MacOS X Yosemite users need to:
> 
>     - either add the following environment variable in their environment:
> 
>       $ export MACOSX_DEPLOYMENT_TARGET=10.9
> 
>     - or add -mmacosx-version-min=10.9 to their compiler switches

I just tried this and yes it works. That is good news, thanks David and Simon for pointing this out.

Cheers,
Leo

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

* Re: problems with gnat on yosemite macox
  2014-11-20 21:41   ` Leo Brewin
@ 2014-11-21  1:13     ` David Botton
  2014-11-21  7:29       ` Simon Wright
  2014-12-03 20:39     ` fastrgv
  1 sibling, 1 reply; 35+ messages in thread
From: David Botton @ 2014-11-21  1:13 UTC (permalink / raw)


> I just tried this and yes it works. That is good news, thanks David and Simon for pointing this out.

I can't take much credit. In my conversation with AdaCore to encourage a GMGPL version of Gnat for at least non-systems applications, I illustrated also reason why more releases were needed for Ada advocacy, i.e. the Yosemite issue. They pointed out the README change.

I actually waited a week to see if they cared enough to announce the change anywhere themselves that they made in the readme....

David Botton

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

* Re: problems with gnat on yosemite macox
  2014-11-21  1:13     ` David Botton
@ 2014-11-21  7:29       ` Simon Wright
  0 siblings, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-11-21  7:29 UTC (permalink / raw)


David Botton <david@botton.com> writes:

> I actually waited a week to see if they cared enough to announce the
> change anywhere themselves that they made in the readme....

And the README.txt is dated 13 October - 4 days before Leo reported the
problem here. 

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

* Re: problems with gnat on yosemite macox
  2014-11-20 21:41   ` Leo Brewin
  2014-11-21  1:13     ` David Botton
@ 2014-12-03 20:39     ` fastrgv
  1 sibling, 0 replies; 35+ messages in thread
From: fastrgv @ 2014-12-03 20:39 UTC (permalink / raw)


On Thursday, November 20, 2014 1:41:44 PM UTC-8, Leo Brewin wrote:
> On Thursday, November 20, 2014 7:17:54 PM UTC+11, Simon Wright wrote:
> 
> >   - MacOS X Yosemite users need to:
> > 
> >     - either add the following environment variable in their environment:
> > 
> >       $ export MACOSX_DEPLOYMENT_TARGET=10.9
> > 
> >     - or add -mmacosx-version-min=10.9 to their compiler switches
> 
> I just tried this and yes it works. That is good news, thanks David and Simon for pointing this out.
> 
> Cheers,
> Leo

Yosemite has Killed highDPI on my Retina display.  I employed the above workaround and, at least got everything to compile.  I'm using glfw in a similar fashion as in c++ to coerce highdpi.  I checked, and my c++ codes still achieve highdpi on Yosemite, but the gnat codes do not.  Of course I would be very interested if anyone has a workaround for that.
Rod

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

end of thread, other threads:[~2014-12-03 20:39 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18  0:10 problems with gnat on yosemite macox Leo Brewin
2014-10-18 11:14 ` vincent.diemunsch
2014-10-18 12:52   ` Leo Brewin
2014-10-18 11:34 ` Simon Wright
2014-10-18 16:01 ` Simon Wright
2014-10-18 19:33   ` Simon Wright
2014-10-18 23:39     ` Leo Brewin
2014-10-19 13:55       ` Simon Wright
2014-10-19 20:37         ` vincent.diemunsch
2014-10-20  8:43           ` Simon Wright
2014-10-20 11:53             ` Simon Wright
2014-10-20 20:28               ` vincent.diemunsch
2014-10-20 20:34                 ` David Botton
2014-10-21  7:52                   ` Simon Wright
2014-10-19 20:59         ` Leo Brewin
2014-10-19 21:28           ` Leo Brewin
2014-10-20  7:41           ` Simon Wright
2014-10-20  9:15             ` Leo Brewin
2014-10-20 10:12               ` Simon Wright
2014-10-20 10:10             ` Simon Wright
2014-10-27 14:30               ` Luke A. Guest
2014-10-27 16:46                 ` Simon Wright
2014-10-28 23:50                   ` Luke A. Guest
2014-10-29  6:44                     ` Simon Wright
2014-10-29  9:24                       ` Georg Bauhaus
2014-10-18 16:11 ` Simon Wright
2014-10-18 21:46   ` Leo Brewin
2014-11-07  2:51 ` smndl
2014-11-07  2:53   ` David Botton
2014-11-07  7:10     ` Simon Wright
2014-11-20  8:17 ` Simon Wright
2014-11-20 21:41   ` Leo Brewin
2014-11-21  1:13     ` David Botton
2014-11-21  7:29       ` Simon Wright
2014-12-03 20:39     ` fastrgv

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