Ticket #470 (closed bug: invalid)

Opened 3 years ago

Last modified 2 years ago

build fails on Linux/sparc (genprimopcode: parse error at)

Reported by: arekm Assigned to: nobody
Priority: normal Milestone: 6.4.2
Component: Compiler Version: 6.4.1
Severity: normal Keywords:
Cc: Difficulty: Unknown
Test Case: Architecture: sparc
Operating System: Linux

Description (Last modified by simonmar)

Build fails when building ghc 6.4.x (tested 6.4 and 6.4.1) on Linux/
sparc and using ghc 6.4 binaries for bootstrap:

mkdir stage1/ndpFlatten
mkdir stage1/iface
mkdir stage1/cmm
mkdir stage1/ghci
Creating main/Config.hs ...
done.
Creating stage1/ghc_boot_platform.h...
Done.
sparc-pld-linux-gcc -E  -undef -traditional -P -I../includes    -x c 
prelude/primops.txt.pp | \
grep -v '^#pragma GCC' > prelude/primops.txt
../utils/genprimopcode/genprimopcode --data-decl          < prelude/
primops.txt > primop-data-decl.hs-incl
genprimopcode: parse error at (line 579, column 1):
unexpected "\t"
expecting "primop", "section" or "thats_all_folks"
make[2]: *** [primop-data-decl.hs-incl] Error 1
make[2]: *** Deleting file `primop-data-decl.hs-incl'
make[1]: *** [boot] Error 1
make[1]: Leaving directory `/home/users/builder/rpm/BUILD/ghc-6.
4.1/ghc'

The same problem doesn't exists when using ghc 6.2.x for 
bootstrapping (generated primops.txt is the same in both cases, 
tested via md5sum). Problem doesn't exists on other arch like x86, 
ppc, amd64,  too.

Attachments

primops.txt.2.gz (10.9 kB) - added by arekm on 10/19/05 02:37:01.
Test.tar.2.gz (7.8 kB) - added by arekm on 11/01/05 11:44:59.

Change History

10/19/05 02:25:58 changed by simonmar

Logged In: YES 
user_id=48280

perhaps there's something odd about your gcc.  Can you
upload a copy of primiops.txt?  (it'll be in
ghc/compiler/prelude).

10/19/05 02:37:01 changed by arekm

  • attachment primops.txt.2.gz added.

10/19/05 02:37:01 changed by arekm

  • status changed from assigned to closed.

10/19/05 02:48:32 changed by arekm

Logged In: YES 
user_id=139606

File attached.

11/01/05 11:20:46 changed by nobody

Logged In: NO 

isSpace doesn't work correctly

[builder@fiskus ~]$ cat Test.hs
import Char
main = print (isSpace '\t')
[builder@fiskus ~]$ ghc Test.hs -o Test && ./Test
False
[builder@fiskus ~]$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.4.1

more complete test:
[builder@fiskus ~]$ ghc Test.hs -o Test && ./Test
[True,False,True,True,False,True]
[builder@fiskus ~]$ cat Test.hs
import Char; main = print (map isSpace " \t\n\r\f\v")


11/01/05 11:28:47 changed by nobody

Logged In: NO 

More

[builder@fiskus ~]$ cat Test.hs
isSpaceTest c               =  c == ' '     ||
                           c == '\t'    ||
                           c == '\n'    ||
                           c == '\r'    ||
                           c == '\f'    ||
                           c == '\v'    ||
                           c == '\xa0'

main = print (map isSpaceTest " \t\n\r\f\v")

[builder@fiskus ~]$ ghc Test.hs -o Test && ./Test
[True,True,True,True,True,True]
[builder@fiskus ~]$ rm -f Test.hi Test.o
[builder@fiskus ~]$ ghc -O2 Test.hs -o Test && ./Test
[True,False,True,True,False,True]


11/01/05 11:44:54 changed by arekm

Logged In: YES 
user_id=139606



11/01/05 11:44:59 changed by arekm

  • attachment Test.tar.2.gz added.

11/01/05 11:44:59 changed by arekm

  • status changed from assigned to closed.

12/08/05 07:03:38 changed by simonmar

  • os set to Linux.
  • description changed.
  • architecture set to sparc.

03/01/06 04:25:29 changed by simonmar

  • difficulty set to Unknown.
  • milestone set to 6.4.2.

03/15/06 08:16:31 changed by simonmar

  • status changed from assigned to closed.
  • resolution changed from None to invalid.

Not a GHC bug (probably). It was later discovered that gcc 4.0 works correctly for this example, but 3.3.6 fails.

http://www.haskell.org//pipermail/glasgow-haskell-users/2006-March/009766.html