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.

BUILD parameter causing error

See original GitHub issue

I 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:open
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
memshardedcommented, Mar 17, 2018

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.

0reactions
TheJarecommented, Mar 16, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

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