logo       

[ ghc-Bugs-1038001 ] Invalid opcode on AIX: msg#00004

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-1038001 ] Invalid opcode on AIX

Bugs item #1038001, was opened at 2004-09-30 14:53
Message generated for change (Comment added) made by jgoerzen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1038001&group_id=8032

Category: Build System
Group: 6.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: John Goerzen (jgoerzen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Invalid opcode on AIX

Initial Comment:
Hello,

I am bootscrapping ghc 6.2.1 on AIX5.1L (PowerPC).
This is an unregisterised bootstrap process.

I have gotten as far as building ghc from the .hc files
on the AIX machine. However, the build fails here:

creating libgmp.la
(cd .libs && rm -f libgmp.la && ln -s ../libgmp.la
libgmp.la)
gmake[4]: Leaving directory
`/home/jgoerzen/programs/unreg/ghc-6.2.1/ghc/rts/gmp'
gmake[3]: Leaving directory
`/home/jgoerzen/programs/unreg/ghc-6.2.1/ghc/rts/gmp'
gcc -O -DNO_REGS -DUSE_MINIINTERPRETER
-I/home/jgoerzen/programs/unreg/ghc-6.2.1/ghc/includes
-I/home/jgoerzen/programs/unreg/ghc-6.2.1/libraries/base/include
-I/home/jgoerzen/programs/unreg/ghc-6.2.1/libraries/unix/include
-I/home/jgoerzen/programs/unreg/ghc-6.2.1/libraries/parsec/include
-Wall -W -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Winline -Waggregate-return
-Wbad-function-cast -I../includes -I. -Iparallel
-DCOMPILING_RTS -fomit-frame-pointer -c Adjustor.c
-o Adjustor.o
/tmp//cczRmrqA.s: Assembler messages:
/tmp//cczRmrqA.s:86: Error: Unrecognized opcode:
`dcbf'
/tmp//cczRmrqA.s:88: Error: Unrecognized opcode:
`icbi'
gmake[1]: *** [Adjustor.o] Error 1
gmake: *** [all] Error 1
gmake: Leaving directory
`/home/jgoerzen/programs/unreg/ghc-6.2.1/ghc'

I do not know PowerPC assembly so I'm afraid I'm
useless on this one. However, if I add -mpowerpc to
the gcc command line, it works.

Along similar lines, gmp's build fails with hosts of
opcode-related errors. But if I change the
ghc/rts/Makefile like this (bootorig is original; boot is
new), it works:

bootorig ::
cd gmp && CC=$(WhatGccIsCalled) ./configure
--enable-shared=no \
--host=`echo $(HOSTPLATFORM) | sed
's/i[567]86/i486/g'`

boot ::
cd gmp && ./configure --enable-shared=no

Something about --host seems to be confusing gmp.


----------------------------------------------------------------------

>Comment By: John Goerzen (jgoerzen)
Date: 2004-10-01 22:27

Message:
Logged In: YES
user_id=491567

Yes, you are correct. I worked around it using a gcc
wrapper that I have documented here:

http://gopher.quux.org:70/devel/AIX/ghc/secrets.txt

BTW, I have a built source tree and binary dist available at
http://quux.org/devel/AIX/ghc if you are interested.

----------------------------------------------------------------------

Comment By: Wolfgang Thaller (wthaller)
Date: 2004-09-30 21:38

Message:
Logged In: YES
user_id=566359

Adding -mpowerpc to the compiler options seems to be the right thing to
do to fix Adjustor.c. I assume that as on AIX only accepts code that is
compatible with the old (pre-PowerPC) POWER architecture by default
unless you specify -mpowerpc.
The relevant inline assembler instructions in Adjustor.c are concerned
with cache flushing and are absolutely for PowerPC chips. All PowerPC
chips support those instructions.


----------------------------------------------------------------------

Comment By: John Goerzen (jgoerzen)
Date: 2004-09-30 17:00

Message:
Logged In: YES
user_id=491567

I've gotten a little farther by now -- after running this
command from the hc-build script:

$MAKE -C ghc/rts boot && $MAKE-C ghc/rts all

I now see:

copying ./mpn/generic/sb_divrem_mn.c to
mpn/sb_divrem_mn.c
copying ./mpn/generic/jacbase.c to mpn/jacbase.c
copying ./mpn/powerpc32/gmp-mparam.h to gmp-mparam.h
gcc -E -undef -traditional -P -I../includes -x c
package.conf.in | \
sed -e 's/""//g' -e 's/\[ *,/[ /g' >package.conf.inplace
gcc -E -undef -traditional -P -I../includes -DINSTALLING -x
c package.conf.in| \
sed -e 's/""//g' -e 's/\[ *,/[ /g' >package.conf.installed
../utils/ghc-pkg/ghc-pkg-inplace --update-package
<package.conf.inplace
ghc-pkg.bin: internal error: stg_ap_v_ret
Please report this as a bug to
glasgow-haskell-bugs@xxxxxxxxxxx,
or http://www.sourceforge.net/projects/ghc/
gmake: *** [../driver/stamp-pkg-conf-rts] Error 254



----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1038001&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise