BUILD parameter causing error
See original GitHub issueI followed the docs here http://docs.conan.io/en/latest/howtos/vs2017_cmake.html to create a simple Visual Studio sdl2 project using SDL2/2.0.7@bincrafters/stable
It compiles and runs fine in x86 Debug, but any other configuration complained that there was no prebuilt package, and suggested I needed to try “–build SDL2”. I added the BUILD missing
parameter to the conan_cmake_run() line, but with this the error is more mysterious:
1> PROJECT: Installing D:/Dev/vs/sdlconancmake/conanfile.txt
1> Requirements
1> SDL2/2.0.7@bincrafters/stable from local
1> libiconv/1.15@bincrafters/stable from conan-center
1> Packages
1> SDL2/2.0.7@bincrafters/stable:dc9c05d50f7ee47ac10a455d7e592a61d7c75f59
1> libiconv/1.15@bincrafters/stable:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7
1>
1> libiconv/1.15@bincrafters/stable: Already installed!
1> ERROR: Error while trying to get recipe sources for SDL2/2.0.7@bincrafters/stable. No remote defined
The error is the same regardless if I do BUILD missing or BUILD SDL2
Complete CMakeLists.txt
project(Example CXX)
cmake_minimum_required(VERSION 3.8.0)
find_package(OpenGL)
# Download automatically, you can also just copy the conan.cmake file
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/v0.9/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()
include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(CONANFILE conanfile.txt
BASIC_SETUP CMAKE_TARGETS
BUILD SDL2)
set(exetype)
if(MSVC)
set(exetype WIN32)
endif(MSVC)
add_executable(example ${exetype} example.cpp)
target_link_libraries(example ${CONAN_LIBS} ${OPENGL_gl_LIBRARY})
conanfile.txt:
[requires]
SDL2/2.0.7@bincrafters/stable
[generators]
cmake
And example.cpp, contents are irrelevant.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Parameterising values causes error in powershell/msbuild ...
I have a powershell script that in turn calls msbuild.exe and runs it with a solution value and a parameters ...
Read more >Server 500 error from Jenkins when using build parameters
When attempting to run a build, which passes the projects to be upgraded as a build parameter, Jenkins returns a server 500 error....
Read more >If the job is parameterized but there are no parameters defined ...
After Jenkins 1.637, Job1 won't be triggered. This appears in Console Output. ERROR: Failed to build parameters to trigger project: Job1 java.
Read more >New C# 7 feature for out parameters causes project not to build
I find that using the new C# 7 feature for out parameters causes the project not to build with syntax errors. The errors...
Read more >The item was specified more than once in the sources parameter
The problem is caused by the precompilation of the views is occuring twice. There is a misconfiguration in .csproj file, the build targets...
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
Yes, you nailed it.
Windows case-insensitivenes is very problematic, specially when packages change name case, and this is the case, bincrafters decided to rename the package to lowercase. We have added a couple of checks in the codebase, IIRC mainly for conan-create, to fail fast and tell the user about the conflict. But those checks might be worth investigating if possible to apply them also for installs, I’ll check.
Of course, the typical workaround of switch off & on (in this case remove the cache files with
conan remove "*" -f
) should be enough.I assume this is the same type of problem as you already dealt with in https://github.com/conan-io/conan/issues/1557, so feel free to close.