簡體   English   中英

錯誤:在 Ubuntu 12.04 上安裝 pygsl 時,“gcc ...”失敗,退出狀態為 1

[英]error: "gcc ... " failed with exit status 1 when I install pygsl on Ubuntu 12.04

當我運行“python setup.py build”時,錯誤如下,gsl版本是gsl_1.16 pygsl版本是pygsl-2.3.0

testing/src/sf/sf__data.c: At top level:

testing/src/sf/sf__data.c:3010:53: error: ‘gsl_sf_mathieu_a_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3024:53: error: ‘gsl_sf_mathieu_b_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[0]’)

testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[1]’)

testing/src/sf/sf__data.c:3038:54: error: ‘gsl_sf_mathieu_ce_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[0]’)

testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[1]’)

testing/src/sf/sf__data.c:3052:54: error: ‘gsl_sf_mathieu_se_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[0]’)

testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[1]’)

testing/src/sf/sf__data.c:3066:54: error: ‘gsl_sf_mathieu_Mc_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[0]’)

testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[1]’)

testing/src/sf/sf__data.c:3080:54: error: ‘gsl_sf_mathieu_Ms_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[0]’)

testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[1]’)

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D’:

testing/src/sf/sfmodule_testing.c:124:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D_as_ff_F’:

testing/src/sf/sfmodule_testing.c:141:59: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd’:

testing/src/sf/sfmodule_testing.c:162:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd_as_F_ff’:

testing/src/sf/sfmodule_testing.c:184:76: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

testing/src/sf/sfmodule_testing.c: In function ‘_pygsl_sf_long_to_unsigned_int’:

testing/src/sf/sfmodule_testing.c:67:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Wformat]

testing/src/sf/sfmodule_testing.c:67:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘long unsigned int’ [-Wformat]

testing/src/sf/sfmodule_testing.c:68:2: warning: too many arguments for format [-Wformat-extra-args]

testing/src/sf/sfmodule_testing.c:79:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘unsigned int’ [-Wformat]
In file included from testing/src/sf/sfmodule_testing.c:104:0:

testing/src/sf/sf__data.c: At top level:

testing/src/sf/sf__data.c:3010:53: error: ‘gsl_sf_mathieu_a_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3024:53: error: ‘gsl_sf_mathieu_b_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[0]’)

testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[1]’)

testing/src/sf/sf__data.c:3038:54: error: ‘gsl_sf_mathieu_ce_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[0]’)

testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[1]’)

testing/src/sf/sf__data.c:3052:54: error: ‘gsl_sf_mathieu_se_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[0]’)

testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[1]’)

testing/src/sf/sf__data.c:3066:54: error: ‘gsl_sf_mathieu_Mc_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[0]’)

testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[1]’)

testing/src/sf/sf__data.c:3080:54: error: ‘gsl_sf_mathieu_Ms_e’ undeclared here (not in a function)

testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[0]’)

testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant

testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[1]’)

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D’:

testing/src/sf/sfmodule_testing.c:124:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D_as_ff_F’:

testing/src/sf/sfmodule_testing.c:141:59: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd’:

testing/src/sf/sfmodule_testing.c:162:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd_as_F_ff’:

testing/src/sf/sfmodule_testing.c:184:76: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG_COBJECT_TYPES=1 -DDEBUG=1 -DPyGSL_SET_GSL_ERROR_HANDLER=1 -DNUMERIC=0 -UNDEBUG -I/usr/local/include -IInclude -I. -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c testing/src/sf/sfmodule_testing.c -o build/temp.linux-x86_64-2.7/testing/src/sf/sfmodule_testing.o" failed with exit status 1

首先使用yum install gcc然后安裝 python 模塊

我已經通過管道安裝基於 Python2.7 安裝 pygsl-2.1.1 解決了這個問題。 但是gsl版本是1.15,所以你必須改變軟件源才能得到gsl-1.16。 它現在有效。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM