Error in compiler options when building with icc/ifort on Linux

Issue #3 resolved
Bob Apthorpe
created an issue

When building with Intel tools on Linux x64 (ifort/icc), it appears waf is sending '-warn all' instead of the expected '-Wall' to icc which crashes the build. After importing all the ifort environment variables. waf was called as:

FC=ifort CC=icc ./waf configure build

The full error log is attached; here's the important piece:

[46/80] cprogram: build/external/lua-5.2.2/src/lua.c.13.o -> build/lua
icc: command line warning #10157: ignoring option '-w'; argument is of wrong type
icc: error #10236: File not found:  'all'
Waf: Leaving directory `/home/apthorpe/Downloads/inst/haraldkl-aotus-2a1b1f062087/build'
Build failed
 -> task in 'lua' failed (exit status 1): 
        {task 42799504: cprogram lua.c.13.o -> lua}
['icc', '-xHOST', '-O3', '-ipo', '-no-prec-div', '-warn', 'all', 'external/lua-5.2.2/src/lua.c.13.o', '-o', '/home/apthorpe/Downloads/inst/haraldkl-aotus-2a1b1f062087/build/lua', '-Wl,-Bstatic', '-L.', '-llualib', '-Wl,-Bdynamic', '-lm']

Modifying the compiler options would appear to fix the problem, I'm not familiar with waf; should I have called it a different way?

Comments (5)

  1. Harald Klimach repo owner

    Thanks for reporting this! I usually do not use icc, but ifort/gcc, yet I am wondering why I didn't run into this problem yet. I pushed a5b57e2, which I think resolves your problem, by using different LINKFLAGS for Fortran and C applications.

  2. Harald Klimach repo owner

    No problem, thanks for reporting and helping to improve the code. I'll close this ticket as resolved, please do not hesitate to open new ones if you again run into trouble.

  3. Log in to comment