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

[bug] TypeError: sequence item 0: expected str instance, NoneType found #16086

Closed
DoDoENT opened this issue Apr 16, 2024 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@DoDoENT
Copy link
Contributor

DoDoENT commented Apr 16, 2024

Describe the bug

When using profile with custom architecture that represents an apple universal binary, conan fails with:

ERROR: log_and_timer/1.1.3@nenad/testing: Error in generate() method, line 56
        self.mb_generate_with_cmake_args(cmake_args)
while calling 'mb_generate_with_cmake_args', line 65
        tc.generate()
        TypeError: sequence item 0: expected str instance, NoneType found

mb_genererate_with_cmake_args is our function that sets up the CMakeToolchain with variables and then calls the generate function on it.

The error was introduced in conan v2.2.0, possibly with official support for universal binaries.

Downgrading to v2.1.0 fixes the issue.

I also tried setting arch = armv8|x86_64 in my profile instead of the custom universal, however this generates a broken xcode project which fails to build (the error being make: *** No rule to make target /Users/dodo/.conan2/p/b/log_a9bf66684d376f/b/build/generators/Boost-release-armv8', needed by /Users/dodo/.conan2/p/b/log_a9bf66684d376f/b/build/CMakeFiles/cmake.check_cache'. Stop.). If I tried using ninja instead of xcode, then it fails with

CMake Error:
  Running

   '/opt/homebrew/bin/ninja' '-C' '/Users/dodo/.conan2/p/b/gtest5524cfbfaad17/b/build/Release' '-t' 'recompact'

  failed with:

   ninja: error: build.ninja:527: expected newline, got '|'

How to reproduce it

  • add a custom architecture to your settings_user.yml
  • use it in mac or iOS profile
  • try building the conan package using that profile with CMakeToolchain
@czoido czoido self-assigned this Apr 16, 2024
@DoDoENT
Copy link
Contributor Author

DoDoENT commented Apr 16, 2024

For reference, here are the profiles I use (it may help you with triaging):

Profile host:
[settings]
arch=universal
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=15.0.0
os=iOS
os.sdk=iphonesimulator
os.version=11.0
[tool_requires]
*: mb_foundation/1.0.1@microblink/main
[conf]
tools.cmake.cmake_layout:build_folder_vars=['settings.os', 'settings.os.sdk', 'settings.arch', 'settings.compiler', 'settings.compiler.version', 'settings.compiler.sanitizers', 'settings.compiler.link_time_optimization']
tools.cmake.cmaketoolchain:generator=Xcode
tools.cmake.cmaketoolchain:system_name=iOS
tools.files.download:retry=25
tools.files.download:retry_wait=2
user.microblink.cmaketoolchain:cache_variables={'MB_IOS_SDK': 'simulator'}

Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=15.0.0
os=Macos
[tool_requires]
*: mb_foundation/1.0.1@microblink/main
[conf]
tools.cmake.cmake_layout:build_folder_vars=['settings.os', 'settings.os.sdk', 'settings.arch', 'settings.compiler', 'settings.compiler.version', 'settings.compiler.sanitizers', 'settings.compiler.link_time_optimization']
tools.cmake.cmaketoolchain:generator=Ninja
tools.files.download:retry=25
tools.files.download:retry_wait=2

@czoido
Copy link
Contributor

czoido commented Apr 16, 2024

Hi @DoDoENT,

Thanks a lot for reporting, I have been able to reproduce the issue and opened a PR to fix that.
This will be released in Conan 2.2.3 soon

@czoido
Copy link
Contributor

czoido commented Apr 17, 2024

@DoDoENT closing this after #16090 included in version 2.2.3 that has just been released: https://github.com/conan-io/conan/releases/tag/2.2.3
Thanks a lot for reporting.

@czoido czoido closed this as completed Apr 17, 2024
@DoDoENT
Copy link
Contributor Author

DoDoENT commented Apr 17, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants