yasm linux gcc,yasm安装出现问题

在尝试配置yasm-0.7.2时遇到警告和错误,包括无法猜测系统类型和C编译器无法创建可执行文件。通过检查发现GCC编译器存在问题,未在环境变量中设置路径。解决方法是找到GCC的实际位置并添加到环境变量中,最终成功解决问题。
摘要由CSDN通过智能技术生成

执行[root@localhost yasm-0.7.2]# ./configure --enable-shared

--prefix=/usr/local/arm/4.3.2/arm-none-linux-gnueabi/

--host=arm-linux

出现以下问题:

configure: WARNING: If you wanted to set the --build type,

don't use --host.

If a cross compiler is

detected then cross compile mode will be used.

checking for a BSD-compatible install... /usr/bin/install

-c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for arm-linux-strip... arm-linux-strip

checking whether to enable maintainer-specific portions of

Makefiles... no

checking for style of include used by make... GNU

checking for arm-linux-gcc... arm-linux-gcc

checking for C compiler default output file name...

a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... yes

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether arm-linux-gcc accepts -g... yes

checking for arm-linux-gcc option to accept ISO C89... none

needed

checking dependency style of arm-linux-gcc... gcc3

checking how to run the C preprocessor... arm-linux-gcc

-E

checking for arm-linux-gcc option to accept ISO C99...

-std=gnu99

checking for arm-linux-gcc -std=gnu99 option to accept ISO

Standard C... (cached) -std=gnu99

checking for a BSD-compatible install... /usr/bin/install

-c

checking whether ln -s works... yes

checking for arm-linux-ranlib... arm-linux-ranlib

checking for xmlto... xmlto

checking if malloc debugging is wanted... no

checking for grep that handles long lines and -e...

/bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for strings.h... (cached) yes

checking libgen.h usability... yes

checking libgen.h presence... yes

checking for libgen.h... yes

checking for unistd.h... (cached) yes

checking direct.h usability... no

checking direct.h presence... no

checking for direct.h... no

checking for an ANSI C-conforming const... yes

checking for inline... inline

checking for function prototypes... yes

checking for size_t... yes

checking for stdint types... stdint.h (shortcircuit)

make use of stdint.h in libyasm-stdint.h (assuming C99

compatible system)

checking for abort... yes

checking for toascii... yes

checking for vsnprintf... yes

checking for strsep... yes

checking for mergesort... no

checking for getcwd... yes

checking for popen... yes

checking for strcasecmp... yes

checking for strncasecmp... yes

checking for stricmp... no

checking for _stricmp... no

checking for strcmpi... no

checking whether NLS is requested... yes

checking for msgfmt... /usr/bin/msgfmt

checking for gmsgfmt... /usr/bin/msgfmt

checking for xgettext... no

checking for msgmerge... /usr/bin/msgmerge

checking build system type... config/config.guess: unable to

guess system type

This script, last modified 2003-07-02, has failed to

recognize

the operating system you are using. It is advised that

you

download the most up to date version of the config scripts

from

ftp://ftp.gnu.org/pub/gnu/config/

If the version you run (config/config.guess) is already up to

date, please

send the following data and any information you think might

be

pertinent to in order to provide the needed

information to handle your system.

config.guess timestamp = 2003-07-02

uname -m = i686

uname -r = 2.4.20-8

uname -s = Linux

uname -v = #1 Thu Mar 13 17:54:28 EST 2003

/usr/bin/uname -p =

/bin/uname -X  =

hostinfo  =

/bin/universe  =

/usr/bin/arch -k  =

/bin/arch  = i686

/usr/bin/oslevel  =

/usr/convex/getsysinfo =

UNAME_MACHINE = i686

UNAME_RELEASE = 2.4.20-8

UNAME_SYSTEM  = Linux

UNAME_VERSION = #1 Thu Mar 13 17:54:28 EST 2003

configure: error: cannot guess build type; you must specify

one

执行命令:./configure

checking for a BSD-compatible install... /usr/bin/install

-c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether to enable maintainer-specific portions of

Makefiles... no

checking for style of include used by make... GNU

checking for gcc... gcc

checking for C compiler default output file name...

configure: error: C compiler cannot create executables

See `config.log' for more details.

解决方法:

1.自己用写一个c文件去测试gcc是否出现问题

编译的时候出现了:

gcc: error trying to exec 'cc1': execvp: No such file or

directory

原来gcc编译器真的出现了问题:

然后用whereis

gcc找到gcc所在的位置\usr\bin,再去看一下环境变量,发现里面没有gcc的环境变量的设置

然后加了进去,问题解决了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值