Web lists-archives.com

Re: [Mingw-users] MSYS on Windows - Setting Directories?

On Thu, Mar 3, 2016 at 6:39 PM, Domonic Tom <AbDomTom@xxxxxxxxxxx> wrote:

Keith.. Thanks for your reply.

I'm aware that I don't understand this.

When you read Keith's reply a month from now, you'll understand it contains correct info - you're
still too far in the dark, and it looks like your computer isn't cooperating.  Here's some output from my "most vanilla" mingw installation:

greg@Homerw7 ~
$ uname -a
MINGW32_NT-6.1 HOMERW7 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys

greg@Homerw7 ~
$ mount
E:\mingw\mingworg\msys\1.0 on /usr type user (binmode,noumount)
E:\mingw\mingworg\msys\1.0 on / type user (binmode,noumount)
D:\mingw\mingworg on /Dmingw type user (binmode)
E:\mingw\mingworg on /mingw type user (binmode)
D:\mingw\msys32 on /msysd type user (binmode)
C:\msys64 on /msysc type user (binmode)
D:\Temp on /tmp type user (binmode,noumount)
c: on /c type user (binmode,noumount)
d: on /d type user (binmode,noumount)
e: on /e type user (binmode,noumount)
f: on /f type user (binmode,noumount)
h: on /h type user (binmode,noumount)

greg@Homerw7 ~
$ cat /etc/fstab
E:\mingw\mingworg /mingw
D:\mingw\mingworg /Dmingw
D:/mingw/msys32 /msysd
C:/msys64 /msysc

greg@Homerw7 ~
$ cd c:/mingw

greg@Homerw7 /c/mingw
$ ls
MinGW how-to.htm  dll32-psxdw2  dll64-psxseh  pango

greg@Homerw7 /c/mingw
$ cd /mingw

greg@Homerw7 /mingw
$ ls -laF
total 360
drwxr-xr-x 14 greg Administrators   4096 Jan  7 14:33 ./
drwxr-xr-x 11 greg Administrators   4096 Jan  6 16:26 ../
-rw-r--r--  1 greg Administrators 146419 Jan  7 14:22 .MTREE
-rw-r--r--  1 greg Administrators    550 Jan  7 14:22 .PKGINFO
drwxr-xr-x  2 greg Administrators  65536 Jan  7 14:55 bin/
drwxr-xr-x  2 greg Administrators      0 Jan  7 14:33 doc/
drwxr-xr-x 14 greg Administrators  65536 Jan  7 14:55 include/
drwxr-xr-x 18 greg Administrators  81920 Jan  7 14:55 lib/
drwxr-xr-x  4 greg Administrators      0 Jan  6 16:23 libexec/
drwxr-xr-x  6 greg Administrators      0 Jan  6 16:24 mingw32/
drwxr-xr-x  6 greg Administrators      0 Jan  7 14:20 mingworg/
drwxr-xr-x  3 greg Administrators      0 Jan  6 16:23 msys/
drwxr-xr-x  6 greg Administrators      0 Jan  7 14:20 opt/
drwxr-xr-x  2 greg Administrators      0 Jan  7 14:31 pkg/
drwxr-xr-x 31 greg Administrators      0 Jan  7 14:55 share/
drwxr-xr-x  4 greg Administrators      0 Jan  6 16:14 var/

greg@Homerw7 /mingw
$ ls /usr
bin  etc  home  include  lib  m.ico  msys.bat  msys.ico  postinstall  sbin  share  var

You see, /usr directory (NOT /user) is buried two or three levels below the directory called /mingw,
in the msys section. If prefix= is not specified, the default is to assign /usr/local
to be the recipient of the "make install" command.
Basically, I'm trying to build all my dependencies for future use with other libraries.
And you should already have such a directory.  You can of course create more directories
so the libraries you create aren't mixed up with the  "factory issued" support directories.
I just made a test directory to see if the --prefix=c:/test_directory would end up containing headers and lib files .  Even if I do use the
--prefix command will this directory be searched the next time I build something and it needs dependencies?   
    No, there is nothing yet that tells gcc that anything special is kept in C:/test_directory.
So including -I/c/test_directory/include in CFLAGS and CXXFLAGS and also
-L/c/test_directory/lib in LDFLAGS will probably be called for.
The c:/test_directory ended up containing nothing after the following commands.  I tested this on building libjpeg
$ cd c:/libjpeg
$ ./configure --prefix=c:/test_directory
$ make
$ make install
I get the error below

$ make install
/bin/install -c cjpeg c:/test_directory/bin/cjpeg
/bin/install: cannot create regular file `c:/test_directory/bin/cjpeg.exe': No such file or directory
make: *** [install] Error 1

Your error looks like an error in creating a file. You probably have the permissions. If this is MSYS then you should be able to use /c/test_directory etc, and this may be an issue
in the configure or makefile, which are oriented to that lexicon for files.  
>From what you have said below I gather that all headers and lib files will be installed in the default directory somewhere in c:/mingw ?
Not automatically.  
I'm not sure what you mean by -I and -L are only used when you run gcc?   If so, how are they used?
To locate the extra directories.  GCC has it own set of directories to locate, for instance, stdlib.h,
and to link needed support libraries you don't have to worry about.   Configure will find more directories, when they are in standard locations, so you generally won't need -I/mingw/include
as a CFLAG, for instance.  If you want to shift them
You keep referring to user/local?     What is this?.  I have always operated on Windows and have never seen this directory.

/usr is a mount in support of MSYS. 
If you keep your nose clean and stick to mingw, you won't  have to look under msys/1.0 (where /usr
begins).  If you neglect to re-direct the install prefix then you should find files in /usr/local.

Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe