x157123 发表于 2013-11-11 20:32

弄了一天了 还是没安装好oprofile 我只是想学C的 linux不是很懂

安装oprofile错误

checking for C compiler default output file name...
configure: error: in `/home/xujia/Downloads/oprofile-0.9.8':
configure: error: C compiler cannot create executables
See `config.log' for more details.



================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 configure, which was
generated by GNU Autoconf 2.63.Invocation command line was

$ ./configure --with-kernel-support

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

hostname = xujia-Rev-1-0
uname -m = i686
uname -r = 3.5.0-41-generic
uname -s = Linux
uname -v = #64~precise1-Ubuntu SMP Thu Sep 12 17:01:55 UTC 2013

/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: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


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

configure:2175: checking for a BSD-compatible install
configure:2243: result: /usr/bin/install -c
configure:2254: checking whether build environment is sane
configure:2314: result: yes
configure:2455: checking for a thread-safe mkdir -p
configure:2494: result: /bin/mkdir -p
configure:2507: checking for gawk
configure:2537: result: no
configure:2507: checking for mawk
configure:2523: found /usr/bin/mawk
configure:2534: result: mawk
configure:2545: checking whether make sets $(MAKE)
configure:2567: result: yes
configure:2664: checking for style of include used by make
configure:2692: result: GNU
configure:2762: checking for gcc
configure:2778: found /usr/bin/gcc
configure:2789: result: gcc
configure:3021: checking for C compiler version
configure:3029: gcc --version >&5
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
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:3033: $? = 0
configure:3040: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configure:3044: $? = 0
configure:3051: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3055: $? = 4
configure:3078: checking for C compiler default output file name
configure:3100: gcc    conftest.c>&5
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: ld returned 1 exit status
configure:3104: $? = 1
configure:3142: result:
configure: failed program was:
| /* confdefs.h.*/
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "oprofile"
| #define VERSION "0.9.8"
| /* end confdefs.h.*/
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3148: error: in `/home/xujia/Downloads/oprofile-0.9.8':
configure:3151: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=set
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_QT_CFLAGS_set=
ac_cv_env_QT_CFLAGS_value=
ac_cv_env_QT_LIBS_set=
ac_cv_env_QT_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes

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

ACLOCAL='${SHELL} /home/xujia/Downloads/oprofile-0.9.8/missing --run aclocal-1.11'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/xujia/Downloads/oprofile-0.9.8/missing --run tar'
AR=''
AUTOCONF='${SHELL} /home/xujia/Downloads/oprofile-0.9.8/missing --run autoconf'
AUTOHEADER='${SHELL} /home/xujia/Downloads/oprofile-0.9.8/missing --run autoheader'
AUTOMAKE='${SHELL} /home/xujia/Downloads/oprofile-0.9.8/missing --run automake-1.11'
AWK='mawk'
BFD_LIBS=''
BUILD_FOR_PERF_EVENT_FALSE=''
BUILD_FOR_PERF_EVENT_TRUE=''
BUILD_JVMPI_AGENT_FALSE=''
BUILD_JVMPI_AGENT_TRUE=''
BUILD_JVMTI_AGENT_FALSE=''
BUILD_JVMTI_AGENT_TRUE=''
CAT_ENTRY_END=''
CAT_ENTRY_START=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CHECK_ACCOUNT_FALSE=''
CHECK_ACCOUNT_TRUE=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DATE=''
DEFS=''
DEPDIR='.deps'
DOCBOOK_ROOT=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXTRA_CFLAGS_MODULE=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
JAVA_HOMEDIR=''
LD=''
LDFLAGS=''
LIBERTY_LIBS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/xujia/Downloads/oprofile-0.9.8/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
MOC=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OP_CFLAGS=''
OP_CPPFLAGS=''
OP_CXXFLAGS=''
OP_DOCDIR=''
OP_LDFLAGS=''
OTOOL64=''
OTOOL=''
PACKAGE='oprofile'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PERF_EVENT_FLAGS=''
PFM_LIB=''
PKG_CONFIG=''
POPT_LIBS=''
PTRDIFF_T_TYPE=''
QT_CFLAGS=''
QT_INCLUDES=''
QT_LDFLAGS=''
QT_LIB=''
QT_LIBS=''
QT_VERSION=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
SIZE_T_TYPE=''
STRIP=''
UIC=''
UIChelp=''
VERSION='0.9.8'
XMKMF=''
XML_CATALOG=''
XSLTPROC=''
XSLTPROC_FLAGS=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
have_qt_FALSE=''
have_qt_TRUE=''
have_xsltproc_FALSE=''
have_xsltproc_TRUE=''
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/xujia/Downloads/oprofile-0.9.8/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
topdir=''

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

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "oprofile"
#define VERSION "0.9.8"

configure: exit 77

x157123 发表于 2013-11-11 21:06

小弟真心没辙了

fly3ds 发表于 2013-11-11 23:18

本帖最后由 fly3ds 于 2013-11-11 23:20 编辑

唉 我当年搞Linux也是搞到真心没辙跳进了一个又一个大坑 爬不出来, 祝福一下吧。

还是建议搞点Java Python MySQL什么的吧,似乎也能找到工作,混口饭吃,说不定混得还更好。

MMMIX 发表于 2013-11-12 10:02

回复 1# x157123


    你真的应该学下 Linux 该怎么用。像安装 oprofile 这种工具,你就应该用系统的包管理工具安装,而不是自己编译。

BTW,不明白“包管理工具”是什么,就先通过 Google 学习下。

MMMIX 发表于 2013-11-12 10:05

x157123 发表于 2013-11-11 20:32 static/image/common/back.gif
安装oprofile错误
/usr/local/bin/ld: this linker was not configured to use sysroots


ld 怎么还在 /usr/local/bin 下,Binutils 不会也是你自己编译的吧?

x157123 发表于 2013-11-12 21:31

对啊安装的时候说缺少liberty文件 然后网上查了半天然后就下载了自己编译    之后发现gcc都不能使用了   从装gcc都无效   刚刚重装了回复 5# MMMIX


   

x157123 发表于 2013-11-12 22:35

现在没那个兴趣我有点想往嵌入式方面学习以前搞android的发现没啥意思现在在补习c中顺便在熟悉下linux回复 3# fly3ds


   

MMMIX 发表于 2013-11-13 09:31

回复 6# x157123


    像工具链之类的底层工具,没有特殊需要还是不要自己编译的好,很容易弄错,平白浪费大量时间。最好是用包管理器安装。

现在你最好是把自己编译的工具链(GCC,Binutils)删除,然后使用包管理器重新安装。如果系统已经被搞的过于混乱,那就重装吧。

fly3ds 发表于 2013-11-13 11:43

回复 1# x157123


我看你的输出,一大堆的unknow,有点像是权限不够,很多命令执行得不到结果的意思。

x157123 发表于 2013-11-13 18:39

谢谢我刚刚接触linux 还不知道不过我用的都是root权限 。回复 9# fly3ds


   
页: [1] 2
查看完整版本: 弄了一天了 还是没安装好oprofile 我只是想学C的 linux不是很懂