flang
flang copied to clipboard
unresolved external symbols when building OpenBLAS with OpenMP and DYNAMIC arch
unknown where these symbols may originate from, or if they should have been generated.
.rsp /out:lib\openblas.dll /implib:lib\Release\openblas.lib /pdb:lib\openblas.pdb /dll /version:0.3 /machine:x64 /INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF /DEF:CMakeFiles\openblas.dir\.\exports.def /MANIFEST /MANIFESTFILE:lib\openblas.dll.manifest" failed (exit code 1120) with the following output:
2021-02-01T20:47:16.1252973Z Creating library lib\Release\openblas.lib and object lib\Release\openblas.exp
2021-02-01T20:47:16.1253968Z ssytrd_sb2st.F.obj : error LNK2019: unresolved external symbol __nv_ssytrd_sb2st__F1L436_1_ referenced in function ssytrd_sb2st_
2021-02-01T20:47:16.1254834Z iparam2stage.F.obj : error LNK2019: unresolved external symbol __nv_iparam2stage__F1L199_1_ referenced in function iparam2stage_
2021-02-01T20:47:16.1255988Z dsytrd_sb2st.F.obj : error LNK2019: unresolved external symbol __nv_dsytrd_sb2st__F1L436_1_ referenced in function dsytrd_sb2st_
2021-02-01T20:47:16.1257691Z chetrd_hb2st.F.obj : error LNK2019: unresolved external symbol __nv_chetrd_hb2st__F1L467_1_ referenced in function chetrd_hb2st_
2021-02-01T20:47:16.1258582Z zhetrd_hb2st.F.obj : error LNK2019: unresolved external symbol __nv_zhetrd_hb2st__F1L467_1_ referenced in function zhetrd_hb2st_
2021-02-01T20:47:16.1259320Z lib\openblas.dll : fatal error LNK1120: 5 unresolved externals
Those symbols are the parallel routines from the parallel regions starting at line *_F1L<NUMBER>_1_
Are they defined in the runtime somewhere?
They should be defined in the corresponding .obj file (for example I'd expect _nv_zhetrd_hb2st__F1L467_1 to be defined in zhetrd_hb2st.F.obj)
Do you have flang installed on linux? Can you give me the ILM and IR files for https://github.com/xianyi/OpenBLAS/blob/develop/lapack-netlib/SRC/ssytrd_sb2st.F so that I can compare them to mine?
Here's my ILM file: https://gist.github.com/xoviat/7f365836c4984d1ce3338d5f64efa016