You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use the stock OpenBlas libraries provided in the download page, or build them as it, I get some link errors. This is because GFortran (and if used, OpenIMP) imports are not passed on to the linker. Thus, when I want to use OpenBlas with other libraries, I have to pass the import libraries for GFortran and OpenMP. I tracked the problem and this happens in the "dllimport" line in the Exports folder. I replaced that with my own line using gcc. This removed the problem. I think this should be incorporated into OpenBlas.
In this case, I had built the library with TARGET=PILEDRIVER
I also had to pass -Wl,--allow-multiple-definition as it was complaining of multiple definitions in various .o files. Finally, I also forced the linker to select the static builds of libgfortran.a and libgomp.a instead of their respective imports (i.e., libgfortran.dll.a and libgomp.dll.a) by physically deleting the non-essential files. Is there a cleaner way to do this?
The library now built links with other libraries without any problem (i.e., link errors).
The text was updated successfully, but these errors were encountered:
If I use the stock OpenBlas libraries provided in the download page, or build them as it, I get some link errors. This is because GFortran (and if used, OpenIMP) imports are not passed on to the linker. Thus, when I want to use OpenBlas with other libraries, I have to pass the import libraries for GFortran and OpenMP. I tracked the problem and this happens in the "dllimport" line in the Exports folder. I replaced that with my own line using gcc. This removed the problem. I think this should be incorporated into OpenBlas.
gcc.exe -shared -o libopenblas.dll -Wl,--out-implib,libopenblas.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive ./libopenblas_piledriverp-r0.2.9.rc2.a -Wl,--no-whole-archive -Wl,--allow-multiple-definition -lgfortran -lgomp -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
In this case, I had built the library with TARGET=PILEDRIVER
I also had to pass -Wl,--allow-multiple-definition as it was complaining of multiple definitions in various .o files. Finally, I also forced the linker to select the static builds of libgfortran.a and libgomp.a instead of their respective imports (i.e., libgfortran.dll.a and libgomp.dll.a) by physically deleting the non-essential files. Is there a cleaner way to do this?
The library now built links with other libraries without any problem (i.e., link errors).
The text was updated successfully, but these errors were encountered: