Bug 509940
Summary: | Cmake can't build sdl program with mingw32 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dennis Payne <dulsi> | ||||
Component: | cmake | Assignee: | Orion Poplawski <orion> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 12 | CC: | erik-fedora, fedora-mingw, orion, pbonzini, pertusus, rdieter, rjones | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-12-05 06:44:56 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Are you sure you have the package mingw32-SDL installed? mingw32-sdl is installed. Here is part of rpm -qi mingw32-SDL. Name : mingw32-SDL Relocations: (not relocatable) Version : 1.2.13 Vendor: Fedora Project If you look at FindSDL.cmake, you will see the FIND_PATH for SDL.h. It is search a bunch of paths but nothing that can be found from the root path /usr/i686-pc-mingw32. The cmake mailing list suggested adding /usr/i686-pc-mingw32/sys-root/mingw to the root path but the FIND_PATH in FindSDL.cmake isn't looking in /include/SDL so it still doesn't find it. It was mentioned that the FindSDL.cmake is using an old way to look for the appropriate include files. Not sure what the current suggested practice is. You should use FindPkgConfig.cmake. However, you will hit bugs 513924 and 513925. Actually, I'd bet that cmake does not look for i686-pc-mingw32-pkg-config (only pkg-config), so even fixing 513925 would not help you; you would have to hack something to use cross-compilation search paths (as hinted in bug 513925). Call it the revenge of the autotools. ;-) (In reply to comment #3) > Actually, I'd bet that cmake does not look for i686-pc-mingw32-pkg-config (only > pkg-config), so even fixing 513925 would not help you; you would have to hack > something to use cross-compilation search paths (as hinted in bug 513925). > Call it the revenge of the autotools. ;-) No, cmake works perfectly well. We build several packages using cmake just fine. Maybe using mingw32-cmake? Erik mentioned it but I didn't find it in my installation. As I wrote extensively in 513925, the need for special commands instead of "./configure --host=... && make" (or the cmake equivalent) is always the sign of a bug (either in the program's build system, or in Fedora). mingw32-cmake is only available in mingw32-filesystem-51-1.fc12 (or higher) so only rawhide I really have no clue about this. Have you asked on the cmake mailing list? I'm going to close this for now, feel free to reopen if you feel Fedora needs to make a distribution specific change to cmake. Installed fedora 12 in virtual-machine. Installed mingw32 files including mingw32-SDL and mingw32-filesystem. My original test still failed. Ran "mingw32-cmake ." which also failed. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++ -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.6) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: SDL_INCLUDE_DIR used as include directory in directory /home/dulsi/test -- Configuring incomplete, errors occurred! I did ask on the cmake list back when I reported this bug. They pointed me to the FindSDL cmake rules which explained why it would work. It would never look in the appropriate directory. I had hoped mingw32-cmake was built in a way that allowed it to work but it appears to not be the case. This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping The problem exists in Fedora 12. Haven't had a chance to test Fedora 13 yet. This message is a reminder that Fedora 12 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 12. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '12'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 12's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 12 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |
Created attachment 350708 [details] Simple cmake example using SDL Description of problem: When attempting to build an SDL program with mingw32, cmake fails to find the SDL library. It's possible that I haven't configured the toolchain file properly but asking on the cmake mailing list suggests that no configuration will work. Version-Release number of selected component (if applicable): How reproducible: Attached is a simple hello world program that fails to build the makefile with mingw. Steps to Reproduce: 1. Extract files 2. cmake -DCMAKE_TOOLCHAIN_FILE=./Toolchain-mingw32.cmake . Actual results: CMake Error at CMakeLists.txt:4 (message): SDL not found! Expected results: Makefile properly created