Skip to content

Conversation

@moluopro
Copy link
Contributor

I tried building for the iOS following the doc and encountered the following error:

...
TEST 1520/1522 csbmv:xerbla_inc_c_zero [OK]
TEST 1521/1522 csbmv:xerbla_k_invalid [OK]
TEST 1522/1522 csbmv:xerbla_lda_invalid [OK]
RESULTS: 1522 tests (1516 ok, 6 failed, 0 skipped) ran in 184 ms
make[1]: *** [run_test] Error 6
make: *** [tests] Error 2

Initially, I thought this was caused by the tests being built, so I tried modifying the doc's make to make libs. However, I was informed that "Cross-build condition should already prevent running the tests".

The original build process didn’t distinguish the iOS platform and treated it the same as Darwin. I updated the Darwin build process as follows:

  1. Add in ctest.c:
#if defined(TARGET_OS_IPHONE)
OS_IOS
#endif
  1. Add an is_ios variable in c_check, setting cross=1 when it is true.

I tested this on a physical device, and the iOS build now works correctly.

@martin-frbg
Copy link
Collaborator

Curious as the CI job on Cirrus does not run into such problems

@moluopro
Copy link
Contributor Author

Curious as the CI job on Cirrus does not run into such problems

From the logic of the build script, this issue does exist. I ran some tests locally, and the results support my thinking. Is there anything else I need to adjust?

@moluopro
Copy link
Contributor Author

moluopro commented Jan 11, 2026

I found the reason. In .cirrus.yml, when building the iOS library, CROSS=1 was set manually. I think iOS and Android builds should be consistent (i.e., it should work properly without manually specifying CROSS=1). Of course, this is also how it is described in the documentation.

macos_instance:
  image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
task:
  name: AppleM1/LLVM armv8-ios xbuild
  ......
  - make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants