Discussion:
_nc_get_table error while cross compiling ncurses-5.4 for arm
Juan Lablanca
2005-10-10 15:15:16 UTC
Permalink
Hi,

I am trying to cross compile ncurses-5.4 with the compiler arm-elf-gcc(arm-elf-tools-20030314).Although the last week i was able to make it, somehow something happened and now i can not get rid of the following error (by compiling):

../ncurses/comp_captab.c: In function `_nc_get_table':
../ncurses/comp_captab.c:74: `_nc_cap_table' undeclared (first use in this function)
../ncurses/comp_captab.c:74: (Each undeclared identifier is reported only once
../ncurses/comp_captab.c:74: for each function it appears in.)
../ncurses/comp_captab.c:74: `_nc_info_table' undeclared (first use in this function)
make[1]: *** [../obj_s/comp_captab.o]

I guess it must be something wrong with an include path or the terminfo setting, and despite i
have shuffled the different STDFLAGS, INCLUDES and paths for TERMINFO
(please see the attached my-config.sh) and included another options such as: --with-build-cc=gcc\ it remains not working . I have also applied a patch for that version (patch-5.4-20050827.sh), but it did not work, it gave me another error by linking (something about segmentation fault) Could anybody give me a hand please?

Thanx in advance and regards,

Juanfran
Frank van Vugt
2005-10-10 21:41:48 UTC
Permalink
Hi,

Here's what I'm using:

CC=arm-sa1100-linux-gnu-gcc CXX=arm-sa1100-linux-gnu-g++ \
./configure --host=i686-pc-linux --target=arm-sa1100-linux \
--without-ada --without-progs --without-gpm --without-sysmouse \
--with-build-cc=gcc --enable-widec --with-terminfo-dirs=/etc/terminfo \
--prefix=$FOXI_INSTALL \

Followed by your make, make install.libs, whatever.

Mind you, you need the latest tarball, apply the latest rollup patch and any
additional patches you want (since you started patching, you probably want
all available ones ;) ).

See also ftp://invisible-island.net/ncurses/5.4/README.

Good luck.
--
Best,




Frank.
Juan Lablanca
2005-10-12 13:13:16 UTC
Permalink
Hi again,

I have not been patching out-of-order indeed, so firstly i used ncurses-5.4-20040424-patch.sh.bz2 <ftp://invisible-island.net/ncurses/5.4/ncurses-5.4-20040424-patch.sh.bz2> and then i tried to use the other patches in order (but they were not applied). Anyway i could finally run 'make' successfully and the test programs also run on the arm target. Thank you very much for your help, now i can worry about compiling and running my application successfully.

Best regards,

Juan.
Hi Juan,
Thank you Frank for your quick answer, very kind!
No problem, but next time please cc the list as well, so that other people who
might be interested stay up2date too ;)
Unfortunately it still is not working. I applied the last rollup patch
(patch-5.4-20050827.sh) and besides all the patches between 20050827 till
20051008 (from ftp://invisible-island.net/ncurses/5.4/). However not all the
hunks from every patch were applied, for example this is a part of the
***********************
This file doesn't appear to be the 1.927 version -- patch anyway? [n] y
<cut>
I am not sure whether that is normal or i did something wrong...
Each patch checks whether or not it is applied to an up2date installation
(i.e. an installation that has all the earlier patches applied). This looks
like you've been patching out-of-order. You definitely *don't* want to do
that......
--with-terminfo-dirs=/usr/share/terminfo
This shouldn't make any difference as far as succesfull compiling/linking is
concerned.
***********************
/usr/local/arm-elf/bin/ld: line 139: 16731 Segmentation fault $LINKER
-r -d -o $OFILE.elf2flt $ARG1
collect2: ld returned 139 exit status
make[1]: *** [background] Error 1
make[1]: Leaving directory
`/home/juan/Desktop/Downloads/uClinux-dist/ncurses-5.4/test'
make: *** [all] Fehler 2
***********************
If your linker is segfaulting, I'd be looking into the linker itself first,
before doubting ncurses. You're not using gcc 2.96, are you.....? If you are
(and given the error it looks a bit like you do), you could try to either
downgrade to 2.95.3 or upgrade. I'm using gcc-4.0.1-glibc-2.3.2 myself. You
could build that toolchain by downloading this (~3.7MB):

http://kegel.com/crosstool/crosstool-0.38.tar.gz

Unpack it and add the two files attached to the directory. Fiddle with the
base path in aml-arm.sh if you want to and simply start the script.

Everything will be built in the crosstool-0.38 directory which will end up
having a size of ~1.7 GB in size.





-- Best, Frank.

Thank you Frank for your quick answer, very kind! Unfortunately it still
is not working. I applied the last rollup patch (patch-5.4-20050827.sh)
and besides all the patches between 20050827 till 20051008 (from
ftp://invisible-island.net/ncurses/5.4/). However not all the hunks from
every patch were applied, for example this is a part of the output after
running patch -p1 < ncurses-5.4-20051008.patch:

***********************
This file doesn't appear to be the 1.927 version -- patch anyway? [n] y
patching file NEWS
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 6.
2 out of 2 hunks FAILED -- saving rejects to file NEWS.rej
***********************
I am not sure whether that is normal or i did something wrong...

Regarding to the configure file, I have just added the next line:
--with-terminfo-dirs=/usr/share/terminfo\

the rest remained the same as the attached file of my first mail. And
the error after running make was:

***********************
/usr/local/arm-elf/bin/ld: line 139: 16731 Segmentation fault $LINKER
-r -d -o $OFILE.elf2flt $ARG1
collect2: ld returned 139 exit status
make[1]: *** [background] Error 1
make[1]: Leaving directory
`/home/juan/Desktop/Downloads/uClinux-dist/ncurses-5.4/test'
make: *** [all] Fehler 2
***********************

Any ideas? I would be thankful for a further help.

Best regards,

Juanfran.

Loading...