Skip to content

Circular link dependency error on Windows in 5.3.0 #71

@alexchandel

Description

@alexchandel

Building with VS 2019 as following fails, with CBLAS complaining of unresolved external symbols from SuperLU

mkdir build ; cd build
cmake .. -Denable_internal_blaslib=YES -DXSDK_ENABLE_Fortran=FALSE
msbuild SuperLU.sln
Build Error
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ER
  RORREPORT:QUEUE /OUT:"C:\Users\Dev\Git\superlu\build\CBLAS\Debug\blas.dll" /INCREMENTAL /ILK:"blas.dir\Debug\blas.ilk
  " /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib adv
  api32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/Users/Dev/Git/s
  uperlu/build/CBLAS/Debug/blas.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/Dev/Git/super
  lu/build/CBLAS/Debug/blas.lib" /MACHINE:X64  /machine:x64 /DLL blas.dir\Debug\isamax.obj
  blas.dir\Debug\sasum.obj
  blas.dir\Debug\saxpy.obj
  blas.dir\Debug\scopy.obj
  blas.dir\Debug\sdot.obj
  blas.dir\Debug\snrm2.obj
  blas.dir\Debug\srot.obj
  blas.dir\Debug\sscal.obj
  blas.dir\Debug\sswap.obj
  blas.dir\Debug\sgemv.obj
  blas.dir\Debug\ssymv.obj
  blas.dir\Debug\strsv.obj
  blas.dir\Debug\sger.obj
  blas.dir\Debug\ssyr2.obj
  blas.dir\Debug\idamax.obj
  blas.dir\Debug\dasum.obj
  blas.dir\Debug\daxpy.obj
  blas.dir\Debug\dcopy.obj
  blas.dir\Debug\ddot.obj
  blas.dir\Debug\dnrm2.obj
  blas.dir\Debug\drot.obj
  blas.dir\Debug\dscal.obj
  blas.dir\Debug\dswap.obj
  blas.dir\Debug\dgemv.obj
  blas.dir\Debug\dsymv.obj
  blas.dir\Debug\dtrsv.obj
  blas.dir\Debug\dger.obj
  blas.dir\Debug\dsyr2.obj
  blas.dir\Debug\icamax.obj
  blas.dir\Debug\scasum.obj
  blas.dir\Debug\caxpy.obj
  blas.dir\Debug\ccopy.obj
  blas.dir\Debug\scnrm2.obj
  blas.dir\Debug\cscal.obj
  blas.dir\Debug\cswap.obj
  blas.dir\Debug\cdotc.obj
  blas.dir\Debug\cgemv.obj
  blas.dir\Debug\chemv.obj
  blas.dir\Debug\ctrsv.obj
  blas.dir\Debug\cgerc.obj
  blas.dir\Debug\cher2.obj
  blas.dir\Debug\izamax.obj
  blas.dir\Debug\dzasum.obj
  blas.dir\Debug\zaxpy.obj
  blas.dir\Debug\zcopy.obj
  blas.dir\Debug\dznrm2.obj
  blas.dir\Debug\zscal.obj
  blas.dir\Debug\dcabs1.obj
  blas.dir\Debug\zswap.obj
  blas.dir\Debug\zdotc.obj
  blas.dir\Debug\zgemv.obj
  blas.dir\Debug\zhemv.obj
  blas.dir\Debug\ztrsv.obj
  blas.dir\Debug\zgerc.obj
  blas.dir\Debug\zher2.obj
zhemv.obj : error LNK2019: unresolved external symbol input_error referenced in function zhemv_ [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ztrsv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zgerc.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zher2.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ctrsv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
cgerc.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
cher2.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zgemv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
dger.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
dsyr2.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
cgemv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
chemv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ssyr2.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
dgemv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
dsymv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
dtrsv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
sgemv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ssymv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
strsv.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
sger.obj : error LNK2001: unresolved external symbol input_error [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
icamax.obj : error LNK2019: unresolved external symbol r_imag referenced in function icamax_ [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
scasum.obj : error LNK2001: unresolved external symbol r_imag [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
caxpy.obj : error LNK2001: unresolved external symbol r_imag [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
scnrm2.obj : error LNK2001: unresolved external symbol r_imag [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
cgerc.obj : error LNK2019: unresolved external symbol r_cnjg referenced in function cgerc_ [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
cher2.obj : error LNK2001: unresolved external symbol r_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
cdotc.obj : error LNK2001: unresolved external symbol r_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
cgemv.obj : error LNK2001: unresolved external symbol r_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
chemv.obj : error LNK2001: unresolved external symbol r_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ctrsv.obj : error LNK2001: unresolved external symbol r_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ctrsv.obj : error LNK2019: unresolved external symbol c_div referenced in function ctrsv_ [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
dznrm2.obj : error LNK2019: unresolved external symbol d_imag referenced in function dznrm2_ [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zgerc.obj : error LNK2019: unresolved external symbol d_cnjg referenced in function zgerc_ [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zher2.obj : error LNK2001: unresolved external symbol d_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zdotc.obj : error LNK2001: unresolved external symbol d_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zgemv.obj : error LNK2001: unresolved external symbol d_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
zhemv.obj : error LNK2001: unresolved external symbol d_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ztrsv.obj : error LNK2001: unresolved external symbol d_cnjg [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
ztrsv.obj : error LNK2019: unresolved external symbol z_div referenced in function ztrsv_ [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
C:\Users\Dev\Git\superlu\build\CBLAS\Debug\blas.dll : fatal error LNK1120: 7 unresolved externals [C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj]
Done Building Project "C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\Users\Dev\Git\superlu\build\CBLAS\blas.vcxproj.metaproj" (default targets) -- FAILED.

Done Building Project "C:\Users\Dev\Git\superlu\build\ALL_BUILD.vcxproj.metaproj" (default targets) -- FAILED.

Done Building Project "C:\Users\Dev\Git\superlu\build\SuperLU.sln" (default targets) -- FAILED.

Build FAILED.

I tried msbuild CBLAS\blas.vcxproj and msbuild -p:BuildProjectReferences=false CBLAS\blas.vcxproj, but the same error happens.

I also tried msbuild -p:BuildProjectReferences=false SRC\superlu.vcxproj, which almost compiled but failed to link blas.lib (as it wasn't built):

"C:\Users\Dev\Git\superlu\build\SRC\superlu.vcxproj" (default target) (1) ->
(Link target) ->
  LINK : fatal error LNK1104: cannot open file '..\CBLAS\Debug\blas.lib' [C:\Users\Dev\Git\superlu\build\SRC\superlu.vc
xproj]

Note that the last two failures ONLY happen on 5.3.0. On 5.2.1, the following commands succeed:

cmake .. -Denable_internal_blaslib=YES
msbuild -p:BuildProjectReferences=false SRC\superlu.vcxproj
msbuild -p:BuildProjectReferences=false CBLAS\blas.vcxproj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions