On Thu, Aug 28, 2014 at 2:10 PM, Richard Shaw <[email protected]> wrote:
> This isn't unique to msys2, but to msys/mingw as well.
>
> Where are user compiled libraries supposed to go? I've ready warnings about
> NOT putting them with the libraries provided by msys/msys2/mingw/etc, but
> have not seen a straightforward solution.
>
> Maybe I'm just dense, but isn't that the whole point of /usr/local on a full
> *nix system?
>
> For instance, I'm using msys2 to build a program called FreeDV, it has a
> dependency provided by the same project called codec2. Perhaps in the long
> run I'll see about making official packages, but right now I just want to
> build them.
>
> Where should I "install" codec2?
>
> For now I'm cheating since I'm only building for 32bit windows and just
> created a C:/msys32/usr/local directory and it's worked OK so far, but
> really it needs to be mapped to /msys32/mingw32/usr/local and
> /msys32/mingw64/usr/local depending on which environment I'm running,
> correct?
>
> Can this be easily done through fstab or fstab.d?
>
I'd avoid fstab fiddling to be honest.
If I were building this software, I'd switch on the value of $(gcc
--dumpmachine) and setup a PREFIX variable, then pass that to
configure as --prefix=${PREFIX}, or if the project(s) don't use a
configure script then do the equiv for whatever build system they are
using.
/usr/local for *-pc-msys is best, /mingw32/local is best for
i686-w64-mingw32 and /mingw64/local is best for x86_64-w64-mingw32
One thing you will run into with MSYS2/MinGW-w64 programs that you
build is that $PREFIX often ends up baked into the executables in some
way and this can be harmful when the end user installs the programs in
a different location. For pure MSYS2 programs that are installed via
Pacman, this is not an issue, since the Cygwin POSIX layer catches all
file IO and relocates the paths dynamically, but obviously this
doesn't happen for MinGW-w64 packages. What we end up having to do is
to patch many programs to handle run-time relocation. Usually it's
quite simple and generally we re-use code from
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-pathtools
(which I'm happy to license under any license at all - even if it
states CC0 at present). This code's not perfect by any means (error
handling when out of memory, or when given dodgy input) but the idea
is that we'll improve and re-use it.
> Thanks,
> Richard
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Msys2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/msys2-users
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users