Hi,
first of all: thank you for the continuous work on B4i and the Build Server. The move to the newer build infrastructure and xcframework-based libraries is a big step forward. I am reporting this because I think I found a small inconsistency in the native-library build flow that might be useful to improve.
I have a B4i project that references
The normal B4i app build works correctly. The same library setup is accepted and
However, when I use the
This error message is shown:
The Build Server
This does not seem to be a general problem with
The problem appears only in the
It does not seem to include the Build Server
As a workaround, I was able to build the library manually by copying
If the normal B4i app build supports a legacy static library such as
Because the normal app build works, but
I hope this report is useful. My intention is to help identify a small edge case in an otherwise very useful feature.
first of all: thank you for the continuous work on B4i and the Build Server. The move to the newer build infrastructure and xcframework-based libraries is a big step forward. I am reporting this because I think I found a small inconsistency in the native-library build flow that might be useful to improve.
I have a B4i project that references
iRSA.The normal B4i app build works correctly. The same library setup is accepted and
iRSA is resolved without problems.However, when I use the
Compile To Library feature for the same project, the build fails during the Xcode / libtool step.
B4X:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool \
-static \
-arch_only arm64 \
-D \
-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.1.sdk \
-L/Users/user1/Build/B4iBuildServer_v10-00/UploadedProjects/<user id>/build/Release-iphoneos \
-filelist /Users/user1/Build/B4iBuildServer_v10-00/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/b4i-example.build/Objects-normal/arm64/b4i-example.LinkFileList \
-framework Foundation \
-framework CoreGraphics \
-framework UIKit \
-framework iArchiver \
-framework iCore \
-framework iDateUtils \
-framework iEncryption \
-framework iRandomAccessFile \
-liRSA \
-framework iStringUtils \
-framework iXmlBuilder \
-framework iXmlSax \
-framework AVFoundation \
-o /Users/user1/Build/B4iBuildServer_v10-00/UploadedProjects/<user id>/build/Release-iphoneos/b4i-example.framework/b4i-example
This error message is shown:
B4X:
error: libtool: can't locate file for: -liRSA
error: libtool: file: -liRSA is not an object file (not allowed in a library)
Command Libtool failed with a nonzero exit code
The Build Server
Libs folder contains the legacy iRSA files:
B4X:
iRSA.h
iRSA.xml
libiRSA.a
This does not seem to be a general problem with
iRSA, because the normal app build handles it correctly.The problem appears only in the
Compile To Library build flow. In that flow, libtool is called with -liRSA, but the relevant library search path only points to the generated project output folder:
B4X:
-L.../UploadedProjects/<user id>/build/Release-iphoneos
It does not seem to include the Build Server
Libs folder where libiRSA.a is located. Therefore libtool cannot resolve -liRSA.As a workaround, I was able to build the library manually by copying
libiRSA.a into the generated build/Release-iphoneos folder and then running the Xcode build manually with suitable search paths.If the normal B4i app build supports a legacy static library such as
iRSA, then Compile To Library should either:- resolve the same library from the Build Server
Libsfolder, or - copy the required
.afile into the generated build output folder, or - otherwise handle the dependency in the same way as the normal app build.
Because the normal app build works, but
Compile To Library fails because libtool cannot locate libiRSA.a. So I think this is a bug or at least an inconsistency in the Compile To Library build process when legacy .a libraries are involved.I hope this report is useful. My intention is to help identify a small edge case in an otherwise very useful feature.