uclibc supports cross-compiling ncurses?
Juan Lablanca
juan.lablanca at yacoub.de
Thu Sep 29 15:36:12 UTC 2005
Hi all,
Thank you Mike, that was an orden problem indeed. However I got stuck
again. I configured Buildroot as follows:
-Packet: ncurses
-Target Architecture: arm
-Target Processor type: generic arm
-Target Processor Endianess: Little Endian
-MMU: no
-Without Busybox
-Use software floating point by default
As compiler, i gotta use arm-elf-gcc (version 2.95.3 20010315) in order
to get "BFLT executable - version 4 ram" files which can be downloaded
and run on my target, arm microprocessor. First of all i compiled a
simple hello_world just to try whether including "ncurses.h" works, but
the next error pops up "undefined reference to `__fputc_unlocked'",
since there is a mess when the compiler looks for the header files
(according to http://www.uclibc.org/FAQ.html#miscompile ).
The makefile is:
************************************************************************
CROSSCOMPILE:= arm-elf-
CC := ${CROSSCOMPILE}gcc
LD := ${CROSSCOMPILE}gcc
RM := rm -f
SRC_DIR := ${PWD}/src
INC_DIR := ${PWD}/include
BUILD_DIR := ${PWD}/build
BIN_DIR := ${PWD}/bin
VPATH := ${SRC_DIR}:${BUILD_DIR}
MAKEFILE := ${PWD}/Makefile
DEP_FILE := ${PWD}/.depend
LIBS := -lform -lmenu -lncurses
UCLIBC :=
/targets/LxNETES/buildroot/toolchain_build_arm_nofpu/uClibc
INCLUDES := -g
-I/targets/LxNETES/buildroot/build_arm_nofpu/ncurses-5.4/include
STDFLAGS := -W -v -H -Wall -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -pipe -fno-builtin -DNO_MM -mapcs-32
-mtune=arm7tdmi -mshort-load-bytes -msoft-float -iwithprefix include
CFLAGS := ${STDFLAGS} ${DEFINES} ${INCLUDES}
LFLAGS := -v -Wall -Wl,-elf2flt
LFLAGS +=
-L/targets/LxNETES/buildroot/build_arm_nofpu/ncurses-5.4/lib
SRC_OBJS := hello_world.c
MOD_OBJS := ${SRC_OBJS:%.c=${BUILD_DIR}/%.o}
TARGET := ${BIN_DIR}/hello
all: ${TARGET}
${TARGET}: ${MOD_OBJS}
${LD} ${LFLAGS} $? -o ${TARGET} ${LIBS}
clean: ${MAKEFILE}
${RM} ${MOD_OBJS} ${TARGET}
dep: ${DEP_FILE}
${DEP_FILE}: ${SRC_OBJS}
${CC} -MM ${CFLAGS} $< > ${DEP_FILE}
${BUILD_DIR}/%.o: %.c ${MAKEFILE}
${CC} ${CFLAGS} -c $< -o $@
***************************************************************
I have tried different configurations such as:
1) Only including the path written above
2) With the option -nostdinc including the next path -I${UCLIBC}/include
3) And also with different paths for the ncurses .h
With all of them the output was pretty much the same. So it seems to
there be a conflict between the default paths where the compiler looks
for the .h files and the path/s where the ncurses .h files are. Could
somebody help me please? Thanx and regards,
Juanfran.
More information about the uClibc
mailing list