构建错误:错误的重定位地址

时间:2013-05-18 10:48:53

标签: build mingw memory-address intel-mkl ipopt

我正在尝试使用MingW 64在64位机器上使用MKL blas构建IPopt, 我可以使用以下命令完成配置过程:

../configure ADD_FFLAGS=-fopenmp --with-blas="-L/c/intel/COMPOS~1/mkl/lib/intel64 \
-lmkl_intel_lp64_dll -lmkl_intel_thread_dll -lmkl_core_dll -Wl,\
--rpath,/c/intel/COMPOS~1/mkl/lib/intel64" \
--with-lapack="-L/c/intel/COMPOS~1/mkl/lib/intel64 \
-lmkl_intel_lp64_dll -lmkl_intel_thread_dll -lmkl_core_dll -Wl,\
--rpath,/c/intel/COMPOS~1/mkl/lib/intel64"

我获得了成功的配置消息,但是当我尝试继续“make”时,我收到如下错误:

g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual 
-Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-lon
g-long -DIPOPT_BUILD -o ipopt.exe ampl_ipopt.o -Wl,--rpath -Wl,"/c/intel/COMPOS~
1/mkl/lib/intel64" -Wl,--rpath -Wl,"/c/intel/COMPOS~1/mkl/lib/intel64" -Wl,--rpa
th -Wl,"/c/intel/COMPOS~1/mkl/lib/intel64" -Wl,--rpath -Wl,"/c/intel/COMPOS~1/mk
l/lib/intel64" -Wl,--rpath -Wl,"/c/intel/COMPOS~1/mkl/lib/intel64"  ./.libs/libi
poptamplinterface.a ../../Interfaces/.libs/libipopt.a /home/Kevin/mybuild/coin
ipopt/build_64_intel/ThirdParty/ASL/.libs/libcoinasl.a /home/Kevin/mybuild/coi
nipopt/build_64_intel/ThirdParty/Mumps/.libs/libcoinmumps.a -L/c/intel/COMPOS~1/
mkl/lib/intel64 -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1 -Lc:/mingw6
4/bin/../lib/gcc -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../.
./x86_64-w64-mingw32/lib/../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4
.7.1/../../../../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../
../../x86_64-w64-mingw32/lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.
1/../../.. /home/Kevin/mybuild/coinipopt/build_64_intel/ThirdParty/HSLold/.lib
s/libcoinhsl.a -lgfortran -lgomp -lmingwthrd -lmingw32 -lgcc_s -lmoldname -lming
wex -lmsvcrt -lquadmath -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 /home
/Kevin/mybuild/coinipopt/build_64_intel/ThirdParty/Metis/.libs/libcoinmetis.a 
-lmkl_intel_lp64_dll -lmkl_intel_thread_dll -lmkl_core_dll
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc.a(unwind-sjlj.o): In f
unction `_Unwind_SjLj_Register':
c:\crossdev\build\gcc-tdm64\x86_64-w64-mingw32\libgcc/../../../../src/gcc-4.7.1/
libgcc/unwind-sjlj.c:127: multiple definition of `_Unwind_SjLj_Register'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc_s.a(d000017.o):(.text+
0x0): first defined here
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc.a(unwind-sjlj.o): In f
unction `_Unwind_SjLj_Unregister':
c:\crossdev\build\gcc-tdm64\x86_64-w64-mingw32\libgcc/../../../../src/gcc-4.7.1/
libgcc/unwind-sjlj.c:174: multiple definition of `_Unwind_SjLj_Unregister'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc_s.a(d000020.o):(.text+
0x0): first defined here
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc.a(unwind-sjlj.o): In f
unction `_Unwind_SjLj_Resume':
c:\crossdev\build\gcc-tdm64\x86_64-w64-mingw32\libgcc/../../../../src/gcc-4.7.1/
libgcc/unwind.inc:220: multiple definition of `_Unwind_SjLj_Resume'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc_s.a(d000018.o):(.text+
0x0): first defined here
c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_lp64.obj):(.tex
t[dgetrf]+0xb4): undefined reference to `__security_check_cookie'
c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_lp64.obj):(.tex
t[dgetrf]+0xf5): undefined reference to `__security_check_cookie'
c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_lp64.obj):(.xda
ta+0xc): undefined reference to `__GSHandlerCheck'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_l
p64.obj): bad reloc address 0x1 in section `.text[DGETRF]'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [ipopt.exe] Error 1
make[3]: Leaving directory `/home/Kevin/mybuild/coinipopt/build_64_intel/Ipopt
/src/Apps/AmplSolver'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Kevin/mybuild/coinipopt/build_64_intel/Ipopt
/src/Apps'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Kevin/mybuild/coinipopt/build_64_intel/Ipopt
'
make: *** [all-recursive] Error 1

如果有人可以提供帮助,我将感激不尽。

跟进:我想我发现了错误源于什么, 当运行configure时,它返回到MKL的共享库并获取其路径(在配置日志文件中可用):

/c/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler
确实它不是一条短路!所以我猜这是提出问题,但我不知道如何强制配置获取短路径!另外,我使用的是Windows 8 64位,尽管启用8.3命名约定(Reg.Key设置为0)仍然只获得一些目录的8.3名称,例如我没有得到程序文件和程序文件的短路径(x86) )。

1 个答案:

答案 0 :(得分:1)

简单回答: 英特尔MKL for Windows无法与MingW提供的gnu编译器兼容! 切换到OpenBlas并对其进行了排序。

特别感谢Tony Kelman。