Re: [hatari-devel] mingw-w64 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 21/09/2013 09:31, Christer Solskogen a écrit :
On Sat, Sep 21, 2013 at 8:26 AM, Christer Solskogen
<christer.solskogen@xxxxxxxxx> wrote:
The reason why I'm so certain that the problem is cmake is the fact
that cmake have no trouble finding libSDL. It finds libSDL even
without setting the hint.
Well, that does not necessarily proove anything. Native libSDL is
located in /usr with all others system wide libraries, so it seems quite
normal that cmake finds it here without requiring a "hint".
Heh, this is wierd.
If I use this:
SET (CMAKE_FIND_ROOT_PATH /opt/cross-mingw-w64/x86_64-w64-mingw32)
It works.
If I do like this:
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}/x86_64-w64-mingw32)
It does not work.
The difference between this are:
/opt/cross-mingw-w64/x86_64-w64-mingw32
/opt/cross-mingw-w64/bin/../../cross-mingw-w64/x86_64-w64-mingw32
And this is exactly the same directory.
But what does your "i686-w64-mingw32-gcc -print-sysroot" displays ? It
seems some symlinks were added when you compiled and/or installed mingw.
Maybe some bad parameters when running "./configure" before building mingw ?
So I worked it out like this:
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}/x86_64-w64-mingw32)
get_filename_component ( CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ABSOLUTE )
Does that work for you?
Yes it works, but it seems a better solution would be to remove the
symlinks in your installation. I think your mingw directories are messep
up. This is what I have :
ll /usr/i586-pc-mingw32/
drwxr-xr-x 2 root root 4096 mai 26 17:33 bin/
drwxr-xr-x 3 root root 4096 mai 26 17:33 lib/
drwxr-xr-x 3 root root 4096 janv. 12 2013 sys-root/
ll /usr/i586-pc-mingw32/bin/
-rwxr-xr-x 2 root root 616244 janv. 12 2013 ar*
-rwxr-xr-x 2 root root 1052764 janv. 12 2013 as*
-rwxr-xr-x 2 root root 637228 janv. 12 2013 dlltool*
-rwxr-xr-x 2 root root 845472 janv. 12 2013 ld*
-rwxr-xr-x 2 root root 599796 janv. 12 2013 nm*
-rwxr-xr-x 2 root root 759152 janv. 12 2013 objcopy*
-rwxr-xr-x 2 root root 1088632 janv. 12 2013 objdump*
-rwxr-xr-x 2 root root 616284 janv. 12 2013 ranlib*
-rwxr-xr-x 2 root root 759156 janv. 12 2013 strip*
ll /usr/i586-pc-mingw32/lib/
drwxr-xr-x 2 root root 4096 mai 26 17:33 ldscripts/
-rw-r--r-- 1 root root 633504 janv. 12 2013 libiberty.a
[npomarede@muon hatari-work]$ ll /usr/i586-pc-mingw32/sys-root/
total 4
drwxr-xr-x 6 root root 4096 janv. 12 2013 mingw/
ll /usr/i586-pc-mingw32/sys-root/mingw/
drwxr-xr-x 2 root root 4096 sept. 20 19:46 bin/
drwxr-xr-x 8 root root 12288 sept. 20 19:46 include/
drwxr-xr-x 3 root root 12288 sept. 20 19:46 lib/
drwxr-xr-x 6 root root 4096 sept. 20 19:44 share/
ll /usr/i586-pc-mingw32/sys-root/mingw/bin/
-rwxr-xr-x 1 root root 181815 févr. 17 2009 history.dll*
-rwxr-xr-x 1 root root 665549 déc. 10 2010 libpng12-0.dll*
-rwxr-xr-x 1 root root 2349 déc. 10 2010 libpng12-config*
-rwxr-xr-x 1 root root 665549 déc. 10 2010 libpng-3.dll*
lrwxrwxrwx 1 root root 15 sept. 20 19:46 libpng-config ->
libpng12-config*
-rwxr-xr-x 1 root root 41988 déc. 10 2010 libtermcap-0.dll*
-rwxr-xr-x 1 root root 32380 janv. 12 2013 mingwm10.dll*
-rwxr-xr-x 1 root root 565412 févr. 17 2009 readline.dll*
-rwxr-xr-x 1 root root 1320 sept. 20 19:44 sdl-config*
-rwxr-xr-x 1 root root 303616 sept. 20 19:44 SDL.dll*
-rwxr-xr-x 1 root root 71680 déc. 10 2010 zlib1.dll*
And mingw's gcc is in /usr/bin :
ll /usr/bin/i586-pc-mingw32-gcc
-rwxr-xr-x 2 root root 198636 janv. 12 2013 /usr/bin/i586-pc-mingw32-gcc*
/usr/bin/i586-pc-mingw32-gcc -print-sysroot
/usr/i586-pc-mingw32/sys-root