-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake install cannot find libopenblas.a when using the Xcode generator #4051
Comments
Which release/version are you building ? And what .a files do you see generated in your build tree ? (The messages "building libkernel.a"/"building libdriver_level2.a" look a bit strange to me, unless these names are a feature of the xcode build that I am not familiar with. At least it looks strangely like it is creating a separate .a per source directory without even trying to collate them into a single file) |
Building relwithdebinfo, repo forked ~after this #4041. For example, on android amrv8 its like: |
No idea, sorry. Could be an xcode or cmake problem on that platform - all the relevant (missing) messages are generated by either of them. OTOH, is what you copied above the entire cmake command line ? (I.e. no setting of TARGET, no cross-compilation - what is your build system here please ?) |
it is entire cmake command,
i'm cross compiling for ios on macmini x86 catalina, but macos is not. TARGET is set correctly automatically ( manually I had to set on android ). I just tried to set TARGET manually and haven't seen any changes, except on macos it is ARMV8 now instead of automatically chosen VORTEX. P.S. about android log I attached -> it is builds and install correctly and building/linking libopenblas.a only,, as you said it is strange that on ios/macos all of them are separated P.P.S If you have no ideas and this thread will be closed, can you please briefly tell what is correct TARGET for i486 and android x86 ? I'm setting NEHALEM and ATOM respectively and it seems to be ok for build but not tested yet. |
x86(_64) supports TARGET=GENERIC, it means -mtune=generic in addition to your compilers' defaults that presumably targets lowest capable CPU to be encountered. |
@brada4 @martin-frbg Thanks guys, should I close this thread if there are still no ideas? |
Not really familiar with either xcodebuild or conan, will have to see if I can set up a CI job that replicates this. |
full log is not reproducable due to machine constraints. Btw building via make is fine (at least errors already solved in issues:)) |
thanks - "via make" meaning pure Makefile build, or cmake+make combo ? |
cmake generation like stated above : than https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-iPhone-iOS-(ARMv8) |
Ok, so a regular Makefile build without using any of the preparations made with cmake. I believe a cmake |
I wonder if you could provide your |
I'll try to extract them from vm later. But I think it's easy to generate yours with conanfile.py and call conan build tc = CMakeToolchain(self) cmake = CMake(self) |
Thanks - it's just that I'm not really familiar with conan, and the reproducer is intended to run as an Azure CI job |
suspecting this to be a problem in the conan files (maybe somewhat related to conan-io/conan#13677 ) but I cannot get my conanfile.py to work |
from conan import ConanFile class OpenblasConan(ConanFile):
|
The normal way is not branching inside build method.
like: conan build . --build=missing |
So conan just invokes cmake -GXcode or something with cmake.configure() inside build() using variables and toolchain generated in generate() and then xcodebuild with cmake.build() |
Ok I will check issue later |
It doesnt look like this issue you mentioned.
|
Thank you. I have now (finally) gotten the CI job to run with your conanfile.py, but everything appears to have worked (using xcode 12.4 and sdk 14.4) |
Can you show the output? |
Not sure if you can access the log from the latest CI run of PR #4070 on Azure here: the job itself is essentially fetching the conanfile.py that you provided, and then running |
Hm, I don |
@martin-frbg sorry, my mistake. Please check the build() method. You see there's branching ####### the ideal way is def build(self): and ci script :
|
@martin-frbg The way you built it in pipeline you showed, I had to make changes in both conanfile and ci to make it work using make instead of cmake etc |
Modified the build in PR #4070 and it still passes (builds libopenblas.a and the subsequent |
CmdLine:
Anyway, I guess it is time-consuming enough to make conan work as it works in my environment. So if you want, you may try to comment everything inside the build() method and in ci script after conan build put commands I provided in the very first message (cmake -Gxcode, xcodebuild, cmake install) in this thread. This way you will have generated toolchain and the commands conan calls in the build method will be in ci script. |
Thanks. So I think I have reproduced it now (after some symlink trickery required by the CI environment). However, I am not sure what to make of it - the build appears to be using libtool to create the .a files in individual subdirectories, which suggests that the Xcode generator may be misreading the toplevel CMakeLists.txt (that the Ninja and Makefiles generators have no problems with). |
Yes, the "broken" build generates all of *.a |
It does things differently than what is in the CMakelists, so it is something I do not really have control over. |
I'm building for iOS armv8 sdk 13.04 and 14.4, macos armv8 sdk 11.1
builds via conan:
cmake -G ""Xcode"" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="OpenBLAS" -DNOFORTRAN="ON" -DBUILD_WITHOUT_LAPACK="ON" -DBUILD_LAPACK_DEPRECATED="OFF" -DBUILD_TESTING="OFF" -DUSE_THREAD="ON" -DMSVC_STATIC_CRT="OFF" -DBUILD_STATIC_LIBS="ON" -DBUILD_SHARED_LIBS="OFF" -DONLY_CBLAS="1" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "OpenBLAS"
xcodebuild -project OpenBLAS.xcodeproj build -target ALL_BUILD -configuration RelWithDebInfo -hideShellScriptEnvironment
xcpretty output for iOS 13.04:
....
output for iOS 14.4 and macos:
....
I mean the difference is that there's nothing about openblas_static in 14.4 and macos,
anyway libopenblas.a seems to be missing, any ideas ?
P.S. adroid, win, linux etc builds and installs successfully with almost the same options.
The text was updated successfully, but these errors were encountered: