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

Bugfix: change GNU triplet for iOS, watchOS, tvOS to allow simulator builds #6748

Merged
merged 1 commit into from Jun 30, 2020

Conversation

SSE4
Copy link
Contributor

@SSE4 SSE4 commented Mar 26, 2020

closes: #6428

Changelog: Bugfix: Change GNU triplet for iOS, watchOS, tvOS to allow simulator builds.
Docs: Omit

the issue came up several times in the past already, e.g.
conan-io/conan-center-index#1008 (comment)
bincrafters/conan-libiconv#11

currently, recipes use the following ugly workaround:
https://github.com/conan-io/conan-center-index/blob/8110cdeccead2f2d37fcea22919fe5d18f58d833/recipes/libiconv/all/conanfile.py#L106
https://github.com/conan-io/conan-center-index/blob/8110cdeccead2f2d37fcea22919fe5d18f58d833/recipes/libcurl/all/conanfile.py#L367

            if self.settings.os == "iOS" and self.settings.arch == "x86_64":
                # please do not autodetect --build for the iOS simulator, thanks!

changes were tested locally on libiconv and libcurl

old triplet for iOS simulator was x86_64-apple-darwin (same as MacOS, which confused auto-tools configure scripts).
the new deduced triplet is x86_64-apple-ios.
sources:
LLVM
Rust

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@memsharded
Copy link
Member

@memsharded memsharded commented Mar 26, 2020

old triplet for iOS simulator was x86_64-apple-darwin (same as MacOS, which confused auto-tools configure scripts).
the new deduced triplet is x86_64-apple-ios.

But wouldn't this mean that if there are Conan users using the old iOS simulator we will break them?

@SSE4
Copy link
Contributor Author

@SSE4 SSE4 commented Mar 26, 2020

@memsharded nope, it won't break. basically, configure never ever passed for such old triplets, that's why recipes were using workarounds.

@SSE4
Copy link
Contributor Author

@SSE4 SSE4 commented Mar 26, 2020

for the record, the error was:

 > ./configure '--prefix=/Users/sse4/.conan/data/libiconv/1.16/_/_/package/6c12f63a312ce33f9e1610f0b8c55126373a1743' '--enable-static' '--disable-shared' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --build=x86_64-apple-darwin --host=x86_64-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for x86_64-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/Users/sse4/.conan/data/libiconv/1.16/_/_/build/6c12f63a312ce33f9e1610f0b8c55126373a1743/source_subfolder':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

(NOTICE: --build=x86_64-apple-darwin --host=x86_64-apple-darwin)
and config.log has:

configure:4358: checking whether we are cross compiling
configure:4370: $? = 0
configure:4377: ./conftest
dyld: attempt to run simulator program outside simulator (DYLD_ROOT_PATH not set)
./configure: line 4379: 72890 Abort trap: 6           ./conftest$ac_cv_exeext
configure:4381: $? = 134
configure:4388: error: in `/Users/sse4/.conan/data/libiconv/1.16/_/_/build/6c12f63a312ce33f9e1610f0b8c55126373a1743/source_subfolder':
configure:4390: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

after the fix, it has --build=x86_64-apple-darwin --host=x86_64-apple-ios
and configure finishes gracefully:

checking whether we are cross compiling... yes

@SSE4 SSE4 closed this Apr 1, 2020
@SSE4 SSE4 reopened this Apr 1, 2020
@maikelvdh
Copy link

@maikelvdh maikelvdh commented May 12, 2020

Is there a plan to get this change merged in? ping @memsharded

@memsharded memsharded merged commit d40f2a9 into conan-io:develop Jun 30, 2020
2 checks passed
@memsharded memsharded added this to the 1.27 milestone Jun 30, 2020
@memsharded
Copy link
Member

@memsharded memsharded commented Jun 30, 2020

Sorry about this, merged, will be in next 1.27

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.

3 participants