Skip to content

Build error with ifx on windows #979

Open
@R-Goc

Description

@R-Goc

I tried building with ifx on windows. The way the compiler options are handled, the default language mode is set to fortran 18 (/stand:f18) files in .f90 have a large number of warnings for deprecated constructs. Also there is a large amount of unused variable warnings. Edit: I see the warnings are due to the normal build being a RelWithDebInfo. So the debug flags are used as well.
However the build also fails with and issue with finding c++ standard library symbols.

FAILED: test/hash_functions/test_hash_functions.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=test\hash_functions\CMakeFiles\test_hash_functions.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin\ifx.exe /nologo test\hash_functions\CMakeFiles\test_hash_functions.dir\test_hash_functions.f90.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\nmhash.c.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\pengyhash.c.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\SpookyV2.cpp.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\SpookyV2Test.cpp.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\waterhash.c.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\generate_hash_arrays.cpp.obj  /Qoption,link,/machine:x64 /Qoption,link,/debug /Qoption,link,/INCREMENTAL /Qoption,link,/subsystem:console  src\fortran_stdlib.lib  _deps\test-drive-build\test-drive.lib  user32.lib /link /out:test\hash_functions\test_hash_functions.exe /implib:test\hash_functions\test_hash_functions.lib /pdb:test\hash_functions\test_hash_functions.pdb /version:0.0 && cd ."
LINK: command "C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin\ifx.exe /nologo test\hash_functions\CMakeFiles\test_hash_functions.dir\test_hash_functions.f90.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\nmhash.c.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\pengyhash.c.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\SpookyV2.cpp.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\SpookyV2Test.cpp.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\waterhash.c.obj test\hash_functions\CMakeFiles\test_hash_functions.dir\generate_hash_arrays.cpp.obj /Qoption,link,/machine:x64 /Qoption,link,/debug /Qoption,link,/INCREMENTAL /Qoption,link,/subsystem:console src\fortran_stdlib.lib _deps\test-drive-build\test-drive.lib user32.lib /link /out:test\hash_functions\test_hash_functions.exe /implib:test\hash_functions\test_hash_functions.lib /pdb:test\hash_functions\test_hash_functions.pdb /version:0.0 /MANIFEST:EMBED,ID=1" failed (exit code 1120) with the following output:
LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4217: symbol 'fclose' defined in 'libucrt.lib(fclose.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"public: class std::basic_filebuf<char,struct std::char_traits<char> > * __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::close(void)" (?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ)'
LINK : warning LNK4217: symbol '_lock_file' defined in 'libucrt.lib(_file.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"public: virtual void __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::_Lock(void)" (?_Lock@?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAAXXZ)'
LINK : warning LNK4217: symbol '_unlock_file' defined in 'libucrt.lib(_file.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"public: virtual void __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAAXXZ)'
LINK : warning LNK4217: symbol 'fwrite' defined in 'libucrt.lib(fwrite.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"protected: virtual int __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::overflow(int)" (?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z)'
LINK : warning LNK4217: symbol 'fgetc' defined in 'libucrt.lib(fgetc.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"protected: virtual int __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::uflow(void)" (?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ)'
LINK : warning LNK4217: symbol 'ungetc' defined in 'libucrt.lib(ungetc.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"protected: virtual int __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::uflow(void)" (?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ)'
LINK : warning LNK4217: symbol 'setvbuf' defined in 'libucrt.lib(setvbuf.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"protected: virtual class std::basic_streambuf<char,struct std::char_traits<char> > * __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::setbuf(char *,__int64)" (?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z)'
LINK : warning LNK4217: symbol 'fflush' defined in 'libucrt.lib(fflush.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"protected: virtual int __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::sync(void)" (?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ)'
LINK : warning LNK4217: symbol '_get_stream_buffer_pointers' defined in 'libucrt.lib(_file.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"protected: void __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::_Init(struct _iobuf *,enum std::basic_filebuf<char,struct std::char_traits<char> >::_Initfl)" (?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z)'
LINK : warning LNK4217: symbol 'fputc' defined in 'libucrt.lib(fputc.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"bool __cdecl std::_Fputc<char>(char,struct _iobuf *)" (??$_Fputc@D@std@@YA_NDPEAU_iobuf@@@Z)'
LINK : warning LNK4217: symbol '_invalid_parameter' defined in 'libucrt.lib(invalid_parameter.obj)' is imported by 'generate_hash_arrays.cpp.obj' in function '"public: char & __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::front(void)" (?front@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEADXZ)'
generate_hash_arrays.cpp.obj : error LNK2019: unresolved external symbol __imp_fread referenced in function "protected: virtual __int64 __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::xsgetn(char *,__int64)" (?xsgetn@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z)
generate_hash_arrays.cpp.obj : error LNK2019: unresolved external symbol __imp__fseeki64 referenced in function "protected: virtual class std::fpos<struct _Mbstatet> __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::seekoff(__int64,int,int)" (?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@U_Mbstatet@@@2@_JHH@Z)
generate_hash_arrays.cpp.obj : error LNK2019: unresolved external symbol __imp_fgetpos referenced in function "protected: virtual class std::fpos<struct _Mbstatet> __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::seekoff(__int64,int,int)" (?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@U_Mbstatet@@@2@_JHH@Z)
generate_hash_arrays.cpp.obj : error LNK2019: unresolved external symbol __imp_fsetpos referenced in function "protected: virtual class std::fpos<struct _Mbstatet> __cdecl std::basic_filebuf<char,struct std::char_traits<char> >::seekpos(class std::fpos<struct _Mbstatet>,int)" (?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@U_Mbstatet@@@2@V32@H@Z)
generate_hash_arrays.cpp.obj : error LNK2019: unresolved external symbol __imp__CrtDbgReport referenced in function "public: char & __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::front(void)" (?front@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEADXZ)
msvcprtd.lib(locale0_implib.obj) : error LNK2019: unresolved external symbol __imp__free_dbg referenced in function "public: static void __cdecl std::_Fac_node::operator delete(void *)" (??3_Fac_node@std@@SAXPEAX@Z)
msvcprtd.lib(locale0_implib.obj) : error LNK2019: unresolved external symbol __imp__malloc_dbg referenced in function "public: static void * __cdecl std::_Fac_node::operator new(unsigned __int64)" (??2_Fac_node@std@@SAPEAX_K@Z)
test\hash_functions\test_hash_functions.exe : fatal error LNK1120: 7 unresolved externals

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompiler: ifxSpecific to Intel LLVM Fortran compilersplatform: WindowsBuild issues specific to the Windows platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions