Skip to content
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

Remove the libbase58 pod dependency #1828

Open
ARiezn opened this issue Oct 26, 2023 · 3 comments
Open

Remove the libbase58 pod dependency #1828

ARiezn opened this issue Oct 26, 2023 · 3 comments

Comments

@ARiezn
Copy link

ARiezn commented Oct 26, 2023

Currently, there is a problem with building Matrix-dependent SDKs using Xcode versions 14.3 and above. For some scenarios without increasing the deployment target for iOS in the libbase58 podspec this becomes a blocker - it causes a build error, not simply a warning:

ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It may be necessary to update the libbase58 podspec to specify iOS 11 as the minimum deployment target. The original libbase58.podspec.json file should contain the value 9.0 or even better 11.0 (the minimal version for the latest Xcode versions) in the platforms ios section: libbase58.podspec.json:19. Without this change, the target is set to version 8.0 which causes the above described ld error. I've tried to contact @mohakshah who seem to be the maintainer of this pod to push the change (but without success, he does not seem to be active online during the last time).

For the top-level apps using libbase58 as a dependency, there is a workaround. It is possible to override the build_settings['IPHONEOS_DEPLOYMENT_TARGET'] in the post_install actions in the Podfile. For example, this is recommended in the discussion #804 (comment) in issue #804

Unfortunately, this above workaround will not work when building an SDK. pod lib lint will fail with an error. So this is a serious blocker that makes building completely impossible in this scenario.

There is another way of fixing the problem proposed in the PR - #1829 . It completely removes the libbase58 pod dependency and replaces it with native Base58 encoding-decoding implementation. This will also fix related issue #804.

@ceburo
Copy link

ceburo commented Nov 14, 2023

Same problem here. We need the matrix-sdk in a library and we are completely blocked.
All our Macs are on Sonoma and XCode15 (impossible to install XCode14.x).

This as to be fixed ASAP.

In state, this library is not usable. Development blocked = Production blocked.

@pixlwave
Copy link
Member

pixlwave commented Nov 14, 2023

@ceburo You can get Xcode 14 to work on Sonoma if you run it from the command line:

/Applications/Xcode-14.3.1.app/Contents/MacOS/Xcode

Or browse the bundle and make an alias to that executable and you can run it without needing Terminal.

Hope this helps :)

@pixlwave
Copy link
Member

pixlwave commented Nov 14, 2023

Also, @Velin92 has been adding this to our Element Podfile to make it work on Xcode 15:

installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
          xcconfig_path = config.base_configuration_reference.real_path
          xcconfig = File.read(xcconfig_path)
          xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
          File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
      end
end

Maybe that will help you too?

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

No branches or pull requests

3 participants