MIPS32 toolchain on Cygwin

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello!

I'm trying to build a toolchain for our MIP32 4Kc platform on Cygwin
environment. I'm following directions from the book "Building Embedded
Linux Systems" from Karim Yaghmour.

I use:
CYGWIN_NT-5.1 1.5.19(0.150/4/2)
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
binutils-2.14.90.0.6
gcc-3.3.4
glibc-2.3.1

I managed to crosscompile the binutils, made glibc headers, build
boot-gcc. Now I'm trying to build glibc and having big difficulties. I
can't get rid of the error while compiling glibc-2.3.1/iconv part. I
get the following error:

make[2]: Entering directory
`/toolchain/incaip/build-tools/glibc-2.3.1/iconv'
mips-linux-gcc -nostdlib -nostartfiles -o
/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfi
g  -Wl,-dynamic-linker=/lib/ld.so.1
/toolchain/incaip/build-tools/build-glibc/csu/crt1.o /toolcha
in/incaip/build-tools/build-glibc/csu/crti.o `mips-linux-gcc
--print-file-name=crtbegin.o` /toolchai
n/incaip/build-tools/build-glibc/iconv/iconvconfig.o
/toolchain/incaip/build-tools/build-glibc/iconv
/strtab.o /toolchain/incaip/build-tools/build-glibc/iconv/xmalloc.o
-Wl,-rpath-link=/toolchain/inca
ip/build-tools/build-glibc:/toolchain/incaip/build-tools/build-glibc/math:/toolchain/incaip/build-to
ols/build-glibc/elf:/toolchain/incaip/build-tools/build-glibc/dlfcn:/toolchain/incaip/build-tools/bu
ild-glibc/nss:/toolchain/incaip/build-tools/build-glibc/nis:/toolchain/incaip/build-tools/build-glib
c/rt:/toolchain/incaip/build-tools/build-glibc/resolv:/toolchain/incaip/build-tools/build-glibc/cryp
t:/toolchain/incaip/build-tools/build-glibc/linuxthreads
/toolchain/incaip/build-tools/build-glibc/l
ibc.so.6 /toolchain/incaip/build-tools/build-glibc/libc_nonshared.a
-lgcc `mips-linux-gcc --print-fi
le-name=crtend.o` /toolchain/incaip/build-tools/build-glibc/csu/crtn.o
/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfig.o(.text+0x11b0):
In function `add_module
':
../stdlib/stdlib.h:317: undefined reference to `__strtol_internal'
/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfig.o(.text+0x2030):
In function `name_to_mo
dule_idx':
/toolchain/incaip/build-tools/glibc-2.3.1/iconv/iconvconfig.c:829:
undefined reference to `abort'
/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfig.o(.text+0x2fec):
In function `write_outp
ut':
/toolchain/incaip/build-tools/glibc-2.3.1/iconv/iconvconfig.c:1199:
undefined reference to `close'
/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfig.o(.text+0x3004):/toolchain/incaip/build-
tools/glibc-2.3.1/iconv/iconvconfig.c:1200: undefined reference to
`unlink'
/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfig.o(.text+0x3064):/toolchain/incaip/build-
tools/glibc-2.3.1/iconv/iconvconfig.c:1205: undefined reference to
`close'
/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfig.o(.text+0x30b8):/toolchain/incaip/build-
tools/glibc-2.3.1/iconv/iconvconfig.c:1208: undefined reference to
`fchmod'
/toolchain/incaip/build-tools/build-glibc/iconv/strtab.o(.text+0x188):
In function `morememory':
/toolchain/incaip/build-tools/glibc-2.3.1/iconv/strtab.c:120: undefined
reference to `abort'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__dup'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___open64'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_cmp'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___strtol_internal'

/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__getcwd'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___strtod_internal'

/toolchain/incaip/build-tools/build-glibc/elf/ld.so.1: undefined
reference to `elf_machine_rela'
/toolchain/incaip/build-tools/build-glibc/elf/ld.so.1: undefined
reference to `__read'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__unlink'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_lshift'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_qsort'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_mul'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_submul_1'
/toolchain/incaip/build-tools/build-glibc/elf/ld.so.1: undefined
reference to `__open'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_construct_float'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___libc_fcntl'
/toolchain/incaip/build-tools/build-glibc/elf/ld.so.1: undefined
reference to `__libc_read'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__xstat64'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___fcntl'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_divrem'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___read'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___xstat64'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__lxstat'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_lrand48_r'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_construct_double'

/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__chmod'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_exit'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__isatty'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_bsearch'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___libc_write'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___open'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___strtold_internal
'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `_fpioconst_pow10'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__chdir'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_getenv'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___strtoull_interna
l'
/toolchain/incaip/build-tools/build-glibc/elf/ld.so.1: undefined
reference to `__readlink'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_extract_double'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__cxa_atexit_internal'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mkdir'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__cxa_atexit'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___strtoll_internal
'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_add_n'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__statvfs64'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___pipe'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___secure_getenv'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__syscall_exit_group'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___chown'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__random_r'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__initstate_r'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_abort'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___write'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__xmknod'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__lseek'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_rshift'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___dup2'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__srand48_r'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__tens'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___fxstat64'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__lxstat64'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_utime'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__ttyname_r'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__rmdir'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___strtoul_internal
'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__fstatfs'
/toolchain/incaip/build-tools/build-glibc/elf/ld.so.1: undefined
reference to `__close'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__fxstat64'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__mpn_mul_1'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___close'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__xstat'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___libc_open'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_____strtod_l_inter
nal'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__fxstat'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___lxstat64'
/toolchain/incaip/build-tools/build-glibc/elf/ld.so.1: undefined
reference to `__libc_write'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI_wctomb'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__setenv'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__access'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___poll'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___statfs'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__unsetenv'
/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__GI___strtof_internal'

/toolchain/incaip/build-tools/build-glibc/libc.so.6: undefined
reference to `__fstatvfs64'
collect2: ld returned 1 exit status
make[2]: ***
[/toolchain/incaip/build-tools/build-glibc/iconv/iconvconfig] Error 1
make[2]: Leaving directory
`/toolchain/incaip/build-tools/glibc-2.3.1/iconv'
make[1]: *** [iconv/others] Error 2
make[1]: Leaving directory `/toolchain/incaip/build-tools/glibc-2.3.1'
make: *** [all] Error 2


What am I doing wrong? Is there some known error with gcc? Is there
some patch? Please help me because I'm stuck I already googled
everywhere, bu I cant find the solution.

Best regards,
Marko Kukovec


Re: MIPS32 toolchain on Cygwin
Quoted text here. Click to load it

 I've just built cross toolchains on Cygwin with Buildroot:
http://buildroot.uclibc.org /

 Try it!

--
-=AV=-


Site Timeline