[question] Managing multiple C++ packages within the same git repository
See original GitHub issue- I’ve read the CONTRIBUTING guide.
Version
Conan Version: 1.54.0
Summary
I have two projects using conanfile.py to manage their dependencies. Both are editable packages. Package B is dependent on Package A. Each time I try to install Package B, ($ conan install ...
), it fails. I checked the command’s logs and it looks like it is falling during or after (I can’t tell) trying to retrieve Package A. I am confused about what I am doing wrong here.
Could you please advise? If any more information is need (such as seeing the contents of the conanfile.py of each package) please let me know.
Directory Structure
.
|-- PackageA
|- conanfile.py
|-- PackageB
|- conanfile.py
Logs
$ conan install -pr release_141 .
DEBUG :conan_api.py [176]: INIT: Using config 'd:\.conan\.conan\conan.conf' [2022-11-12 20:59:51,409]
DEBUG :tracer.py [157]: CONAN_API: install(path=.,name=None,version=None,user=None,channel=None,settings=None,options=None,env=None,profile_names=['release_141'],conf=None,profile_build=ProfileData(profiles=None, settings=None, options=None, env=None, conf=None),remote_name=None,verify=None,manifests=None,manifests_interactive=None,build=None,update=False,generators=None,no_imports=False,install_folder=None,output_folder=None,lockfile=None,lockfile_out=None,require_overrides=None) [2022-11-12 20:59:51,411]
DEBUG :profile_loader.py[120]: PROFILE LOAD: d:\.conan\.conan\profiles\default [2022-11-12 20:59:51,413]
DEBUG :profile_loader.py[120]: PROFILE LOAD: d:\.conan\.conan\profiles\release_141 [2022-11-12 20:59:51,414]
DEBUG :profile_loader.py[120]: PROFILE LOAD: d:\.conan\.conan\profiles\default [2022-11-12 20:59:51,452]
Configuration:
[settings]
arch=x86
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MT
compiler.toolset=v141_xp
compiler.version=15
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
DEBUG :graph_builder.py[462]: GRAPH: new_node: PackageA/none@local/edit [2022-11-12 20:59:54,693]
DEBUG :graph_builder.py[462]: GRAPH: new_node: icu/58.3@inseinc/stable [2022-11-12 20:59:54,702]
DEBUG :graph_builder.py[462]: GRAPH: new_node: directx/9.0.0-2@inseinc/stable [2022-11-12 20:59:54,708]
DEBUG :graph_builder.py[462]: GRAPH: new_node: boost/1.71.0@conan/stable [2022-11-12 20:59:54,721]
DEBUG :graph_builder.py[462]: GRAPH: new_node: zlib/1.2.11@conan/stable [2022-11-12 20:59:54,728]
DEBUG :graph_builder.py[462]: GRAPH: new_node: bzip2/1.0.8@conan/stable [2022-11-12 20:59:54,736]
DEBUG :graph_builder.py[462]: GRAPH: new_node: cryptopp/5.6.5@inseinc/stable [2022-11-12 20:59:54,742]
DEBUG :graph_builder.py[462]: GRAPH: new_node: libb64/1.2.1-1@inseinc/stable [2022-11-12 20:59:54,748]
DEBUG :graph_builder.py[462]: GRAPH: new_node: mpir/2.7.0-2@inseinc/stable [2022-11-12 20:59:54,756]
DEBUG :graph_builder.py[462]: GRAPH: new_node: tinyxml/2.6.2@inseinc/stable [2022-11-12 20:59:54,762]
DEBUG :graph_builder.py[462]: GRAPH: new_node: xvid/1.3.7@inseinc/stable [2022-11-12 20:59:54,769]
DEBUG :graph_builder.py[69]: GRAPH: Time to load deps 0.07996344566345215 [2022-11-12 20:59:54,770]
DEBUG :graph_builder.py[462]: GRAPH: new_node: crc-calculator/1.0.1@inseinc/stable [2022-11-12 20:59:54,800]
conanfile.py (pal-core/12.2.25-alpha.9+git.5d89a8b): Installing package
Requirements
boost/1.71.0@conan/stable from 'inseinc' - Cache
bzip2/1.0.8@conan/stable from 'inseinc' - Cache
cryptopp/5.6.5@inseinc/stable from 'inseinc' - Cache
directx/9.0.0-2@inseinc/stable from 'inseinc' - Cache
icu/58.3@inseinc/stable from 'inseinc' - Cache
libb64/1.2.1-1@inseinc/stable from 'inseinc' - Cache
mpir/2.7.0-2@inseinc/stable from 'inseinc' - Cache
tinyxml/2.6.2@inseinc/stable from 'inseinc' - Cache
xvid/1.3.7@inseinc/stable from 'inseinc' - Cache
zlib/1.2.11@conan/stable from 'inseinc' - Cache
PackageA/none@local/edit from user folder - Editable
Python requires
version-calculator/1.5.0@inseinc/stable
Packages
boost/1.71.0@conan/stable:44aa2302561ce659d0e223e4bd316cf9d6030751 - Cache
bzip2/1.0.8@conan/stable:802bee0999b6305c4060a347404f0b86312d67d0 - Cache
cryptopp/5.6.5@inseinc/stable:d3fb7beef1deae181d55400b6e03fa5d5d5cf8cc - Cache
directx/9.0.0-2@inseinc/stable:63c5d5dc6eb958dab897e143053e17f583d55879 - Cache
icu/58.3@inseinc/stable:4803f0b3235c36c19a969902b9cf47ed10cdec17 - Cache
libb64/1.2.1-1@inseinc/stable:d3fb7beef1deae181d55400b6e03fa5d5d5cf8cc - Cache
mpir/2.7.0-2@inseinc/stable:d3fb7beef1deae181d55400b6e03fa5d5d5cf8cc - Cache
tinyxml/2.6.2@inseinc/stable:d3fb7beef1deae181d55400b6e03fa5d5d5cf8cc - Cache
xvid/1.3.7@inseinc/stable:d3fb7beef1deae181d55400b6e03fa5d5d5cf8cc - Cache
zlib/1.2.11@conan/stable:d3fb7beef1deae181d55400b6e03fa5d5d5cf8cc - Cache
PackageA/none@local/edit:cb989ff2423724a8585c9b30595c6898909e5b6a - Editable
Build requirements
crc-calculator/1.0.1@inseinc/stable from 'inseinc' - Cache
Build requirements packages
crc-calculator/1.0.1@inseinc/stable:11e6a84a7894f41df553e7c92534c3bf26896802 - Cache
Cross-build from 'Windows:x86_64' to 'Windows:x86'
Installing (downloading, building) binaries...
bzip2/1.0.8@conan/stable: Already installed!
crc-calculator/1.0.1@inseinc/stable: Already installed!
cryptopp/5.6.5@inseinc/stable: Already installed!
directx/9.0.0-2@inseinc/stable: Already installed!
icu/58.3@inseinc/stable: Already installed!
libb64/1.2.1-1@inseinc/stable: Already installed!
mpir/2.7.0-2@inseinc/stable: Already installed!
tinyxml/2.6.2@inseinc/stable: Already installed!
xvid/1.3.7@inseinc/stable: Already installed!
zlib/1.2.11@conan/stable: Already installed!
boost/1.71.0@conan/stable: Already installed!
boost/1.71.0@conan/stable: LIBRARIES: ['libboost_wave', 'libboost_container', 'libboost_contract', 'libboost_exception', 'libboost_graph', 'libboost_iostreams', 'libboost_locale', 'libboost_log', 'libboost_program_options', 'libboost_random', 'libboost_regex', 'libboost_serialization', 'libboost_wserialization', 'libboost_coroutine', 'libboost_fiber', 'libboost_context', 'libboost_timer', 'libboost_thread', 'libboost_chrono', 'libboost_date_time', 'libboost_atomic', 'libboost_filesystem', 'libboost_system', 'libboost_type_erasure', 'libboost_log_setup', 'libboost_math_c99', 'libboost_math_c99f', 'libboost_math_c99l', 'libboost_math_tr1', 'libboost_math_tr1f', 'libboost_math_tr1l', 'libboost_stacktrace_noop', 'libboost_stacktrace_windbg', 'libboost_stacktrace_windbg_cached', 'libboost_unit_test_framework']
boost/1.71.0@conan/stable: Package folder: d:\.conan\a8b182\1
boost/1.71.0@conan/stable: Disabled magic autolinking (smart and magic decisions)
PackageA/none@local/edit: Applying build-requirement: crc-calculator/1.0.1@inseinc/stable
PackageA/none@local/edit: Rewriting files of editable package 'PackageA' at 'D:\Git\Frameworks\Library\build/PackageA/generated'
PackageA/none@local/edit: Generator txt created conanbuildinfo.txt
PackageA/none@local/edit: Calling generate()
PackageA/none@local/edit: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
PackageA/none@local/edit: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
PackageA/none@local/edit: MSBuildToolchain created conantoolchain_release_v141_win32.props
PackageA/none@local/edit: MSBuildToolchain writing conantoolchain.props
INFO :runners.py [87]: Calling command: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -format json -legacy -nologo > "C:\Users\KAREL~1.DEH\AppData\Local\Temp\tmp_zu9yi1c\output" [2022-11-12 20:59:55,025]
INFO :runners.py [90]: Return code: 0 [2022-11-12 20:59:55,157]
INFO :runners.py [98]: Output: in file:[
{
"instanceId": "15c7e559",
"installDate": "2021-08-03T15:01:39Z",
"installationName": "VisualStudio/15.9.51+33027.88",
"installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional",
"installationVersion": "15.9.33027.88",
"productId": "Microsoft.VisualStudio.Product.Professional",
"productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\devenv.exe",
"state": 4294967295,
"isComplete": true,
"isLaunchable": true,
"isPrerelease": false,
"isRebootRequired": false,
"displayName": "Visual Studio Professional 2017",
"description": "Professional developer tools and services for small teams",
"channelId": "VisualStudio.15.Release",
"channelPath": "C:\\Users\\xyz\\AppData\\Local\\Microsoft\\VisualStudio\\Packages\\_Channels\\4CB340F5\\install_catalog.json",
"channelUri": "https://aka.ms/vs/15/release/channel",
"enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
"installChannelUri": "\\\\WSUSBUR\\vs2k17$\\ChannelManifest.json",
"layoutPath": "\\\\WSUSBUR\\vs2k17$",
"releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660692#15.9.51",
"thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660708",
"updateDate": "2022-11-12T18:55:44.7601719Z",
"catalog": {
"buildBranch": "d15.9",
"buildVersion": "15.9.33027.88",
"id": "VisualStudio/15.9.51+33027.88",
"localBuild": "build-lab",
"manifestName": "VisualStudio",
"manifestType": "installer",
"productDisplayVersion": "15.9.51",
"productLine": "Dev15",
"productLineVersion": "2017",
"productMilestone": "RTW",
"productMilestoneIsPreRelease": "False",
"productName": "Visual Studio",
"productPatchVersion": "51",
"productPreReleaseMilestoneSuffix": "1.0",
"productRelease": "RTW",
"productSemanticVersion": "15.9.51+33027.88",
"requiredEngineVersion": "1.18.1063.29791"
},
"properties": {
"campaignId": "",
"channelManifestId": "VisualStudio.15.Release/15.9.51+33027.88",
"nickname": "",
"setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"
}
},
{
"instanceId": "VisualStudio.14.0",
"installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\",
"installationVersion": "14.0"
},
{
"instanceId": "VisualStudio.12.0",
"installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\",
"installationVersion": "12.0"
},
{
"instanceId": "VisualStudio.10.0",
"installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\",
"installationVersion": "10.0"
}
]
stdout: None
stderr:b'' [2022-11-12 20:59:55,171]
INFO :runners.py [87]: Calling command: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -format json -products * -nologo > "C:\Users\KAREL~1.DEH\AppData\Local\Temp\tmplyghz5fl\output" [2022-11-12 20:59:55,183]
INFO :runners.py [90]: Return code: 0 [2022-11-12 20:59:55,281]
INFO :runners.py [98]: Output: in file:[
{
"instanceId": "15c7e559",
"installDate": "2021-08-03T15:01:39Z",
"installationName": "VisualStudio/15.9.51+33027.88",
"installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional",
"installationVersion": "15.9.33027.88",
"productId": "Microsoft.VisualStudio.Product.Professional",
"productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\devenv.exe",
"state": 4294967295,
"isComplete": true,
"isLaunchable": true,
"isPrerelease": false,
"isRebootRequired": false,
"displayName": "Visual Studio Professional 2017",
"description": "Professional developer tools and services for small teams",
"channelId": "VisualStudio.15.Release",
"channelPath": "C:\\Users\\xyz\\AppData\\Local\\Microsoft\\VisualStudio\\Packages\\_Channels\\4CB340F5\\install_catalog.json",
"channelUri": "https://aka.ms/vs/15/release/channel",
"enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
"installChannelUri": "\\\\WSUSBUR\\vs2k17$\\ChannelManifest.json",
"layoutPath": "\\\\WSUSBUR\\vs2k17$",
"releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660692#15.9.51",
"thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660708",
"updateDate": "2022-11-12T18:55:44.7601719Z",
"catalog": {
"buildBranch": "d15.9",
"buildVersion": "15.9.33027.88",
"id": "VisualStudio/15.9.51+33027.88",
"localBuild": "build-lab",
"manifestName": "VisualStudio",
"manifestType": "installer",
"productDisplayVersion": "15.9.51",
"productLine": "Dev15",
"productLineVersion": "2017",
"productMilestone": "RTW",
"productMilestoneIsPreRelease": "False",
"productName": "Visual Studio",
"productPatchVersion": "51",
"productPreReleaseMilestoneSuffix": "1.0",
"productRelease": "RTW",
"productSemanticVersion": "15.9.51+33027.88",
"requiredEngineVersion": "1.18.1063.29791"
},
"properties": {
"campaignId": "",
"channelManifestId": "VisualStudio.15.Release/15.9.51+33027.88",
"nickname": "",
"setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"
}
}
]
stdout: None
stderr:b'' [2022-11-12 20:59:55,293]
PackageA/none@local/edit: Aggregating env generators
PackageA/none@local/edit: Generated toolchain
PackageA/none@local/edit: Generated conan.lock
PackageA/none@local/edit imports(): Copied 1 '.exe' file: CrcCalculator.exe
PackageA/none@local/edit: Copied 1 '.exe' file: CrcCalculator.exe
Traceback (most recent call last):
File "conans\client\command.py", line 2216, in run
File "conans\client\command.py", line 539, in install
File "conans\client\conan_api.py", line 93, in wrapper
File "conans\client\conan_api.py", line 625, in install
File "conans\client\manager.py", line 127, in deps_install
File "conans\client\generators\__init__.py", line 160, in write_generators
File "conans\client\generators\__init__.py", line 233, in _receive_conf
AttributeError: 'list' object has no attribute 'direct_build'
ERROR: 'list' object has no attribute 'direct_build'
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Feature request: Store multiple registered packages in a ...
Currently, a single Git repository can only contain one registered package, which must live in the top folder of the Git repository.
Read more >How do I allow 2 people to work on the same local copy of a ...
To start, just have everyone install git, and run that clone command locally. git clone http://repo.com/username/repo ~/clones/projectname . By telling them ...
Read more >Managing multiple interdependent git repositories
Submodules let you include a link to one Git repo inside another, so that you can populate the whole dependency graph at once....
Read more >Multi-repo Support in Visual Studio - Microsoft Developer Blogs
Use multiple Git repositories at once? Visual Studio 2022 has you covered! In this blog learn about the new support for using multi-repos....
Read more >Git and Project Dependencies | Atlassian Git Tutorial
Consider the following questions. How do you handle project dependencies with git ? Our project is made up of multiple inter-dependent repositories.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Trying a fix in https://github.com/conan-io/conan/pull/12529, for next 1.55
Wonderful. I will await v1.55.x for the fix