177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-10 Thread Ömer Sinan Ağacan
I'm trying to validate on a new system (not sure if related, but it has gcc
6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most (maybe
even
all) of them are similar to this one:

=> T5976(ext-interp) 1 of 1 [0, 0, 0]
cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output -XTemplateHaskell
-package template-haskell -fexternal-interpreter -v0
Actual stderr output differs from expected:
--- ./th/T5976.run/T5976.stderr.normalised  2016-11-10
23:01:39.351997560 -0500
+++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
23:01:39.351997560 -0500
@@ -1,7 +1,4 @@
-
-T5976.hs:1:1:
-Exception when trying to run compile-time code:
-  bar
-CallStack (from HasCallStack):
-  error, called at T5976.hs:: in :Main
-Code: error ((++) "foo " error "bar")
+ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not
found while reading filename f
+(GHC version 8.1.20161107 for x86_64_unknown_linux)
+Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
+ghc: ghc-iserv terminated (-6)
*** unexpected failure for T5976(ext-interp)

Does anyone know what is this about?
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-10 Thread Ben Gamari
Ömer Sinan Ağacan  writes:

> I'm trying to validate on a new system (not sure if related, but it has gcc
> 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most (maybe
> even
> all) of them are similar to this one:

Hmm, I have a rather similar setup and yet I haven't seen this locally.
I'm not sure what's going on here but the filename cited in the error
message looks quite odd. I wonder if this is due to normalization by the
testsuite driver or some other issue.

Cheers,

- Ben



signature.asc
Description: PGP signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-10 Thread Reid Barton
On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
 wrote:
> I'm trying to validate on a new system (not sure if related, but it has gcc
> 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most (maybe
> even
> all) of them are similar to this one:
>
> => T5976(ext-interp) 1 of 1 [0, 0, 0]
> cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
> spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output -XTemplateHaskell
> -package template-haskell -fexternal-interpreter -v0
> Actual stderr output differs from expected:
> --- ./th/T5976.run/T5976.stderr.normalised  2016-11-10
> 23:01:39.351997560 -0500
> +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
> 23:01:39.351997560 -0500
> @@ -1,7 +1,4 @@
> -
> -T5976.hs:1:1:
> -Exception when trying to run compile-time code:
> -  bar
> -CallStack (from HasCallStack):
> -  error, called at T5976.hs:: in :Main
> -Code: error ((++) "foo " error "bar")
> +ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not
> found while reading filename f

Did this line get truncated? It might help to have the rest of it.

Regards,
Reid Barton
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Ömer Sinan Ağacan
Ah, sorry, that line was truncated. I posted the output here:
https://gist.githubusercontent.com/osa1/ea72655b8369099e84a67e0949adca7e/raw/9e72cbfb859cb839f1898af39a46ff0896237d15/gistfile1.txt

That line should be

+ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not
found while reading filename from
`/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
+(GHC version 8.1.20161107 for x86_64_unknown_linux)
+Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug


2016-11-11 0:52 GMT-05:00 Reid Barton :

> On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
>  wrote:
> > I'm trying to validate on a new system (not sure if related, but it has
> gcc
> > 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most (maybe
> > even
> > all) of them are similar to this one:
> >
> > => T5976(ext-interp) 1 of 1 [0, 0, 0]
> > cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
> > spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output -XTemplateHaskell
> > -package template-haskell -fexternal-interpreter -v0
> > Actual stderr output differs from expected:
> > --- ./th/T5976.run/T5976.stderr.normalised  2016-11-10
> > 23:01:39.351997560 -0500
> > +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
> > 23:01:39.351997560 -0500
> > @@ -1,7 +1,4 @@
> > -
> > -T5976.hs:1:1:
> > -Exception when trying to run compile-time code:
> > -  bar
> > -CallStack (from HasCallStack):
> > -  error, called at T5976.hs:: in :Main
> > -Code: error ((++) "foo " error "bar")
> > +ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not
> > found while reading filename f
>
> Did this line get truncated? It might help to have the rest of it.
>
> Regards,
> Reid Barton
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Sylvain Henry
It seems like we don't bypass the special filename "/" (symbol lookup 
table) in rts/Linker.c


https://en.wikipedia.org/wiki/Ar_(Unix)#System_V_.28or_GNU.29_variant


On 11/11/2016 16:49, Ömer Sinan Ağacan wrote:
Ah, sorry, that line was truncated. I posted the output here: 
https://gist.githubusercontent.com/osa1/ea72655b8369099e84a67e0949adca7e/raw/9e72cbfb859cb839f1898af39a46ff0896237d15/gistfile1.txt 



That line should be
+ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not found 
while reading filename from 
`/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
+(GHC version 8.1.20161107 for x86_64_unknown_linux)
+Please report this as a GHC bug:http://www.haskell.org/ghc/reportabug

2016-11-11 0:52 GMT-05:00 Reid Barton >:


On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
mailto:omeraga...@gmail.com>> wrote:
> I'm trying to validate on a new system (not sure if related, but
it has gcc
> 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures,
most (maybe
> even
> all) of them are similar to this one:
>
> => T5976(ext-interp) 1 of 1 [0, 0, 0]
> cd "./th/T5976.run" && "/home/omer/haskell/ghc/inplace/test
> spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output
-XTemplateHaskell
> -package template-haskell -fexternal-interpreter -v0
> Actual stderr output differs from expected:
> --- ./th/T5976.run/T5976.stderr.normalised 2016-11-10
> 23:01:39.351997560 -0500
> +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
> 23:01:39.351997560 -0500
> @@ -1,7 +1,4 @@
> -
> -T5976.hs:1:1:
> -Exception when trying to run compile-time code:
> -  bar
> -CallStack (from HasCallStack):
> -  error, called at T5976.hs:: in
:Main
> -Code: error ((++) "foo " error "bar")
> +ghc-iserv.bin: internal loadArchive: GNU-variant filename
offset not
> found while reading filename f

Did this line get truncated? It might help to have the rest of it.

Regards,
Reid Barton




___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Sylvain Henry

My bad, in fact we do.

Could you try with the attached patch? It shows the failing filename in 
the archive.



On 11/11/2016 17:18, Sylvain Henry wrote:


It seems like we don't bypass the special filename "/" (symbol lookup 
table) in rts/Linker.c


https://en.wikipedia.org/wiki/Ar_(Unix)#System_V_.28or_GNU.29_variant


On 11/11/2016 16:49, Ömer Sinan Ağacan wrote:
Ah, sorry, that line was truncated. I posted the output here: 
https://gist.githubusercontent.com/osa1/ea72655b8369099e84a67e0949adca7e/raw/9e72cbfb859cb839f1898af39a46ff0896237d15/gistfile1.txt 



That line should be
+ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not found 
while reading filename from 
`/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
+(GHC version 8.1.20161107 for x86_64_unknown_linux)
+Please report this as a GHC bug:http://www.haskell.org/ghc/reportabug

2016-11-11 0:52 GMT-05:00 Reid Barton >:


On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
mailto:omeraga...@gmail.com>> wrote:
> I'm trying to validate on a new system (not sure if related,
but it has gcc
> 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures,
most (maybe
> even
> all) of them are similar to this one:
>
> => T5976(ext-interp) 1 of 1 [0, 0, 0]
> cd "./th/T5976.run" && "/home/omer/haskell/ghc/inplace/test
> spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output
-XTemplateHaskell
> -package template-haskell -fexternal-interpreter -v0
> Actual stderr output differs from expected:
> --- ./th/T5976.run/T5976.stderr.normalised 2016-11-10
> 23:01:39.351997560 -0500
> +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
> 23:01:39.351997560 -0500
> @@ -1,7 +1,4 @@
> -
> -T5976.hs:1:1:
> -Exception when trying to run compile-time code:
> -  bar
> -CallStack (from HasCallStack):
> -  error, called at T5976.hs:: in
:Main
> -Code: error ((++) "foo " error "bar")
> +ghc-iserv.bin: internal loadArchive: GNU-variant filename
offset not
> found while reading filename f

Did this line get truncated? It might help to have the rest of it.

Regards,
Reid Barton




___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs




___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


>From c3b4e28627b3e8a81d19648463280b3954bb518e Mon Sep 17 00:00:00 2001
From: Sylvain HENRY 
Date: Fri, 11 Nov 2016 17:37:12 +0100
Subject: [PATCH] Show failing filename

---
 rts/Linker.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index e46fc05..3a8fd53 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1540,7 +1540,10 @@ static HsInt loadArchive_ (pathchar *path)
 thisFileNameSize = 0;
 }
 else {
-barf("loadArchive: GNU-variant filename offset not found while reading filename from `%s'", path);
+char tmp[17];
+strncpy(tmp,fileName,16);
+tmp[16] = '\0';
+barf("loadArchive: invalid GNU-variant filename `%s' found while reading `%s'", tmp, path);
 }
 }
 /* Finally, the case where the filename field actually contains
-- 
2.10.2

___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Ömer Sinan Ağacan
So I just tried validating on another system:

> ghc git:(master) $ uname -a
Linux linux-enrr.suse 4.1.34-33-default #1 SMP PREEMPT Thu Oct 20 08:03:29
UTC 2016 (fe18aba) x86_64 x86_64 x86_64 GNU/Linux

> ghc git:(master) $ gcc --version
gcc (SUSE Linux) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> ghc git:(master) $ ld --version
GNU ld (GNU Binutils; openSUSE Leap 42.1) 2.26.1
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later
version.
This program has absolutely no warranty.

It validated without any errors. So I can't reproduce it right now. I'll try
the patch sometime later today when I have the other laptop with me.

Sylvain, do you have any ideas on what difference may be causing this? I'm
pasting gcc and ld versions but I'm not sure if they're relevant at all.

2016-11-11 11:55 GMT-05:00 Sylvain Henry :
> My bad, in fact we do.
>
> Could you try with the attached patch? It shows the failing filename in the
> archive.
>
>
> On 11/11/2016 17:18, Sylvain Henry wrote:
>
> It seems like we don't bypass the special filename "/" (symbol lookup table)
> in rts/Linker.c
>
> https://en.wikipedia.org/wiki/Ar_(Unix)#System_V_.28or_GNU.29_variant
>
>
> On 11/11/2016 16:49, Ömer Sinan Ağacan wrote:
>
> Ah, sorry, that line was truncated. I posted the output here:
> https://gist.githubusercontent.com/osa1/ea72655b8369099e84a67e0949adca7e/raw/9e72cbfb859cb839f1898af39a46ff0896237d15/gistfile1.txt
>
> That line should be
>
> +ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not found
> while reading filename from
> `/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
> +(GHC version 8.1.20161107 for x86_64_unknown_linux)
> +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>
>
> 2016-11-11 0:52 GMT-05:00 Reid Barton :
>>
>> On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
>>  wrote:
>> > I'm trying to validate on a new system (not sure if related, but it has
>> > gcc
>> > 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most
>> > (maybe
>> > even
>> > all) of them are similar to this one:
>> >
>> > => T5976(ext-interp) 1 of 1 [0, 0, 0]
>> > cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
>> > spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output -XTemplateHaskell
>> > -package template-haskell -fexternal-interpreter -v0
>> > Actual stderr output differs from expected:
>> > --- ./th/T5976.run/T5976.stderr.normalised  2016-11-10
>> > 23:01:39.351997560 -0500
>> > +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
>> > 23:01:39.351997560 -0500
>> > @@ -1,7 +1,4 @@
>> > -
>> > -T5976.hs:1:1:
>> > -Exception when trying to run compile-time code:
>> > -  bar
>> > -CallStack (from HasCallStack):
>> > -  error, called at T5976.hs:: in :Main
>> > -Code: error ((++) "foo " error "bar")
>> > +ghc-iserv.bin: internal loadArchive: GNU-variant filename offset
>> > not
>> > found while reading filename f
>>
>> Did this line get truncated? It might help to have the rest of it.
>>
>> Regards,
>> Reid Barton
>
>
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Ömer Sinan Ağacan
Sylvain, I tried your patch, here's the output:


cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
spaces/ghc-stage2" -c T5976.hs -dcore-lint -dcmm-lint
-no-user-package-db -rtsopts -fno-warn-missed-specialisations
-fshow-warning-groups -dno-debug-output -XTemplateHaskell -package
template-haskell -fexternal-interpreter -v0
Actual stderr output differs from expected:
--- ./th/T5976.run/T5976.stderr.normalised  2016-11-11
16:22:02.247761214 -0500
+++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-11
16:22:02.247761214 -0500
@@ -1,7 +1,4 @@
-
-T5976.hs:1:1:
-Exception when trying to run compile-time code:
-  bar
-CallStack (from HasCallStack):
-  error, called at T5976.hs:: in :Main
-Code: error ((++) "foo " error "bar")
+ghc-iserv.bin: internal loadArchive: invalid GNU-variant filename
`/SYM64/ ' found while reading
`/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
+(GHC version 8.1.20161107 for x86_64_unknown_linux)
+Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
+ghc: ghc-iserv terminated (-6)
*** unexpected failure for T5976(ext-interp)

Unexpected results from:
TEST="T5976"

2016-11-11 12:02 GMT-05:00 Ömer Sinan Ağacan :
> So I just tried validating on another system:
>
> > ghc git:(master) $ uname -a
> Linux linux-enrr.suse 4.1.34-33-default #1 SMP PREEMPT Thu Oct 20 08:03:29
> UTC 2016 (fe18aba) x86_64 x86_64 x86_64 GNU/Linux
>
> > ghc git:(master) $ gcc --version
> gcc (SUSE Linux) 4.8.5
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
> PURPOSE.
>
> > ghc git:(master) $ ld --version
> GNU ld (GNU Binutils; openSUSE Leap 42.1) 2.26.1
> Copyright (C) 2015 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) a later
> version.
> This program has absolutely no warranty.
>
> It validated without any errors. So I can't reproduce it right now. I'll try
> the patch sometime later today when I have the other laptop with me.
>
> Sylvain, do you have any ideas on what difference may be causing this? I'm
> pasting gcc and ld versions but I'm not sure if they're relevant at all.
>
> 2016-11-11 11:55 GMT-05:00 Sylvain Henry :
>> My bad, in fact we do.
>>
>> Could you try with the attached patch? It shows the failing filename in the
>> archive.
>>
>>
>> On 11/11/2016 17:18, Sylvain Henry wrote:
>>
>> It seems like we don't bypass the special filename "/" (symbol lookup table)
>> in rts/Linker.c
>>
>> https://en.wikipedia.org/wiki/Ar_(Unix)#System_V_.28or_GNU.29_variant
>>
>>
>> On 11/11/2016 16:49, Ömer Sinan Ağacan wrote:
>>
>> Ah, sorry, that line was truncated. I posted the output here:
>> https://gist.githubusercontent.com/osa1/ea72655b8369099e84a67e0949adca7e/raw/9e72cbfb859cb839f1898af39a46ff0896237d15/gistfile1.txt
>>
>> That line should be
>>
>> +ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not found
>> while reading filename from
>> `/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
>> +(GHC version 8.1.20161107 for x86_64_unknown_linux)
>> +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>>
>>
>> 2016-11-11 0:52 GMT-05:00 Reid Barton :
>>>
>>> On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
>>>  wrote:
>>> > I'm trying to validate on a new system (not sure if related, but it has
>>> > gcc
>>> > 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most
>>> > (maybe
>>> > even
>>> > all) of them are similar to this one:
>>> >
>>> > => T5976(ext-interp) 1 of 1 [0, 0, 0]
>>> > cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
>>> > spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output -XTemplateHaskell
>>> > -package template-haskell -fexternal-interpreter -v0
>>> > Actual stderr output differs from expected:
>>> > --- ./th/T5976.run/T5976.stderr.normalised  2016-11-10
>>> > 23:01:39.351997560 -0500
>>> > +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
>>> > 23:01:39.351997560 -0500
>>> > @@ -1,7 +1,4 @@
>>> > -
>>> > -T5976.hs:1:1:
>>> > -Exception when trying to run compile-time code:
>>> > -  bar
>>> > -CallStack (from HasCallStack):
>>> > -  error, called at T5976.hs:: in :Main
>>> > -Code: error ((++) "foo " error "bar")
>>> > +ghc-iserv.bin: internal loadArchive: GNU-variant filename offset
>>> > not
>>> > found while reading filename f
>>>
>>> Did this line get truncated? It might help to have the rest of it.
>>>
>>> Regards,
>>> Reid Barton
>>
>>
>>
>>
>> _

Re: 177 unexpected test failures on a new system -- is this yet another linker issue?

2016-11-11 Thread Sylvain Henry
Ok so it seems to be a 64-bit symbol table (according to 
https://docs.oracle.com/cd/E53394_01/html/E54772/ar-3head.html):
> A 64-bit archive symbol table sets ar_name to the string “/SYM64/”, 
padded with 9 blank characters to the right."


We should skip it. I will make a patch.

Thanks for the report!

Sylvain


On 11/11/2016 22:26, Ömer Sinan Ağacan wrote:

Sylvain, I tried your patch, here's the output:


 cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
spaces/ghc-stage2" -c T5976.hs -dcore-lint -dcmm-lint
-no-user-package-db -rtsopts -fno-warn-missed-specialisations
-fshow-warning-groups -dno-debug-output -XTemplateHaskell -package
template-haskell -fexternal-interpreter -v0
 Actual stderr output differs from expected:
 --- ./th/T5976.run/T5976.stderr.normalised  2016-11-11
16:22:02.247761214 -0500
 +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-11
16:22:02.247761214 -0500
 @@ -1,7 +1,4 @@
 -
 -T5976.hs:1:1:
 -Exception when trying to run compile-time code:
 -  bar
 -CallStack (from HasCallStack):
 -  error, called at T5976.hs:: in :Main
 -Code: error ((++) "foo " error "bar")
 +ghc-iserv.bin: internal loadArchive: invalid GNU-variant filename
`/SYM64/ ' found while reading
`/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
 +(GHC version 8.1.20161107 for x86_64_unknown_linux)
 +Please report this as a GHC bug:  
http://www.haskell.org/ghc/reportabug
 +ghc: ghc-iserv terminated (-6)
 *** unexpected failure for T5976(ext-interp)

 Unexpected results from:
 TEST="T5976"

2016-11-11 12:02 GMT-05:00 Ömer Sinan Ağacan :

So I just tried validating on another system:

 > ghc git:(master) $ uname -a
 Linux linux-enrr.suse 4.1.34-33-default #1 SMP PREEMPT Thu Oct 20 08:03:29
 UTC 2016 (fe18aba) x86_64 x86_64 x86_64 GNU/Linux

 > ghc git:(master) $ gcc --version
 gcc (SUSE Linux) 4.8.5
 Copyright (C) 2015 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 > ghc git:(master) $ ld --version
 GNU ld (GNU Binutils; openSUSE Leap 42.1) 2.26.1
 Copyright (C) 2015 Free Software Foundation, Inc.
 This program is free software; you may redistribute it under the terms of
 the GNU General Public License version 3 or (at your option) a later
 version.
 This program has absolutely no warranty.

It validated without any errors. So I can't reproduce it right now. I'll try
the patch sometime later today when I have the other laptop with me.

Sylvain, do you have any ideas on what difference may be causing this? I'm
pasting gcc and ld versions but I'm not sure if they're relevant at all.

2016-11-11 11:55 GMT-05:00 Sylvain Henry :

My bad, in fact we do.

Could you try with the attached patch? It shows the failing filename in the
archive.


On 11/11/2016 17:18, Sylvain Henry wrote:

It seems like we don't bypass the special filename "/" (symbol lookup table)
in rts/Linker.c

https://en.wikipedia.org/wiki/Ar_(Unix)#System_V_.28or_GNU.29_variant


On 11/11/2016 16:49, Ömer Sinan Ağacan wrote:

Ah, sorry, that line was truncated. I posted the output here:
https://gist.githubusercontent.com/osa1/ea72655b8369099e84a67e0949adca7e/raw/9e72cbfb859cb839f1898af39a46ff0896237d15/gistfile1.txt

That line should be

+ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not found
while reading filename from
`/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
+(GHC version 8.1.20161107 for x86_64_unknown_linux)
+Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug


2016-11-11 0:52 GMT-05:00 Reid Barton :

On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
 wrote:

I'm trying to validate on a new system (not sure if related, but it has
gcc
6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures, most
(maybe
even
all) of them are similar to this one:

 => T5976(ext-interp) 1 of 1 [0, 0, 0]
 cd "./th/T5976.run" &&  "/home/omer/haskell/ghc/inplace/test
spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output -XTemplateHaskell
-package template-haskell -fexternal-interpreter -v0
 Actual stderr output differs from expected:
 --- ./th/T5976.run/T5976.stderr.normalised  2016-11-10
23:01:39.351997560 -0500
 +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
23:01:39.351997560 -0500
 @@ -1,7 +1,4 @@
 -
 -T5976.hs:1:1:
 -Exception when trying to run compile-time code:
 -  bar
 -CallStack (from HasCallStack):
 -  error, called at T5976.hs:: in :Main
 -Code: error ((++) "foo " error "bar")
 +ghc-iserv.bin: internal loadArchive: GNU-variant filename offset
not
found while reading filename f

Did this line get truncated? It might help to hav