Re: Syntax error: word unexpected (expecting ")" ) when cross compiling

Mikael Pettersson <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
Du Felix writes:
 > Hi everyone.
 >       I did a cross compiling with the command:
 >       ./configure --host=arm-linux-gnueabif
 >       Duiring compilation, I got such error:
 > 
 >  === Entering application hipe
 > make[3]: Entering directory `/home/dmy/App/otp_src_17.0/lib/hipe/misc'
 >  ERLC ../ebin/hipe_consttab.beam
 > /home/dmy/App/otp_src_17.0/bootstrap/bin/erlc: 1:
 > /home/dmy/App/otp_src_17.0/bootstrap/bin/erlc: Syntax error: word
 > unexpected (expecting ")")
 > make[3]: *** [../ebin/hipe_consttab.beam] Error 2
 > make[3]: Leaving directory `/home/dmy/App/otp_src_17.0/lib/hipe/misc'
 > make[2]: *** [opt] Error 2
 > make[2]: Leaving directory `/home/dmy/App/otp_src_17.0/lib/hipe'
 > make[1]: *** [opt] Error 2
 > make[1]: Leaving directory `/home/dmy/App/otp_src_17.0/lib'
 > make: *** [secondary_bootstrap_build] Error 2
 > 
 >     When I went to /home/dmy/App/otp_src_17.0/lib/hipe/ebin, I didn't
 > find hipe_consttab.beam.
 > 
 >     I could successfully compiled a x86 erlang on my linux mint, but
 > got that error while cross compling.

I cannot reproduce this error.  To cross-compile for ARM, I simply did:

0. Made sure a native otp-17.1 and a GNU cross toolchain to armv5tel-unknown-linux-gnueabi
   are in my PATH.  The native otp-17.1 is just to eliminate the bootstrap step one otherwise
   has to do (as per HOWTO/INSTALL-CROSS.md).
1. tar zxf otp_src_17.1.tar.gz
2. cd otp_src_17.1
3. ./configure --host=armv5tel-unknown-linux-gnueabi --build=x86_64-pc-linux-gnu --prefix=/tmp/otp-17 --without-termcap
4. make
5. make install

hipe_consttab is pure Erlang code and does get built even when HiPE is disabled.
Compiling it to BEAM should not fail.

Did you perhaps start with a source tree where a previous native build had been done?
I'd suggest trying again with a pristine source tree.
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.