tonyrog / otp-cross

Information about cross compilation of OTP
10 stars 1 forks source link

issue to compiles ncurses on latest ubuntu #2

Open benoitc opened 8 years ago

benoitc commented 8 years ago

you need to patch ncurses with the following patch to compile it with latest cross compiler:

--- ncurses-6.0-20150808+/ncurses/base/MKlib_gen.sh 2015-08-07 00:48:24.000000000 +0000
+++ ncurses-6.0-20150810/ncurses/base/MKlib_gen.sh  2015-08-10 08:56:39.000000000 +0000
@@ -2,7 +2,7 @@
 #
 # MKlib_gen.sh -- generate sources from curses.h macro definitions
 #
-# ($Id: MKlib_gen.sh,v 1.50 2015/08/07 00:48:24 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.51 2015/08/10 08:56:39 tom Exp $)
 #
 ##############################################################################
 # Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.                #
@@ -72,7 +72,7 @@
 # appears in gcc 5.0 and (with modification) in 5.1, making it necessary to
 # determine if we are using gcc, and if so, what version because the proposed
 # solution uses a nonstandard option.
-PRG=`echo "$1" | $AWK '{ sub(/^[[:space:]]*/,""); sub(/[[:space:]].*$/, ""); print; }' || exit 0`
+PRG=`echo "$1" | $AWK '{ sub(/^[   ]*/,""); sub(/[     ].*$/, ""); print; }' || exit 0`
 FSF=`"$PRG" --version 2>/dev/null || exit 0 | fgrep "Free Software Foundation" | head -n 1`
 ALL=`"$PRG" -dumpversion 2>/dev/null || exit 0`
 ONE=`echo "$ALL" | sed -e 's/\..*$//'`

if not you will get the following error:

../include/curses.h:1631:56: note: in definition of macro ‘mouse_trafo’  #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
tonyrog commented 8 years ago

Is that a problem in general or a problem with the latest arm-linux-gnueabi? We could probably add pages for various crosss compilers and operating systems when need arise. Lets say we add a page for arm-linux-gnueabi-gcc-5.0 describing this problem ?

benoitc commented 8 years ago

That's probably general to gcc 5.0 and mawk. But not sure about it, I can check

tonyrog commented 8 years ago

I created a page called "arm-linux-gnueabi-gcc-5.0.md" and pasted the patch there. Ok?

benoitc commented 8 years ago

+1 thanks! On Mon, 21 Mar 2016 at 12:58, Tony Rogvall notifications@github.com wrote:

I created a page called "arm-linux-gnueabi-gcc-5.0.md" and pasted the patch there. Ok?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tonyrog/otp-cross/issues/2#issuecomment-199241259