comp.lang.ada
 help / color / mirror / Atom feed
* GNAT bug on macOS Sierra ?
@ 2016-11-18 21:04 Vincent
  2016-11-18 22:44 ` Simon Wright
  2016-11-21  8:35 ` briot.emmanuel
  0 siblings, 2 replies; 13+ messages in thread
From: Vincent @ 2016-11-18 21:04 UTC (permalink / raw)


Hello,

I have recently upgraded my system to macOS Sierra (v10.12.1), and when I try to compile a package that I used to develop some years ago, I have the following :

gcc -c mpfr-floats.adb
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:11813:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:11970:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:11973:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:11974:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:12102:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:12120:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:12126:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:12127:suffix or operands invalid for `movq'
gnatmake: "mpfr-floats.adb" compilation error

Since it seems that the problem comes from an assembly file, it looks like a compiler's error.

And The compiler is 
GNAT 6.1.0
Copyright 1996-2016, Free Software Foundation, Inc.

Any idea ?
Regards,

Vincent

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

* Re: GNAT bug on macOS Sierra ?
  2016-11-18 21:04 GNAT bug on macOS Sierra ? Vincent
@ 2016-11-18 22:44 ` Simon Wright
  2016-11-18 22:55   ` vincent.diemunsch
  2016-11-21  8:35 ` briot.emmanuel
  1 sibling, 1 reply; 13+ messages in thread
From: Simon Wright @ 2016-11-18 22:44 UTC (permalink / raw)


Vincent <vincent.diemunsch@gmail.com> writes:

> I have recently upgraded my system to macOS Sierra (v10.12.1), and
> when I try to compile a package that I used to develop some years ago,
> I have the following :
>
> gcc -c mpfr-floats.adb
> /var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//cczP6WyG.s:11813:suffix
> or operands invalid for `movq'
[...]
> gnatmake: "mpfr-floats.adb" compilation error
>
> Since it seems that the problem comes from an assembly file, it looks
> like a compiler's error.

I downloaded the source archive of adabindinggmpmpfr and it compiled
OK. Perhaps you have a different release of the command line tools?

$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 8.1.0.0.1.1476494586


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

* Re: GNAT bug on macOS Sierra ?
  2016-11-18 22:44 ` Simon Wright
@ 2016-11-18 22:55   ` vincent.diemunsch
  0 siblings, 0 replies; 13+ messages in thread
From: vincent.diemunsch @ 2016-11-18 22:55 UTC (permalink / raw)


Le vendredi 18 novembre 2016 23:44:47 UTC+1, Simon Wright a écrit :
> I downloaded the source archive of adabindinggmpmpfr and it compiled
> OK. 

Good news.

> Perhaps you have a different release of the command line tools?
>
> $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
> package-id: com.apple.pkg.CLTools_Executables
> version: 8.1.0.0.1.1476494586

I have exactly the same release.
Maybe I should re-install GNAT FSF ?

Vincent


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

* Re: GNAT bug on macOS Sierra ?
  2016-11-18 21:04 GNAT bug on macOS Sierra ? Vincent
  2016-11-18 22:44 ` Simon Wright
@ 2016-11-21  8:35 ` briot.emmanuel
  2016-11-21  9:17   ` Simon Wright
  1 sibling, 1 reply; 13+ messages in thread
From: briot.emmanuel @ 2016-11-21  8:35 UTC (permalink / raw)


> And The compiler is 
> GNAT 6.1.0
> Copyright 1996-2016, Free Software Foundation, Inc.

You are using a compiler that existed well before Sierra was even released as a beta, so indeed you can't expect it to work. You should upgrade your compiler.

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

* Re: GNAT bug on macOS Sierra ?
  2016-11-21  8:35 ` briot.emmanuel
@ 2016-11-21  9:17   ` Simon Wright
  2016-11-21 21:28     ` Vincent
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Wright @ 2016-11-21  9:17 UTC (permalink / raw)


briot.emmanuel@gmail.com writes:

>> And The compiler is
>> GNAT 6.1.0
>> Copyright 1996-2016, Free Software Foundation, Inc.
>
> You are using a compiler that existed well before Sierra was even
> released as a beta, so indeed you can't expect it to work. You should
> upgrade your compiler.

The same would apply to GNAT GPL 2016, of course (except it works
fine). As does GNAT GPL 2015 (but not earlier).

And I suspect that Vincent is using FSF GCC 6.1.0, possibly as available
at [1]; no problems here, and as I said above, OK with Vincent's code.

FSF GCC 4.9.1 and 5.2.0 from the same place will also compile Vincent's
code.

[1] https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/6.1.0/native-2016/


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

* Re: GNAT bug on macOS Sierra ?
  2016-11-21  9:17   ` Simon Wright
@ 2016-11-21 21:28     ` Vincent
  2016-11-22  8:28       ` Simon Wright
  0 siblings, 1 reply; 13+ messages in thread
From: Vincent @ 2016-11-21 21:28 UTC (permalink / raw)


Le lundi 21 novembre 2016 10:17:45 UTC+1, Simon Wright a écrit :

Hello Simon and Emmanuel,

I made some further trials with compilers. I seems that
- Gnat GPL 2016 works fine
- Gnat FSF 6.1.0 has a problem with the file mp_x86_64bits.ads or mpfr-floats.adb

/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//ccdi0L0B.s:8932:suffix or operands invalid for `movq'
/var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//ccdi0L0B.s:8954:suffix or operands invalid for `movq'

Regards,

Vincent


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

* Re: GNAT bug on macOS Sierra ?
  2016-11-21 21:28     ` Vincent
@ 2016-11-22  8:28       ` Simon Wright
  2016-11-22 22:47         ` Vincent
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Wright @ 2016-11-22  8:28 UTC (permalink / raw)


Vincent <vincent.diemunsch@gmail.com> writes:

> I made some further trials with compilers. I seems that
> - Gnat GPL 2016 works fine
> - Gnat FSF 6.1.0 has a problem with the file mp_x86_64bits.ads or
> mpfr-floats.adb
>
> /var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//ccdi0L0B.s:8932:suffix
> or operands invalid for `movq'
> /var/folders/xb/4bm5gdr13k373gg8pbn_wsxw0000gp/T//ccdi0L0B.s:8954:suffix
> or operands invalid for `movq'

The assembly source produced for mp_x86_64bits.ads is only about 10
lines long, so I don't understand this one.

Compiling mpfr-floats.adb with FSF GCC 6.1.0 and

   gnatmake -c-u -f mpfr-floats.adb -cargs -S

the first few of the complaints in your original posting are lines of
the form

	movq	%xmm0, %rax
        
	movq	%rax, %xmm0

which (after some googling) look legal to me, and are accepted by the
assembler. What do you get?

Are you using the right assembler? I have

$ which as
/usr/bin/as
$ as --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

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

* Re: GNAT bug on macOS Sierra ?
  2016-11-22  8:28       ` Simon Wright
@ 2016-11-22 22:47         ` Vincent
  2016-11-23  8:46           ` Simon Wright
  0 siblings, 1 reply; 13+ messages in thread
From: Vincent @ 2016-11-22 22:47 UTC (permalink / raw)


Le mardi 22 novembre 2016 09:28:20 UTC+1, Simon Wright a écrit :
> Are you using the right assembler? I have
> 
> $ which as
> /usr/bin/as
> $ as --version
> Apple LLVM version 8.0.0 (clang-800.0.42.1)
> Target: x86_64-apple-darwin16.1.0
> Thread model: posix
> InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Hello Simon,

it seems that I have a problem with the assembler...

> which as
/opt/local/bin/as
> as --version
FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand '-' flag!
> as -version
Apple Inc version cctools-886, GNU assembler version 1.38

but 
>/usr/bin/as --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Therefore I think I have a problem of Path, no ?

Regards,

Vincent

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

* Re: GNAT bug on macOS Sierra ?
  2016-11-22 22:47         ` Vincent
@ 2016-11-23  8:46           ` Simon Wright
  2016-11-23 15:53             ` Vincent
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Wright @ 2016-11-23  8:46 UTC (permalink / raw)


Vincent <vincent.diemunsch@gmail.com> writes:

> Therefore I think I have a problem of Path, no ?

I think that must be it.


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

* Re: GNAT bug on macOS Sierra ?
  2016-11-23  8:46           ` Simon Wright
@ 2016-11-23 15:53             ` Vincent
  2016-11-23 17:06               ` Dennis Lee Bieber
  0 siblings, 1 reply; 13+ messages in thread
From: Vincent @ 2016-11-23 15:53 UTC (permalink / raw)


Le mercredi 23 novembre 2016 09:46:21 UTC+1, Simon Wright a écrit :
> Vincent writes:
> 
> > Therefore I think I have a problem of Path.
> 
> I think that must be it.

I'll try to fix that... Shall I put /usr/bin in front of my path ?
One question : does gnat / gcc alwas use "as" or can generate binaries directly ?

Kind regards,

Vincent

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

* Re: GNAT bug on macOS Sierra ?
  2016-11-23 15:53             ` Vincent
@ 2016-11-23 17:06               ` Dennis Lee Bieber
  2016-11-23 19:15                 ` G.B.
  0 siblings, 1 reply; 13+ messages in thread
From: Dennis Lee Bieber @ 2016-11-23 17:06 UTC (permalink / raw)


On Wed, 23 Nov 2016 07:53:52 -0800 (PST), Vincent
<vincent.diemunsch@gmail.com> declaimed the following:

>Le mercredi 23 novembre 2016 09:46:21 UTC+1, Simon Wright a écrit :
>> Vincent writes:
>> 
>> > Therefore I think I have a problem of Path.
>> 
>> I think that must be it.
>
>I'll try to fix that... Shall I put /usr/bin in front of my path ?
>One question : does gnat / gcc alwas use "as" or can generate binaries directly ?
>

	GNAT/gcc aren't a single program... GCC itself consists of a set of
language specific "front-ends" which generate an abtract intermediate
representation which gets fed to architecture specific "back-ends" -- which
emit assembly language files if they don't invisibly invoke the native
assembler to produce object files. And below that lies the linker which
takes a list of object files and libraries and produces the end executable
image.

	GCC tends to hide all those details as it is possible to provide
command line options for compiler, assemble, and linker all as one command,
rather than requiring the user to 

gcc file1.src
gcc file2.src	#compile only to assembly source
as  file1.s
as file2.s		#assemble to objects
ln file1.o file2.o -llibx	#link to executable (name taken from first)

(said sequence having been common in the old days)

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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

* Re: GNAT bug on macOS Sierra ?
  2016-11-23 17:06               ` Dennis Lee Bieber
@ 2016-11-23 19:15                 ` G.B.
  2016-11-24  3:40                   ` Dennis Lee Bieber
  0 siblings, 1 reply; 13+ messages in thread
From: G.B. @ 2016-11-23 19:15 UTC (permalink / raw)


On 23.11.16 18:06, Dennis Lee Bieber wrote:
> ln file1.o file2.o -llibx	#link to executable (name taken from first)

ld(1), surely?

The GNAT User's Guide introduces the GNAT chain of tools
in section 2.1, Running GNAT.

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

* Re: GNAT bug on macOS Sierra ?
  2016-11-23 19:15                 ` G.B.
@ 2016-11-24  3:40                   ` Dennis Lee Bieber
  0 siblings, 0 replies; 13+ messages in thread
From: Dennis Lee Bieber @ 2016-11-24  3:40 UTC (permalink / raw)


On Wed, 23 Nov 2016 20:15:05 +0100, "G.B." <bauhaus@futureapps.invalid>
declaimed the following:

>On 23.11.16 18:06, Dennis Lee Bieber wrote:
>> ln file1.o file2.o -llibx	#link to executable (name taken from first)
>
>ld(1), surely?
>
>The GNAT User's Guide introduces the GNAT chain of tools
>in section 2.1, Running GNAT.

	Mea culpa...

	No doubt it shows that I've not really used the piecemeal toolset... At
least I didn't use VMS "link"...
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


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

end of thread, other threads:[~2016-11-24  3:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 21:04 GNAT bug on macOS Sierra ? Vincent
2016-11-18 22:44 ` Simon Wright
2016-11-18 22:55   ` vincent.diemunsch
2016-11-21  8:35 ` briot.emmanuel
2016-11-21  9:17   ` Simon Wright
2016-11-21 21:28     ` Vincent
2016-11-22  8:28       ` Simon Wright
2016-11-22 22:47         ` Vincent
2016-11-23  8:46           ` Simon Wright
2016-11-23 15:53             ` Vincent
2016-11-23 17:06               ` Dennis Lee Bieber
2016-11-23 19:15                 ` G.B.
2016-11-24  3:40                   ` Dennis Lee Bieber

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