conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.24k stars 980 forks source link

[question] Locally built package not found #12706

Closed ckearney-nitro closed 5 months ago

ckearney-nitro commented 1 year ago

Conan can't find a locally build package. I had no errors when running conan create. Not sure if I am using the correct hash for the requires parameter.

So I have built the package locally and can see the contents in this folder. C:\Users\ckearney\.conan\data\cef\106.1.0+g30ad805\nitro\docker\package\d23a10e4a9236fc851c01354c5bb71c139236b0e

In my app, I have a conanfile that requires the package: self.requires("cef/106.1.0+g30ad805@nitro/docker#d23a10e4a9236fc851c01354c5bb71c139236b0e")

When trying to build my app. Not being able to find it in the remote is expected. However it should of found it in the local cache.

cef/106.1.0+g30ad805@nitro/docker: Not found in local cache, looking in remotes...
cef/106.1.0+g30ad805@nitro/docker: Trying with 'conancenter'...
ERROR: Failed requirement 'cef/106.1.0+g30ad805@nitro/docker' from 'conanfile.py'
ERROR: Unable to find 'cef/106.1.0+g30ad805@nitro/docker#d23a10e4a9236fc851c01354c5bb71c139236b0e' in remotes

Here are some commands trying to look for the package, I wasn't sure when to use the @ so I did it for both:

cef/106.1.0+g30ad805@nitro/docker

PS C:\repos\nitroapp> conan search cef/106.1.0+g30ad805@ ERROR: Recipe not found: 'cef/106.1.0+g30ad805'


- info

PS C:\repos\nitroapp> conan info cef/106.1.0+g30ad805
ERROR: Conanfile not found at C:\repos\nitroapp\cef\106.1.0+g30ad805

PS C:\repos\nitroapp> conan info cef/106.1.0+g30ad805@ cef/106.1.0+g30ad805: Not found in local cache, looking in remotes... cef/106.1.0+g30ad805: Trying with 'nitro'... cef/106.1.0+g30ad805: Trying with 'conancenter'... ERROR: Unable to find 'cef/106.1.0+g30ad805' in remotes


- inspect

PS C:\repos\nitroapp> conan inspect cef/106.1.0+g30ad805@ cef/106.1.0+g30ad805: Not found in local cache, looking in remotes... cef/106.1.0+g30ad805: Trying with 'nitro'... cef/106.1.0+g30ad805: Trying with 'conancenter'... ERROR: Unable to find 'cef/106.1.0+g30ad805' in remotes

PS C:\repos\nitroapp> conan inspect cef/106.1.0+g30ad805 cef/106.1.0+g30ad805: Not found in local cache, looking in remotes... cef/106.1.0+g30ad805: Trying with 'nitro'... cef/106.1.0+g30ad805: Trying with 'conancenter'... ERROR: Unable to find 'cef/106.1.0+g30ad805' in remotes


Conan version: 1.54 - Configuration:

[settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=Visual Studio compiler.runtime=MD compiler.toolset=v143 compiler.version=17 os=Windows os_build=Windows [options] [build_requires] [env]



- [x] I've read the [CONTRIBUTING guide](https://github.com/conan-io/conan/blob/develop/.github/CONTRIBUTING.md).
ckearney-nitro commented 1 year ago

Also sometimes it works when I update the confile to this: self.requires("cef/106.1.0+g30ad805@nitro/docker")

Then I get this when building my app: cef/106.1.0+g30ad805@nitro/docker from local cache - No remote

memsharded commented 1 year ago

Hi @ckearney-nitro

That is certainly weird, thanks for the detailed report and the experiments. Could you please share the full output of the conan create of the cef package, followed by the invocations of the other commands, but please, you need to add the cef/version@nitro/docker, if you created the package with the nitro/docker user and channel.

ckearney-nitro commented 1 year ago

Hello @memsharded

Thansk for getting back to me so quick.

The create command: conan create . nitro/docker -s compiler.version=17 -s compiler.toolset=v143

Exporting package recipe
cef/106.1.0+g30ad805@nitro/docker exports: Copied 1 '.md' file: LICENSE.md
cef/106.1.0+g30ad805@nitro/docker exports_sources: Copied 1 '.txt' file: CMakeLists.txt
cef/106.1.0+g30ad805@nitro/docker: A new conanfile.py version was exported
cef/106.1.0+g30ad805@nitro/docker: Folder: C:\Users\ckearney\.conan\data\cef\106.1.0+g30ad805\nitro\docker\export
cef/106.1.0+g30ad805@nitro/docker: Using git commit as the recipe revision: 9ebd0edafc8728481c78156431492f0f0a20def2
cef/106.1.0+g30ad805@nitro/docker: Exported revision: 9ebd0edafc8728481c78156431492f0f0a20def2
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.toolset=v143
compiler.version=17
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

cef/106.1.0+g30ad805@nitro/docker: Forced build from source
cef/106.1.0+g30ad805@nitro/docker (test package): Installing package
Requirements
    cef/106.1.0+g30ad805@nitro/docker from local cache - Cache
Packages
    cef/106.1.0+g30ad805@nitro/docker:d23a10e4a9236fc851c01354c5bb71c139236b0e - Build

Installing (downloading, building) binaries...
cef/106.1.0+g30ad805@nitro/docker: Configuring sources in C:\Users\ckearney\.conan\data\cef\106.1.0+g30ad805\nitro\docker\source
cef/106.1.0+g30ad805@nitro/docker: Copying sources to build folder
cef/106.1.0+g30ad805@nitro/docker: Building your package in C:\Users\ckearney\.conan\data\cef\106.1.0+g30ad805\nitro\docker\build\d23a10e4a9236fc851c01354c5bb71c139236b0e
cef/106.1.0+g30ad805@nitro/docker: Generator cmake created conanbuildinfo.cmake
cef/106.1.0+g30ad805@nitro/docker: Aggregating env generators
cef/106.1.0+g30ad805@nitro/docker: Calling build()
cef/106.1.0+g30ad805@nitro/docker: Downloading CEF prebuilts from cef-builds.spotifycdn.com
Downloading cef.tar.bz2 completed [252052.86k]

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.34.31935.0
-- The CXX compiler identification is MSVC 19.34.31935.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: Skipping compiler check: Declared 'compiler.toolset'
-- CMAKE_VERSION = 3.21.2
-- CMAKE_GENERATOR = Visual Studio 17 2022
-- MOUDLE PATH: source_subfolder/cmake
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DATAROOTDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR
    CONAN_COMPILER_VERSION

-- Build files have been written to: C:/Users/ckearney/.conan/data/cef/106.1.0+g30ad805/nitro/docker/build/d23a10e4a9236fc851c01354c5bb71c139236b0e/build_subfolder
MSBuild version 17.4.0+18d5aef85 for .NET Framework
  Checking Build System
  Building Custom Rule C:/Users/ckearney/.conan/data/cef/106.1.0+g30ad805/nitro/docker/build/d23a10e4a9236fc851c01354c5bb71c139236b0e/source_subfolder/libcef_dll/CMakeLists.txt
  shutdown_checker.cc
  transfer_util.cc
  cef_atomic_flag.cc
  cef_callback_helpers.cc
  cef_callback_internal.cc
  cef_lock.cc
  cef_lock_impl.cc
  cef_logging.cc
  cef_ref_counted.cc
  cef_thread_checker_impl.cc
  cef_weak_ptr.cc
  accessibility_handler_cpptoc.cc
  app_cpptoc.cc
  audio_handler_cpptoc.cc
  base_ref_counted_cpptoc.cc
  base_scoped_cpptoc.cc
  browser_process_handler_cpptoc.cc
  client_cpptoc.cc
  command_handler_cpptoc.cc
  completion_callback_cpptoc.cc
  context_menu_handler_cpptoc.cc
  cookie_access_filter_cpptoc.cc
  cookie_visitor_cpptoc.cc
  delete_cookies_callback_cpptoc.cc
  dev_tools_message_observer_cpptoc.cc
  dialog_handler_cpptoc.cc
  display_handler_cpptoc.cc
  domvisitor_cpptoc.cc
  download_handler_cpptoc.cc
  download_image_callback_cpptoc.cc
  drag_handler_cpptoc.cc
  end_tracing_callback_cpptoc.cc
  extension_handler_cpptoc.cc
  find_handler_cpptoc.cc
  focus_handler_cpptoc.cc
  frame_handler_cpptoc.cc
  jsdialog_handler_cpptoc.cc
  keyboard_handler_cpptoc.cc
  life_span_handler_cpptoc.cc
  load_handler_cpptoc.cc
  media_observer_cpptoc.cc
  media_route_create_callback_cpptoc.cc
  media_sink_device_info_callback_cpptoc.cc
  menu_model_delegate_cpptoc.cc
  navigation_entry_visitor_cpptoc.cc
  pdf_print_callback_cpptoc.cc
  permission_handler_cpptoc.cc
  print_handler_cpptoc.cc
  read_handler_cpptoc.cc
  render_handler_cpptoc.cc
  render_process_handler_cpptoc.cc
  request_context_handler_cpptoc.cc
  request_handler_cpptoc.cc
  resolve_callback_cpptoc.cc
  resource_bundle_handler_cpptoc.cc
  resource_handler_cpptoc.cc
  resource_request_handler_cpptoc.cc
  response_filter_cpptoc.cc
  run_file_dialog_callback_cpptoc.cc
  scheme_handler_factory_cpptoc.cc
  server_handler_cpptoc.cc
  set_cookie_callback_cpptoc.cc
  string_visitor_cpptoc.cc
  task_cpptoc.cc
  urlrequest_client_cpptoc.cc
  v8accessor_cpptoc.cc
  v8array_buffer_release_callback_cpptoc.cc
  v8handler_cpptoc.cc
  v8interceptor_cpptoc.cc
  write_handler_cpptoc.cc
  test_server_handler_cpptoc.cc
  translator_test_ref_ptr_client_child_cpptoc.cc
  translator_test_ref_ptr_client_cpptoc.cc
  translator_test_scoped_client_child_cpptoc.cc
  translator_test_scoped_client_cpptoc.cc
  browser_view_delegate_cpptoc.cc
  button_delegate_cpptoc.cc
  menu_button_delegate_cpptoc.cc
  panel_delegate_cpptoc.cc
  textfield_delegate_cpptoc.cc
  view_delegate_cpptoc.cc
  window_delegate_cpptoc.cc
  auth_callback_ctocpp.cc
  before_download_callback_ctocpp.cc
  binary_value_ctocpp.cc
  browser_ctocpp.cc
  browser_host_ctocpp.cc
  callback_ctocpp.cc
  command_line_ctocpp.cc
  context_menu_params_ctocpp.cc
  cookie_manager_ctocpp.cc
  dictionary_value_ctocpp.cc
  domdocument_ctocpp.cc
  domnode_ctocpp.cc
  download_item_callback_ctocpp.cc
  download_item_ctocpp.cc
  drag_data_ctocpp.cc
  extension_ctocpp.cc
  file_dialog_callback_ctocpp.cc
  frame_ctocpp.cc
  get_extension_resource_callback_ctocpp.cc
  image_ctocpp.cc
  jsdialog_callback_ctocpp.cc
  list_value_ctocpp.cc
  media_access_callback_ctocpp.cc
  media_route_ctocpp.cc
  media_router_ctocpp.cc
  media_sink_ctocpp.cc
  media_source_ctocpp.cc
  menu_model_ctocpp.cc
  navigation_entry_ctocpp.cc
  permission_prompt_callback_ctocpp.cc
  post_data_ctocpp.cc
  post_data_element_ctocpp.cc
  print_dialog_callback_ctocpp.cc
  print_job_callback_ctocpp.cc
  print_settings_ctocpp.cc
  process_message_ctocpp.cc
  registration_ctocpp.cc
  request_context_ctocpp.cc
  request_ctocpp.cc
  resource_bundle_ctocpp.cc
  resource_read_callback_ctocpp.cc
  resource_skip_callback_ctocpp.cc
  response_ctocpp.cc
  run_context_menu_callback_ctocpp.cc
  run_quick_menu_callback_ctocpp.cc
  scheme_registrar_ctocpp.cc
  select_client_certificate_callback_ctocpp.cc
  server_ctocpp.cc
  shared_memory_region_ctocpp.cc
  shared_process_message_builder_ctocpp.cc
  sslinfo_ctocpp.cc
  sslstatus_ctocpp.cc
  stream_reader_ctocpp.cc
  stream_writer_ctocpp.cc
  task_runner_ctocpp.cc
  thread_ctocpp.cc
  urlrequest_ctocpp.cc
  v8context_ctocpp.cc
  v8exception_ctocpp.cc
  v8stack_frame_ctocpp.cc
  v8stack_trace_ctocpp.cc
  v8value_ctocpp.cc
  value_ctocpp.cc
  waitable_event_ctocpp.cc
  x509cert_principal_ctocpp.cc
  x509certificate_ctocpp.cc
  xml_reader_ctocpp.cc
  zip_reader_ctocpp.cc
  test_server_connection_ctocpp.cc
  test_server_ctocpp.cc
  translator_test_ctocpp.cc
  translator_test_ref_ptr_library_child_child_ctocpp.cc
  translator_test_ref_ptr_library_child_ctocpp.cc
  translator_test_ref_ptr_library_ctocpp.cc
  translator_test_scoped_library_child_child_ctocpp.cc
  translator_test_scoped_library_child_ctocpp.cc
  translator_test_scoped_library_ctocpp.cc
  box_layout_ctocpp.cc
  browser_view_ctocpp.cc
  button_ctocpp.cc
  display_ctocpp.cc
  fill_layout_ctocpp.cc
  label_button_ctocpp.cc
  layout_ctocpp.cc
  menu_button_ctocpp.cc
  menu_button_pressed_lock_ctocpp.cc
  overlay_controller_ctocpp.cc
  panel_ctocpp.cc
  scroll_view_ctocpp.cc
  textfield_ctocpp.cc
  view_ctocpp.cc
  window_ctocpp.cc
  cef_byte_read_handler.cc
  cef_closure_task.cc
  cef_message_router.cc
  cef_resource_manager.cc
  cef_scoped_temp_dir.cc
  cef_stream_resource_handler.cc
  cef_xml_object.cc
  cef_zip_archive.cc
  libcef_dll_wrapper.cc
  libcef_dll_wrapper2.cc
  libcef_dll_wrapper.vcxproj -> C:\Users\ckearney\.conan\data\cef\106.1.0+g30ad805\nitro\docker\build\d23a10e4a9236fc851c01354c5bb71c139236b0e\build_subfolder\lib\libcef_dll_wrapper.lib
  Building Custom Rule C:/Users/ckearney/.conan/data/cef/106.1.0+g30ad805/nitro/docker/build/d23a10e4a9236fc851c01354c5bb71c139236b0e/CMakeLists.txt
cef/106.1.0+g30ad805@nitro/docker: Package 'd23a10e4a9236fc851c01354c5bb71c139236b0e' built
cef/106.1.0+g30ad805@nitro/docker: Build folder C:\Users\ckearney\.conan\data\cef\106.1.0+g30ad805\nitro\docker\build\d23a10e4a9236fc851c01354c5bb71c139236b0e
cef/106.1.0+g30ad805@nitro/docker: Generated conaninfo.txt
cef/106.1.0+g30ad805@nitro/docker: Generated conanbuildinfo.txt
cef/106.1.0+g30ad805@nitro/docker: Generating the package
cef/106.1.0+g30ad805@nitro/docker: Package folder C:\Users\ckearney\.conan\data\cef\106.1.0+g30ad805\nitro\docker\package\d23a10e4a9236fc851c01354c5bb71c139236b0e
cef/106.1.0+g30ad805@nitro/docker: Calling package()
cef/106.1.0+g30ad805@nitro/docker package(): Packaged 7 '.dll' files
cef/106.1.0+g30ad805@nitro/docker package(): Packaged 1 '.dat' file: icudtl.dat
cef/106.1.0+g30ad805@nitro/docker package(): Packaged 2 '.bin' files: snapshot_blob.bin, v8_context_snapshot.bin
cef/106.1.0+g30ad805@nitro/docker package(): Packaged 269 '.h' files
cef/106.1.0+g30ad805@nitro/docker package(): Packaged 1 '.txt' file: README-TRANSFER.txt
cef/106.1.0+g30ad805@nitro/docker package(): Packaged 2 '.lib' files: libcef.lib, libcef_dll_wrapper.lib
cef/106.1.0+g30ad805@nitro/docker package(): Packaged 58 '.pak' files
cef/106.1.0+g30ad805@nitro/docker: Package 'd23a10e4a9236fc851c01354c5bb71c139236b0e' created
cef/106.1.0+g30ad805@nitro/docker: Created package revision 1518474bf38dc6c3dbe49300a0a8333c
cef/106.1.0+g30ad805@nitro/docker (test package): Generator cmake created conanbuildinfo.cmake
cef/106.1.0+g30ad805@nitro/docker (test package): Generator txt created conanbuildinfo.txt
cef/106.1.0+g30ad805@nitro/docker (test package): Aggregating env generators
cef/106.1.0+g30ad805@nitro/docker (test package): Generated conaninfo.txt
cef/106.1.0+g30ad805@nitro/docker (test package): Generated graphinfo
cef/106.1.0+g30ad805@nitro/docker (test package) imports(): Copied 58 '.pak' files
cef/106.1.0+g30ad805@nitro/docker (test package) imports(): Copied 7 '.dll' files
cef/106.1.0+g30ad805@nitro/docker (test package) imports(): Copied 2 '.bin' files: snapshot_blob.bin, v8_context_snapshot.bin
cef/106.1.0+g30ad805@nitro/docker (test package) imports(): Copied 1 '.dat' file: icudtl.dat
Using lockfile: 'C:\repos\ext_libcef\test_package\build\0604aabe6e629c03843475eb400bed6bad3de816/conan.lock'
Using cached profile from lockfile
cef/106.1.0+g30ad805@nitro/docker (test package): Calling build()
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.34.31935.0
-- The CXX compiler identification is MSVC 19.34.31935.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: Skipping compiler check: Declared 'compiler.toolset'
-- Browser working test disabled.
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DATAROOTDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR
    CONAN_COMPILER_VERSION

-- Build files have been written to: C:/repos/ext_libcef/test_package/build/0604aabe6e629c03843475eb400bed6bad3de816
MSBuild version 17.4.0+18d5aef85 for .NET Framework
  Checking Build System
  Building Custom Rule C:/repos/ext_libcef/test_package/CMakeLists.txt
  simple_app.cc
  simple_handler.cc
  cefsimple_win.cc
  simple_handler_win.cc
  cefsimple.vcxproj -> C:\repos\ext_libcef\test_package\build\0604aabe6e629c03843475eb400bed6bad3de816\bin\cefsimple.exe
  Building Custom Rule C:/repos/ext_libcef/test_package/CMakeLists.txt
cef/106.1.0+g30ad805@nitro/docker (test package): Running test()
 *  Terminal will be reused by tasks, press any key to close it. 

Conan Commands:

memsharded commented 1 year ago

That is indeed surprising. Please try this in your system:

conan --version
conan new hello/0.1 -m=cmake_lib
conan create .
conan search hello/0.1@
conan info hello/0.1@
conan inspect hello/0.1@

Do you have any kind of antivirus that might be removing or blocking files from your Conan cache? please have a look at your AV logs.

ckearney-nitro commented 1 year ago

version

PS C:\temp\conan_temp> conan --version
Conan version 1.54.0

new

PS C:\temp\conan_temp> conan new hello/0.1 -m=cmake_lib 
File saved: CMakeLists.txt
File saved: conanfile.py
File saved: include/hello.h
File saved: src/hello.cpp
File saved: test_package/CMakeLists.txt 
File saved: test_package/conanfile.py   
File saved: test_package/src/example.cpp

create

PS C:\temp\conan_temp> conan create .
Exporting package recipe
hello/0.1 exports_sources: Copied 1 '.txt' file: CMakeLists.txt
hello/0.1 exports_sources: Copied 1 '.cpp' file: hello.cpp     
hello/0.1 exports_sources: Copied 1 '.h' file: hello.h
hello/0.1: A new conanfile.py version was exported
hello/0.1: Folder: C:\Users\ckearney\.conan\data\hello\0.1\_\_\export
hello/0.1: Using the exported files summary hash as the recipe revision: bb4d07e0897a612e65c02400af2276aa 
hello/0.1: Exported revision: bb4d07e0897a612e65c02400af2276aa
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]
[build_requires]
[env]

hello/0.1: Forced build from source
hello/0.1 (test package): Installing package
Requirements
    hello/0.1 from local cache - Cache
Packages
    hello/0.1:3fb49604f9c2f729b85ba3115852006824e72cab - Build

Installing (downloading, building) binaries...
hello/0.1: Configuring sources in C:\Users\ckearney\.conan\data\hello\0.1\_\_\source\.
hello/0.1: Copying sources to build folder
hello/0.1: Building your package in C:\Users\ckearney\.conan\data\hello\0.1\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab
hello/0.1: Generator txt created conanbuildinfo.txt
hello/0.1: Calling generate()
hello/0.1: 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
hello/0.1: Preset 'default' added to CMakePresets.json. Invoke it manually using 'cmake --preset default'
hello/0.1: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=C:\Users\ckearney\.conan\data\hello\0.1\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build\generators\conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW'
hello/0.1: Aggregating env generators
hello/0.1: Calling build()
hello/0.1: CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/Users/ckearney/.conan/data/hello/0.1/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/ckearney/.conan/data/hello/0.1/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\Users\ckearney\.conan\data\hello\0.1\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\."
-- Using Conan toolchain: C:/Users/ckearney/.conan/data/hello/0.1/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_POLICY_DEFAULT_CMP0091

-- Build files have been written to: C:/Users/ckearney/.conan/data/hello/0.1/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/build
hello/0.1: CMake command: cmake --build "C:\Users\ckearney\.conan\data\hello\0.1\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build" --config Release
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Building Custom Rule C:/Users/ckearney/.conan/data/hello/0.1/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/CMakeLists.txt
  hello.cpp
  hello.vcxproj -> C:\Users\ckearney\.conan\data\hello\0.1\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build\Release\hello.lib
  Building Custom Rule C:/Users/ckearney/.conan/data/hello/0.1/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/CMakeLists.txt
hello/0.1: Package '3fb49604f9c2f729b85ba3115852006824e72cab' built
hello/0.1: Build folder C:\Users\ckearney\.conan\data\hello\0.1\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build
hello/0.1: Generated conaninfo.txt
hello/0.1: Generated conanbuildinfo.txt
hello/0.1: Generating the package
hello/0.1: Package folder C:\Users\ckearney\.conan\data\hello\0.1\_\_\package\3fb49604f9c2f729b85ba3115852006824e72cab
hello/0.1: Calling package()
hello/0.1: CMake command: cmake --install "C:\Users\ckearney\.conan\data\hello\0.1\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build" --config Release --prefix "C:/Users/ckearney/.conan/data/hello/0.1/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab"
-- Installing: C:/Users/ckearney/.conan/data/hello/0.1/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab/lib/hello.lib
-- Installing: C:/Users/ckearney/.conan/data/hello/0.1/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab/include/hello.h
hello/0.1 package(): Packaged 1 '.h' file: hello.h
hello/0.1 package(): Packaged 1 '.lib' file: hello.lib
hello/0.1: Package '3fb49604f9c2f729b85ba3115852006824e72cab' created
hello/0.1: Created package revision 3a410364ce79ed0e95490a5a4bf92cc0
hello/0.1 (test package): Generator 'VirtualBuildEnv' calling 'generate()'
hello/0.1 (test package): Generator txt created conanbuildinfo.txt
hello/0.1 (test package): Generator 'VirtualRunEnv' calling 'generate()'
hello/0.1 (test package): 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
hello/0.1 (test package): Generator 'CMakeToolchain' calling 'generate()'
hello/0.1 (test package): Preset 'default' added to CMakePresets.json. Invoke it manually using 'cmake --preset default'
hello/0.1 (test package): If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=C:\temp\conan_temp\test_package\build\generators\conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW'
hello/0.1 (test package): 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
hello/0.1 (test package): Generator 'CMakeDeps' calling 'generate()'
hello/0.1 (test package): Aggregating env generators
hello/0.1 (test package): Generated conaninfo.txt
hello/0.1 (test package): Generated graphinfo
Using lockfile: 'C:\temp\conan_temp\test_package\build\generators/conan.lock'
Using cached profile from lockfile
hello/0.1 (test package): Calling build()
hello/0.1 (test package): CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/temp/conan_temp/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\temp\conan_temp\test_package\."
-- Using Conan toolchain: C:/temp/conan_temp/test_package/build/generators/conan_toolchain.cmake
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'hello::hello'
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_POLICY_DEFAULT_CMP0091

hello/0.1 (test package): CMake command: cmake --build "C:\temp\conan_temp\test_package\build" --config Release
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Building Custom Rule C:/temp/conan_temp/test_package/CMakeLists.txt
  example.cpp
     Creating library C:/temp/conan_temp/test_package/build/Release/example.lib and object C:/temp/conan_temp/test_package/build/Release/example.exp
  example.vcxproj -> C:\temp\conan_temp\test_package\build\Release\example.exe
  Building Custom Rule C:/temp/conan_temp/test_package/CMakeLists.txt
hello/0.1 (test package): Running test()
hello/0.1: Hello World Release!
  hello/0.1: _M_X64 defined
  hello/0.1: _MSC_VER1929
  hello/0.1: __cplusplus199711

search

PS C:\temp\conan_temp> conan search hello/0.1@
Existing packages for recipe hello/0.1:

    Package_ID: 3fb49604f9c2f729b85ba3115852006824e72cab
        [options]
            shared: False
        [settings]
            arch: x86_64
            build_type: Release
            compiler: Visual Studio
            compiler.runtime: MD
            compiler.version: 16
            os: Windows
        Outdated from recipe: False

info

PS C:\temp\conan_temp> conan info hello/0.1@
hello/0.1
    ID: 3fb49604f9c2f729b85ba3115852006824e72cab
    BuildID: None
    Context: host
    Remote: None
    URL: <Package recipe repository url here, for issues about the package>
    License: <Put the package license here>
    Author: <Put your name here> <And your email here>
    Description: <Description of Hello here>
    Topics: <Put some tag here>, <here>, <and here>
    Provides: hello
    Recipe: Cache
    Revision: bb4d07e0897a612e65c02400af2276aa
    Package revision: 3a410364ce79ed0e95490a5a4bf92cc0
    Binary: Cache
    Binary remote: None
    Creation date: 2022-12-14 13:43:27 UTC

inspect

PS C:\temp\conan_temp> conan inspect hello/0.1@
name: hello
version: 0.1
url: <Package recipe repository url here, for issues about the package>
homepage: None
license: <Put the package license here>
author: <Put your name here> <And your email here>
description: <Description of Hello here>
topics: ('<Put some tag here>', '<here>', '<and here>')
generators: ['txt']
exports: None
exports_sources: ('CMakeLists.txt', 'src/*', 'include/*')
short_paths: False
apply_env: True
build_policy: None
revision_mode: hash
settings: ('os', 'compiler', 'build_type', 'arch')
options:
    fPIC: [True, False]
    shared: [True, False]
default_options:
    fPIC: True
    shared: False
deprecated: None

Extra notes

I also tried add in the hello package to my app as the search, info, inspect all worked self.requires("hello/0.1#3fb49604f9c2f729b85ba3115852006824e72cab")

Sample output from app when including hello:

hello/0.1: Not found in local cache, looking in remotes...
hello/0.1: Trying with 'nitro'...
hello/0.1: Trying with 'conancenter'...
ERROR: Failed requirement 'hello/0.1' from 'conanfile.py'
ERROR: Unable to find 'hello/0.1#3fb49604f9c2f729b85ba3115852006824e72cab' in remotes

I then tried one of the commands again, and I get this:

PS C:\repos\nitroapp> conan inspect hello/0.1@
hello/0.1: Not found in local cache, looking in remotes...
hello/0.1: Trying with 'nitro'...
hello/0.1: Trying with 'conancenter'...

It seems that after running install with my app, the locally created packages seem to disappear.

The conan command I use for my app is: conan install C:/repos/nitroapp/conanfile.py -pr=C:/repos/nitroapp/build_profiles/conan/win_x86_64_release_2022 -g=cmake_multi --build=missing --update

The profie config for win_x86_64_release_2022:

[settings]
os=Windows
os_build=Windows
arch_build=x86_64
arch=x86_64
compiler=Visual Studio
compiler.version=17
compiler.toolset=v143
build_type=Release

I don't see my AV interacting with the conan files

memsharded commented 1 year ago

Uhm, interesting, it might be possible that there is something in your app conanfile.py that could be affecting? Could you please share your conanfile.py? If it has sensitive or private information, you can also send it to info@conan.io.

ckearney-nitro commented 1 year ago

I managed to get it working, I had to do two things:

memsharded commented 1 year ago

I am glad that you made it work :)

Used the recipe hash found in the packages conaninfo.txt for my apps conan file.

Oh I see it now. You were using the package_id (in this example 3fb49604f9c2f729b85ba3115852006824e72cab instead of the recipe revision. The recipe revision can be seen in:

hello/0.1: Exported revision: bb4d07e0897a612e65c02400af2276aa

And it is also visible with commands like conan search hello/0.1 --revisions. Using that hash instead of the package_id is what is necessary

Removed revision_mode from the packages conanfile.py ( I will add revision_mode back in when I have to upload my package to my conan remote and no longer require a local build). Maybe within conan there is some check failing when revision_mode is present and the conan package isn't associated with a remote?

I guess you mean you had revision_mode = "scm" in recipes? That shouldn't be a big issue, it should work mostly the same. Once the recipe_revision vs package_id has been clarified, this should work, let us know how it goes when you try to use it again.

memsharded commented 5 months ago

Closing this ticket as solved, don't hesitate to create new tickets if necessary for any further question.