बीगलबोर्ड के लिए क्रॉस लिनक्स से स्क्रैच (सीएलएफएस) के लिए जीसीसी क्रॉस कंपाइलर का निर्माण कैसे करें?


10

वर्तमान में मैं स्क्रैच से क्रॉस लिनक्स के निर्देशों के साथ खरोंच से एक एम्बेडेड लिनक्स बनाने की कोशिश करता हूं ।

जब तक मैंने जीसीसी क्रॉस-कंपाइलर को संकलित करने की कोशिश की तब तक सब कुछ ठीक रहा। मैं बीगलबोर्ड-एक्सएम के लिए लिनक्स का निर्माण करना चाहता हूं ... इसलिए मैंने निम्नलिखित सेटिंग्स का चयन किया:

export CLFS_ABI="aapcs-linux"
export CLFS_HOST="x86_64-cross-linux-gnu"
export CLFS_TARGET="armv7a-unknown-linux-uclibceabi"
export CLFS_ARCH="arm"
export CLFS_ENDIAN="little"
export CLFS_ARM_ARCH="armv7"
export CLFS_ARM_MODE="arm"
export CLFS_FLOAT="hard"
export CLFS_FPU="neon"

जैसे ही मैं इस पृष्ठ पर दिए गए निर्देशों को चलाने का प्रयास करता हूं , कमांड make all-gcc all-target-libgccएक त्रुटि में चलता है।

checking for armv7a-unknown-linux-uclibceabi-gcc...  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include   
checking for suffix of object files... configure: error: in `/mnt/clfs/sources/gcc-build/armv7a-unknown-linux-uclibceabi/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make: *** [configure-target-libgcc] Error 1

और /mnt/clfs/sources/gcc-build/armv7a-unknown-linux-uclibceabi/libgcc/config.logइस तरह दिखता है:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ /mnt/clfs/sources/gcc-4.6.0/libgcc/configure --cache-file=./config.cache --with-cross-host=x86_64-cross-linux-gnu --prefix=/mnt/clfs/cross-tools --with-sysroot=/mnt/clfs --disable-nls --disable-shared --without-headers --with-newlib --disable-decimal-float --disable-libgomp --disable-libmudflap --disable-libssp --disable-threads --disable-multilib --with-abi=aapcs-linux --with-arch=armv7 --with-mode=arm --with-float=hard --with-fpu=neon --enable-languages=c,lto --program-transform-name=s&^&armv7a-unknown-linux-uclibceabi-& --disable-option-checking --with-target-subdir=armv7a-unknown-linux-uclibceabi --build=x86_64-cross-linux-gnu --host=armv7a-unknown-linux-uclibceabi --target=armv7a-unknown-linux-uclibceabi --srcdir=../../../gcc-4.6.0/libgcc

## --------- ##
## Platform. ##
## --------- ##

hostname = virtualUbuntu
uname -m = x86_64
uname -r = 3.2.0-31-generic
uname -s = Linux
uname -v = #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /mnt/clfs/cross-tools/bin
PATH: /bin
PATH: /usr/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1742: creating cache ./config.cache
configure:1903: checking for --enable-version-specific-runtime-libs
configure:1916: result: no
configure:1964: checking for a BSD-compatible install
configure:2032: result: /usr/bin/install -c
configure:2048: checking for gawk
configure:2075: result: gawk
configure:2095: checking build system type
configure:2109: result: x86_64-cross-linux-gnu
configure:2129: checking host system type
configure:2142: result: armv7a-unknown-linux-uclibceabi
configure:2245: checking for armv7a-unknown-linux-uclibceabi-ar
configure:2272: result: /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ar
configure:2337: checking for armv7a-unknown-linux-uclibceabi-lipo
configure:2364: result: armv7a-unknown-linux-uclibceabi-lipo
configure:2429: checking for armv7a-unknown-linux-uclibceabi-nm
configure:2456: result: /mnt/clfs/sources/gcc-build/./gcc/nm
configure:2521: checking for armv7a-unknown-linux-uclibceabi-ranlib
configure:2548: result: /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ranlib
configure:2613: checking for armv7a-unknown-linux-uclibceabi-strip
configure:2640: result: /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/strip
configure:2702: checking whether ln -s works
configure:2706: result: yes
configure:2723: checking for armv7a-unknown-linux-uclibceabi-gcc
configure:2750: result:  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include   
configure:3019: checking for C compiler version
configure:3028:  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include    --version >&5
xgcc (GCC) 4.6.0
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3039: $? = 0
configure:3028:  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include    -v >&5
Reading specs from /mnt/clfs/sources/gcc-build/./gcc/specs
COLLECT_GCC=/mnt/clfs/sources/gcc-build/./gcc/xgcc
COLLECT_LTO_WRAPPER=/mnt/clfs/sources/gcc-build/./gcc/lto-wrapper
Target: armv7a-unknown-linux-uclibceabi
Configured with: ../gcc-4.6.0/configure --prefix=/mnt/clfs/cross-tools --build=x86_64-cross-linux-gnu --host=x86_64-cross-linux-gnu --target=armv7a-unknown-linux-uclibceabi --with-sysroot=/mnt/clfs --disable-nls --disable-shared --with-mpfr=/mnt/clfs/cross-tools --with-gmp=/mnt/clfs/cross-tools --with-mpc=/mnt/clfs/cross-tools --without-headers --with-newlib --disable-decimal-float --disable-libgomp --disable-libmudflap --disable-libssp --disable-threads --enable-languages=c --disable-multilib --with-abi=aapcs-linux --with-arch=armv7 --with-mode=arm --with-float=hard --with-fpu=neon
Thread model: single
gcc version 4.6.0 (GCC) 
configure:3039: $? = 0
configure:3028:  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include    -V >&5
xgcc: error: unrecognized option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3039: $? = 1
configure:3028:  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include    -qversion >&5
xgcc: error: unrecognized option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3039: $? = 1
configure:3055:  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include    -o conftest -g -O2   conftest.c  >&5
conftest.c:1:0: error: target CPU does not support ARM mode
configure:3058: $? = 1
configure:3246: checking for suffix of object files
configure:3268:  /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include    -c -g -O2  conftest.c >&5
conftest.c:1:0: error: target CPU does not support ARM mode
configure:3272: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3286: error: in `/mnt/clfs/sources/gcc-build/armv7a-unknown-linux-uclibceabi/libgcc':
configure:3289: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-cross-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value=' /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include   '
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-g -O2'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-cross-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=armv7a-unknown-linux-uclibceabi
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=armv7a-unknown-linux-uclibceabi
ac_cv_host=armv7a-unknown-linux-uclibceabi
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AR=/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=' /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include   '
ac_cv_prog_LIPO=armv7a-unknown-linux-uclibceabi-lipo
ac_cv_prog_NM=/mnt/clfs/sources/gcc-build/./gcc/nm
ac_cv_prog_RANLIB=/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ranlib
ac_cv_prog_STRIP=/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/strip

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ar'
AWK='gawk'
CC=' /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include   '
CFLAGS='-g -O2'
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIPO='armv7a-unknown-linux-uclibceabi-lipo'
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
NM='/mnt/clfs/sources/gcc-build/./gcc/nm'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='GNU C Runtime Library'
PACKAGE_STRING='GNU C Runtime Library 1.0'
PACKAGE_TARNAME='libgcc'
PACKAGE_URL='http://www.gnu.org/software/libgcc/'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
RANLIB='/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ranlib'
SHELL='/bin/bash'
STRIP='/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/strip'
ac_ct_CC=''
asm_hidden_op=''
bindir='${exec_prefix}/bin'
build='x86_64-cross-linux-gnu'
build_alias='x86_64-cross-linux-gnu'
build_cpu='x86_64'
build_libsubdir='build-x86_64-cross-linux-gnu'
build_os='linux-gnu'
build_subdir='build-x86_64-cross-linux-gnu'
build_vendor='cross'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
decimal_float=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
enable_decimal_float='no'
enable_shared='no'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
host='armv7a-unknown-linux-uclibceabi'
host_alias='armv7a-unknown-linux-uclibceabi'
host_cpu='armv7a'
host_noncanonical='armv7a-unknown-linux-uclibceabi'
host_os='linux-uclibceabi'
host_subdir='.'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='../../../gcc-4.6.0/libgcc/..'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/mnt/clfs/cross-tools'
program_transform_name='s&^&armv7a-unknown-linux-uclibceabi-&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
set_use_emutls=''
sharedstatedir='${prefix}/com'
slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
sysconfdir='${prefix}/etc'
target_alias='armv7a-unknown-linux-uclibceabi'
target_noncanonical='armv7a-unknown-linux-uclibceabi'
target_subdir='armv7a-unknown-linux-uclibceabi'
tmake_file=''
toolexecdir='$(exec_prefix)/$(target_noncanonical)'
toolexeclibdir='$(toolexecdir)/lib'
vis_hide=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "GNU C Runtime Library"
#define PACKAGE_TARNAME "libgcc"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "GNU C Runtime Library 1.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL "http://www.gnu.org/software/libgcc/"

configure: exit 1

मैं क्या खो रहा हूँ?


CLFS_ARCH="thumb"कोई बेहतर काम करता है? मुझे नहीं पता कि हाथ काम क्यों नहीं करेंगे, AFAIK uClibc दोनों का समर्थन करता है।
गिल्स एसओ- बुराई को रोकें '

हां, जैसे ही मैं CLFS_ARCH को अंगूठे में बदलता हूं यह ठीक काम करता है ... लेकिन क्या हाथ का उपयोग करने का कोई तरीका है?
पास्कल

configure:3039: $? = 0 configure:3028: /mnt/clfs/sources/gcc-build/./gcc/xgcc -B/mnt/clfs/sources/gcc-build/./gcc/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/bin/ -B/mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/lib/ -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/include -isystem /mnt/clfs/cross-tools/armv7a-unknown-linux-uclibceabi/sys-include -V >&5 xgcc: error: unrecognized option '-V' xgcc: fatal error: no input files compilation terminated.इसे देखें : यह xgcc संस्करण को खोजने की कोशिश करता है -V, लेकिन मेरे ubuntu केवल -vकाम करता है पर ...
पास्कल

CLFS के बजाय बिल्डरो का उपयोग करने पर विचार करें क्योंकि यह स्रोत से पूरी तरह से स्वचालित है, और बहुत व्यापक रूप से उपयोग किया जाता है और विश्वसनीय है। या अध्ययन करें कि बिल्डरोट क्या कर रहा है, और इसे कॉपी करें।
सिरो सेंटिल्ली 冠状 病毒 iro i 法轮功 '

जवाबों:


3

त्रुटियों के निर्माण चर के गलत संयोजन से होने की संभावना है।

CLFS चर बनाएँ पेज विभिन्न आर्किटेक्चर के लिए चर सेटिंग का सबसे अच्छा संयोजन के बारे में विस्तृत व्याख्या है।

वैसा ही कॉन्फ़िगर स्क्रिप्ट समस्याओं को CLFS_ARCHचर को बदलकर हल किया गया हैthumb

एक और समान बीगलबोर्ड के लिए स्क्रिप्ट त्रुटि को कॉन्फ़िगर करने के लिए, चर का निम्नलिखित सेट चाल करता है:ARMv7-A Thumb-2 - Little-Endian, Soft-Float, GLIBC

यदि आप CLFS 1.xx का उपयोग कर रहे हैं , तो अद्यतन दस्तावेज के साथ, क्लीनर बिल्ड दृष्टिकोण के लिए CLFS 2.xx का उपयोग करने पर विचार करें

सीएलएफएस मुद्दों पर चर्चा करने के लिए सबसे अच्छी जगह क्लॉफ-सपोर्ट मेलिंग सूची में है , आगे के अंतर्दृष्टि के लिए अपना प्रश्न पूछने का प्रयास करें।

हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.