question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Failed to create package

See original GitHub issue

Env

OS: Windows conan: 1.39.0 profile:

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
build_type=Release
[options]
shared=True
[build_requires]
[env]

Problem

Following the doc https://docs.conan.io/en/latest/creating_packages/getting_started.html#creating-and-testing-packages

$ conan create .
Exporting package recipe
hello/0.1: The stored package has not changed
hello/0.1: Exported revision: bba8f92abfeb2d792a934d62d408c28d
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=16
os=Windows
os_build=Windows
[options]
shared=True
[build_requires]
[env]

ERROR: \Path\To\mypkg\test_package\conanfile.py: option 'shared' doesn't exist
Possible options are []

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
memshardedcommented, Aug 6, 2021

You added shared to your profile, that applies to the test_package/conanfile.py.

Options need to be prefixed with the package you want to target, in this case: hello:shared=True, otherwise, they will apply to the downstream consumer, in this case the test_package/conanfile.py one, that doesn’t define this option and then it fails as expected.

1reaction
memshardedcommented, Aug 6, 2021

Your conanfile.py didn’t declare a shared option.

For some reason, you are not correctly following the instructions you linked. If you read the recipe it will contain:

options = {"shared": [True, False]}
    default_options = {"shared": False}

It seems you removed it or something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rust - Failed to create package - Stack Overflow
So I'm curious how do I avoid that error in the future? rust_projects % cargo new hello_cargo error: Failed to create package `hello_cargo`...
Read more >
FatalError: Failed to create package file. - TechNet - Microsoft
I have a sharepoint site with lot of subsites. If I export the site/web with less contents, There is no problem in the...
Read more >
SQL7973 SQL Create Package Failed - IBM
When trying to use Operations Navigator, message SQL7973 "SQL Create Package CWBUNNAFBI in QGPL Failed" was received. Resolving The Problem.
Read more >
Failed to build package - Ask Ubuntu
I run into a problem trying to build a package. Everything is OK except adding icon - I added this to rules file...
Read more >
Error when trying to create unlocked package version in full ...
You need to create packages and package versions in a Dev Hub-enabled org, which must be a production or Developer Edition org.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found