2014-01-30 5 views
2

Linux 13.10 "클라우드"/ 가상 서버에서 rJave/JRI (Java 응용 프로그램 내에서 R 명령을 실행할 수있게 해주는 코드)를 설치하려고합니다.Linux에서 C 코드를 컴파일 할 수 없습니다.

나는 그래서. 아무것도 찾을 수 없습니다 내가

* installing *source* package ‘rJava’ ... 
** package ‘rJava’ successfully unpacked and MD5 sums checked 
checking for gcc... gcc -std=gnu99 
checking whether the C compiler works... no 
configure: error: in `/tmp/RtmpW6xdRi/R.INSTALLbff775d77a6/rJava': 
configure: error: C compiler cannot create executables 
See `config.log' for more details 

불행하게도, 내가 config.log은 아무 생각이 없다 "수, R 내에서 install.packages ("rJava ")을 시도하고 find/-name "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 JRI configure 0.3, which was 
generated by GNU Autoconf 2.61. Invocation command line was 

    $ ./configure 

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

hostname = greg1304 
uname -m = x86_64 
uname -r = 3.8.0-33-generic 
uname -s = Linux 
uname -v = #48-Ubuntu SMP Wed Oct 23 09:16:58 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 
PATH: /home/gregd/bin 


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

configure:1722: checking build system type 
configure:1740: result: x86_64-unknown-linux-gnu 
configure:1762: checking host system type 
configure:1777: result: x86_64-unknown-linux-gnu 
configure:1910: checking for gcc 
configure:1937: result: gcc -std=gnu99 
configure:2175: checking for C compiler version 
configure:2182: gcc -std=gnu99 --version >&5 
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 
Copyright (C) 2012 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:2185: $? = 0 
configure:2192: gcc -std=gnu99 -v >&5 
Using built-in specs. 
COLLECT_GCC=gcc 
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper 
Target: x86_64-linux-gnu 
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-l 
anguages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --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.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --ena 
ble-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with 
-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 
Thread model: posix 
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) 
configure:2195: $? = 0 
configure:2202: gcc -std=gnu99 -V >&5 
gcc: error: unrecognized command line option '-V' 
gcc: fatal error: no input files 
compilation terminated. 
configure:2205: $? = 4 
configure:2228: checking for C compiler default output file name 
configure:2255: gcc -std=gnu99 -O2 -pipe -g conftest.c >&5 
/usr/bin/ld: cannot find crt1.o: No such file or directory 
/usr/bin/ld: cannot find crti.o: No such file or directory 
/usr/bin/ld: cannot find -lc 
/usr/bin/ld: cannot find crtn.o: No such file or directory 
collect2: error: ld returned 1 exit status 
configure:2258: $? = 1 
configure:2296: result: 
configure: failed program was: 
| /* confdefs.h. */ 
| #define PACKAGE_NAME "JRI" 
| #define PACKAGE_TARNAME "jri" 
| #define PACKAGE_VERSION "0.3" 
| #define PACKAGE_STRING "JRI 0.3" 
| #define PACKAGE_BUGREPORT "[email protected]" 
| /* end confdefs.h. */ 
| 
| int 
| main() 
| { 
| 
| ; 
| return 0; 
| } 
configure:2303: error: C compiler cannot create executables 
See `config.log' for more details. 

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

ac_cv_build=x86_64-unknown-linux-gnu 
ac_cv_env_CC_set= 
ac_cv_env_CC_value= 
ac_cv_env_CFLAGS_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_LDFLAGS_set= 
ac_cv_env_LDFLAGS_value= 
ac_cv_env_LIBS_set= 
ac_cv_env_LIBS_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_host=x86_64-unknown-linux-gnu 
ac_cv_prog_ac_ct_CC='gcc -std=gnu99' 

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

CC='gcc -std=gnu99' 
CFLAGS='-O2 -pipe -g' 
CPICF='' 
CPP='gcc -std=gnu99 -E' 
CPPFLAGS='' 
DEFFLAGS='' 
DEFS='' 
ECHO_C='' 
ECHO_N='-n' 
ECHO_T='' 
EGREP='' 
EXEEXT='' 
GREP='' 
JAR='' 
JAVAC='' 
JAVAH='' 
JAVA_CFLAGS='' 
JAVA_HOME='/usr/lib/jvm/java-6-openjdk' 
JAVA_INC='' 
JAVA_LD_PATH='' 
JAVA_LIBS='' 
JAVA_PROG='' 
JNILD='' 
JNIPREFIX='' 
JNISO='' 
LDFLAGS='' 
LIBOBJS='' 
LIBS='' 
LTLIBOBJS='' 
OBJEXT='' 
PACKAGE_BUGREPORT='[email protected]' 
PACKAGE_NAME='JRI' 
PACKAGE_STRING='JRI 0.3' 
PACKAGE_TARNAME='jri' 
PACKAGE_VERSION='0.3' 
PATH_SEPARATOR=':' 
RINC='-I/usr/share/R/include' 
RLD='-L/usr/lib/R/lib -lR' 
R_DOC_DIR='/usr/share/R/doc' 
R_HOME='/usr/lib/R' 
R_INCLUDE_DIR='/usr/share/R/include' 
R_SHARE_DIR='/usr/share/R/share' 
SHELL='/bin/bash' 
ac_ct_CC='gcc -std=gnu99' 
bindir='${exec_prefix}/bin' 
build='x86_64-unknown-linux-gnu' 
build_alias='' 
build_cpu='x86_64' 
build_os='linux-gnu' 
build_vendor='unknown' 
datadir='${datarootdir}' 
datarootdir='${prefix}/share' 
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 
dvidir='${docdir}' 
exec_prefix='NONE' 
host='x86_64-unknown-linux-gnu' 
host_alias='' 
host_cpu='x86_64' 
host_os='linux-gnu' 
host_vendor='unknown' 
htmldir='${docdir}' 
includedir='${prefix}/include' 
infodir='${datarootdir}/info' 
libdir='${exec_prefix}/lib' 
libexecdir='${exec_prefix}/libexec' 
localedir='${datarootdir}/locale' 
localstatedir='${prefix}/var' 
mandir='${datarootdir}/man' 
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='' 

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

#define PACKAGE_NAME "JRI" 
#define PACKAGE_TARNAME "jri" 
#define PACKAGE_VERSION "0.3" 
#define PACKAGE_STRING "JRI 0.3" 
#define PACKAGE_BUGREPORT "[email protected]" 

configure: exit 77 
:

checking build system type... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking for gcc... gcc -std=gnu99 
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables 
See `config.log' for more details. 

지금, 적어도, 나는 이것이 주시면 감사하겠습니다 실패 이유에 대한 어떤 설명 설정 로그를

+0

사실을 설치해야 우분투 16.04에, 그것도 나를 위해 존재하지 않습니다. 빌드 설정이 실제로 망가 졌거나 잘못된 환경 설정으로이 작업을 시도한 것입니다. (잘하면) ... – Veltas

+0

@Veltas는 configure 스크립트를 들여다 보았습니다. 코드를 올바르게 이해하면 그 이슈는 무해합니다. . – fvu

+1

@GregDougherty는 http://stackoverflow.com/questions/6329887/compiling-problems-cannot-find-crt1-o에서보세요 - 저는 crt1.o & co 파일 누락이 핵심 이슈라고 생각합니다. 시도 할 수있는 가능한 솔루션 및 해결 방법 몇 가지. 그러나 [GitHub] (https://github.com/s-u/rJava)의 rJava 버전은 귀하의 버전과 상당히 다르므로 합리적으로 최신 버전을 사용하고 있습니까? – fvu

답변

0

당신의 C 문제에 대해서는 잘 모르겠습니다 만, C++ 컴파일러가 그 플래그를 테스트하면 어디에도 갈 수 없을 것이라고 생각합니다. -std = gnu99는 C++에서는 유효하지 않다고 생각합니다. C, 그러므로 내 가정은 이미 다른 문제가있다.)

편집 : 의심 스럽지만 버전 관리 작업 (내 gcc는 4.8.1)인지 확실하지 않지만 64 비트 대상은 있지만 내가 볼 수있는 한 gcc 용 64 비트 라이브러리? 프로그램이 확인되면 아마 당신의 문제는 64 비트에 대한, 여기있다

--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 

컴파일 : 대한 나의 출력 GCC는-STD = gnu99 -v는 전체가 아닌 일부의이 아래쪽에 플래그의 몇 가지를 포함 실행 파일 (시스템이 x64_86 인 경우)

+0

그렉 그 잘못된 아키텍처에서 컴파일하는 말을하려고합니까? – Veltas

+0

@Veltas 제 제안은 rJava 코드가 64 비트 아치를 가져 오는 경우 64 비트 컴파일러를 시도 할 수 있지만 gcc의 64 비트 라이브러리가 포함되어 있음을 나타내는 플래그를 볼 수 없습니다. 그래서 나는 현재 컴파일하고있는 프로그램이 아니지만 그렇다고 생각합니다. – chrisb2244

+0

Launchpad의 변경 내역보기 : [https://launchpad.net/+search?field.text=4.7.2-2ubuntu1&field.actions.search=Search]에는 헤더와 관련된 여러 문제가 나열되어 있지만 그것이 소프트웨어 센터의 일부가되기 전에 문제를 해결 한 패치였습니까? @ 그렉, 특정 버전의 gcc가 필요하지 않으면 다른 버전을 사용해 볼 수 있습니까? 바이너리를 직접 컴파일하지 않고 설치 한 것처럼 보이므로 2 분 이상 걸리지 않을 것입니다. 맞습니까? – chrisb2244

0

그래서 13.04에서 13.10으로 업그레이드 했으므로 내 gcc가 4.7에서 4.8로 업그레이드되었습니다. 그래서 나는 다시 시도했고, 이번에는 모든 것이 효과가있었습니다.

그래서 gcc 4.7 버그라고 할 것입니다.

모든 도움에 감사드립니다. 참고로

0

: 당신 '으로 libc6-dev에'빌드가`-V` 플래그가 흥미 시도 할

관련 문제