天嵌 ARM开发社区

 找回密码
 注册
查看: 1584|回复: 3

交叉编译配置出错

[复制链接]
freepig 发表于 2010-10-29 16:24:49 | 显示全部楼层 |阅读模式
按教程的要求,
1、修改/etc/profile,内容如下
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

patihmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
           else
              PATH=$1:$PATH
           fi
        fi
}

# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
        EUID=`id -u`
        UID=`id -ru`
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
        pathmunge /opt/EmbedSky/4.3.3/bin
fi

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

if [ -x /usr/bin/id ]; then
        USER="`id -un`"
        LOGNAME=$USER
        MAIL="/var/spool/mail/$USER"
fi

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        if [ "$PS1" ]; then
            . $i
        else
            . $i >/dev/null 2>&1
        fi
    fi
done

unset i
unset pathmunge
2、source /etc/profile,出错
bash:pathmunge:command not found
bash:pathmunge:command not found
bash:pathmunge:command not found
bash:pathmunge:command not found
3、查检交叉编译器的路径:/opt/EmbedSky/4.3.3,无误
4.怀疑是不是系统有关,我的系统是Red Hat Enterprise Linux 5.
求解!
天嵌_support1 发表于 2010-10-30 10:51:43 | 显示全部楼层
1# freepig


网友呀。
你打开终端,输入下面的语句:

export PATH=/opt/EmbedSky/4.3.3/bin:$PATH

那你照样可以在这个终端中编译的想编译的代码了啊。
不要把事情弄得那么复杂哟。
你或许会说这样麻烦,但我觉得这样可以随意利用任何版本的编译器。
只要想用,打开另一个终端,export 一下另一个路劲,OK了。
tom7232 发表于 2011-1-26 23:06:35 | 显示全部楼层
讓我有學到喔~~謝謝
embedsky_lhh 发表于 2011-1-27 09:45:29 | 显示全部楼层
:)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-5 18:24 , Processed in 1.032266 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表