Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

c_check/f_check: strip quotes from detected flags #99

Closed
zchothia opened this Issue Apr 26, 2012 · 0 comments

Comments

Projects
None yet
2 participants
Contributor

zchothia commented Apr 26, 2012

The compiler detection scripts (c_check/f_check) don't strip quotes from detected flags which results in a build error, for example with this build of MinGW-w64 (x86_64-w64-mingw32-gcc-4.6.4_rubenvb.7z).

Brief explanation: the output of the command gcc -v contains --with-host-libstdcxx='-static -lstdc++ -lm'. This generates a problematic linker flag (-lm') due to the unbalanced quote:

$ make
<SNIP>
dllwrap -o ../libopenblas_nehalemp-r0.1.0.dll --def libopenblas.def \
        --entry dllinit    -s dllinit.obj --dllname libopenblas_nehalemp-r0.1.0.dll ../libopenblas_nehalemp-r0.1.0.lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.4 -Lc:/mingw64/bin/../lib/gcc -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.4/../../../../x86_64-w64-mingw32/lib/../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.4/../../../../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.4/../../../../x86_64-w64-mingw32/lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.4/../../..  -lstdc++ -lm' -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lpthread -lmingw32 -lmoldname -lmingwex -lmsvcrt
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: *** [../libopenblas_nehalemp-r0.1.0.dll] Error 2
make[1]: Leaving directory `/c/code/OpenBLAS_git/exports'
make: *** [shared] Error 2

Here is a small tweak to resolve this issue: https://gist.github.com/2502173

--Zaheer

@ghost ghost assigned xianyi Apr 27, 2012

@xianyi xianyi closed this Apr 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment