make install on MinGW/MSYS doesn't like --prefix=/mingw
Asked Answered
B

2

6

I've begun using MinGW/MSYS in an attempt to use some Linux libraries on Windows. Using

./configure --prefix=/mingw 
make
make install

has worked well so far, but I've had two different libraries fail on 'make install', on an 'ln -s' call. It goes something like this:

rm -f /mingw/lib/libvamp-sdk.so.2
ln -s libvamp-sdk.so.2.0.0 /mingw/lib/libvamp-sdk.so.2
ln: creating symbolic link `/mingw/lib/libvamp-sdk.so.2' to `libvamp-sdk.so.2.0.0': No such file or directory
make: *** [install] Error 1

First of all, what is the intention of the makefile? /mingw/lib/libvamp-sdk.so.2.0.0 exists, so replacing the above 'ln -s' call with

ln -s /mingw/lib/libvamp-sdk.so.2.0.0 /mingw/lib/libvamp-sdk.so.2

will work, but I'm not sure if this is what the author had intended.

More importantly, why does this occur (I'm guessing it works fine on native Linux systems) and what's the easiest way to get around it? I could manually edit the makefile but I'm wondering if there's a better solution to this.

Many thanks for your input!

Boutte answered 17/9, 2009 at 16:13 Comment(3)
First thing, could you please do the steps separately so we can at least pinpoint where this is failing? My guess is it's on "make install". So instead of doing them all in one line with &&, just run each command separately, wait for it to finish, then enter the next.Obovoid
I actually did run the three steps separately. I just put them on one line with && while I was asking the question. In any case, I'm certain that the error occurs during make install. I've modified my question, sorry for the unnecessary confusion.Boutte
Sorry to not actually help a lot with the question, but why is it creating *.so's rather than *.dll's? Does configure recognize that you're on Windows? If it helps any, I believe "ln" with MSYS merely creates a copy of the file, rather than linking it (as linking really isn't supported on Windows). Also, in what directory is it, when it fails?Obovoid
H
3

You misconfigured your build: *.so files are for Linux, not Windows. You'll most likely need to add an option like --host=i686-pc-mingw32 to your configure invocation.

Haunted answered 16/7, 2011 at 9:41 Comment(0)
L
1

On linux systems, the unmodified

ln -s libvamp-sdk.so.2.0.0 /mingw/lib/libvamp-sdk.so.2

creates a relative symlink to make libvamp-sdk.so.2.0.0 available for programs which were linked to earlier or later instances of the library. However, this only makes sense when buildingfor .so-based systems.

For mingw builds, these lines are simply unnecessary because you build DLLs instead of shared libraries and the mechanism is different. These two lines can safely be deleted from the Makefile, just make sure the DLL and the libraries (libfoo.a and libfoo.dll.a) are installed, the former in /mingw/bin and the latter in /mingw/lib. You probably need to modify the Makefile for that.

Lancashire answered 16/7, 2011 at 9:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.