#21 MSYS2 configure creating empty Makefiles

1.0
closed
Alexx83
None
2015-02-04
2014-02-10
No

With Cygwin I can install these packages

setup-x86_64 -nqP gcc-core,make,wget

then configure a program

wget ftp://ftp.astron.com/pub/file/file-5.16.tar.gz
tar xf file-5.16.tar.gz
cd file-5.16
set 'git.savannah.gnu.org/gitweb?p=config.git;a=blob_plain;f='
wget -O config.guess "${1}config.guess"
wget -O config.sub "${1}config.sub"
./configure --build $MACHTYPE

Makefile will be made correctly

$ du Makefile
24      Makefile

However when I install MSYS2 packages

pacman -S gcc make tar wget

and run same commands I am getting empty Makefiles

$ du Makefile
0       Makefile

Discussion

  • Ray Donnelly

    Ray Donnelly - 2014-02-10

    Which stage when wrong? Is there some output you can show?

    After installing any MSYS2 packages (as opposed to the MinGW-w64 ones) it may be necessary to exit all MSYS2 shells and run autorebase.bat, as a matter of habit, I always run this when any MSYS2 packages are installed.

     
  • Steven Penny

    Steven Penny - 2014-02-10

    Here is a diff of the configure output from both.

    diff --git a/msys.txt b/cygwin.txt
    index ec8a103..97a030a 100644
    --- a/msys.txt
    +++ b/cygwin.txt
    @@ -9,2 +9,2 @@ checking for file formats in man section 5... no
    -checking build system type... x86_64-pc-msys
    -checking host system type... x86_64-pc-msys
    +checking build system type... x86_64-unknown-cygwin
    +checking host system type... x86_64-unknown-cygwin
    @@ -43 +43 @@ checking whether byte ordering is bigendian... no
    -checking whether ln -s works... no, using cp -p
    +checking whether ln -s works... yes
    @@ -46,2 +46,2 @@ checking for fgrep... /usr/bin/grep -F
    -checking for ld used by gcc -std=gnu99... /usr/x86_64-pc-msys/bin/ld.exe
    -checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
    +checking for ld used by gcc -std=gnu99... /usr/x86_64-pc-cygwin/bin/ld.exe
    +checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
    @@ -50 +50 @@ checking the name lister (/usr/bin/nm -B) interface... BSD nm
    -checking the maximum length of command line arguments... 24000
    +checking the maximum length of command line arguments... 8192
    @@ -53 +53 @@ checking whether the shell understands "+="... yes
    -checking for /usr/x86_64-pc-msys/bin/ld.exe option to reload object files... -r
    +checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
    @@ -55 +55 @@ checking for objdump... objdump
    -checking how to recognize dependent libraries... unknown
    +checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
    @@ -63,2 +63,2 @@ checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
    -checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
    -checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... no
    +checking for gcc -std=gnu99 option to produce PIC... -DDLL_EXPORT -DPIC
    +checking if gcc -std=gnu99 PIC flag -DDLL_EXPORT -DPIC works... yes
    @@ -68 +68 @@ checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
    -checking whether the gcc -std=gnu99 linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
    +checking whether the gcc -std=gnu99 linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
    @@ -70 +70 @@ checking whether -lc should be explicitly linked in... yes
    -checking dynamic linker characteristics... no
    +checking dynamic linker characteristics... Win32 ld.exe
    @@ -73,3 +73,3 @@ checking whether stripping libraries is possible... yes
    -checking if libtool supports shared libraries... no
    -checking whether to build shared libraries... no
    -checking whether to build static libraries... yes
    +checking if libtool supports shared libraries... yes
    +checking whether to build shared libraries... yes
    +checking whether to build static libraries... no
    
     
  • Steven Penny

    Steven Penny - 2014-02-10

    It looks like MSYS1 also works while MSYS2 does not, here is the diff

    diff --git a/msys2.txt b/msys1.txt
    old mode 100644
    new mode 100755
    index ec8a103..fd2faaf
    --- a/msys2.txt
    +++ b/msys1.txt
    @@ -1 +1 @@
    -checking for a BSD-compatible install... /usr/bin/install -c
    +checking for a BSD-compatible install... /bin/install -c
    @@ -3 +3 @@ checking whether build environment is sane... yes
    -checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    +checking for a thread-safe mkdir -p... /bin/mkdir -p
    @@ -9,2 +9,2 @@ checking for file formats in man section 5... no
    -checking build system type... x86_64-pc-msys
    -checking host system type... x86_64-pc-msys
    +checking build system type... i686-pc-msys
    +checking host system type... i686-pc-msys
    @@ -25,2 +25,2 @@ checking how to run the C preprocessor... gcc -std=gnu99 -E
    -checking for grep that handles long lines and -e... /usr/bin/grep
    -checking for egrep... /usr/bin/grep -E
    +checking for grep that handles long lines and -e... /bin/grep
    +checking for egrep... /bin/grep -E
    @@ -44,7 +44,7 @@ checking whether ln -s works... no, using cp -p
    -checking for a sed that does not truncate output... /usr/bin/sed
    -checking for fgrep... /usr/bin/grep -F
    -checking for ld used by gcc -std=gnu99... /usr/x86_64-pc-msys/bin/ld.exe
    -checking if the linker (/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
    -checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    -checking the name lister (/usr/bin/nm -B) interface... BSD nm
    -checking the maximum length of command line arguments... 24000
    +checking for a sed that does not truncate output... /bin/sed
    +checking for fgrep... /bin/grep -F
    +checking for ld used by gcc -std=gnu99... c:/mingw/mingw32/bin/ld.exe
    +checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
    +checking for BSD- or MS-compatible name lister (nm)... /mingw/bin/nm
    +checking the name lister (/mingw/bin/nm) interface... BSD nm
    +checking the maximum length of command line arguments... 262144
    @@ -53 +53 @@ checking whether the shell understands "+="... yes
    -checking for /usr/x86_64-pc-msys/bin/ld.exe option to reload object files... -r
    +checking for c:/mingw/mingw32/bin/ld.exe option to reload object files... -r
    @@ -59,2 +59,2 @@ checking for ranlib... ranlib
    -checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
    -checking for dlfcn.h... yes
    +checking command to parse /mingw/bin/nm output from gcc -std=gnu99 object... ok
    +checking for dlfcn.h... no
    @@ -68 +68 @@ checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
    -checking whether the gcc -std=gnu99 linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
    +checking whether the gcc -std=gnu99 linker (c:/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
    @@ -79,2 +79,8 @@ checking for ANSI C header files... (cached) yes
    -checking whether sys/types.h defines makedev... yes
    -checking for sys/wait.h that is POSIX.1 compatible... yes
    +checking whether sys/types.h defines makedev... no
    +checking sys/mkdev.h usability... no
    +checking sys/mkdev.h presence... no
    +checking for sys/mkdev.h... no
    +checking sys/sysmacros.h usability... no
    +checking sys/sysmacros.h presence... no
    +checking for sys/sysmacros.h... no
    +checking for sys/wait.h that is POSIX.1 compatible... no
    @@ -109,6 +115,6 @@ checking for getopt.h... yes
    -checking err.h usability... yes
    -checking err.h presence... yes
    -checking for err.h... yes
    -checking sys/mman.h usability... yes
    -checking sys/mman.h presence... yes
    -checking for sys/mman.h... yes
    +checking err.h usability... no
    +checking err.h presence... no
    +checking for err.h... no
    +checking sys/mman.h usability... no
    +checking sys/mman.h presence... no
    +checking for sys/mman.h... no
    @@ -142,2 +148,3 @@ checking for special C compiler options needed for large files... no
    -checking for _FILE_OFFSET_BITS value needed for large files... no
    -checking for _LARGEFILE_SOURCE value needed for large files... no
    +checking for _FILE_OFFSET_BITS value needed for large files... unknown
    +checking for _LARGE_FILES value needed for large files... unknown
    +checking for _LARGEFILE_SOURCE value needed for large files... unknown
    @@ -157 +164 @@ checking for getpagesize... yes
    -checking for working mmap... yes
    +checking for working mmap... no
    @@ -161,4 +168,2 @@ checking for vfork.h... no
    -checking for fork... yes
    -checking for vfork... yes
    -checking for working fork... yes
    -checking for working vfork... (cached) yes
    +checking for fork... no
    +checking for vfork... no
    @@ -168 +173 @@ checking for strerror... yes
    -checking for strndup... yes
    +checking for strndup... no
    @@ -170,3 +175,3 @@ checking for strtoul... yes
    -checking for mkstemp... yes
    -checking for mkostemp... yes
    -checking for utimes... yes
    +checking for mkstemp... no
    +checking for mkostemp... no
    +checking for utimes... no
    @@ -174 +179 @@ checking for utime... yes
    -checking for wcwidth... yes
    +checking for wcwidth... no
    @@ -177,8 +182,8 @@ checking for getopt_long... yes
    -checking for asprintf... yes
    -checking for vasprintf... yes
    -checking for strlcpy... yes
    -checking for strlcat... yes
    -checking for getline... yes
    -checking for ctime_r... yes
    -checking for asctime_r... yes
    -checking for pread... yes
    +checking for asprintf... no
    +checking for vasprintf... no
    +checking for strlcpy... no
    +checking for strlcat... no
    +checking for getline... no
    +checking for ctime_r... no
    +checking for asctime_r... no
    +checking for pread... no
    
     
  • Steven Penny

    Steven Penny - 2014-02-11
     
    Last edit: Steven Penny 2014-02-11
  • Steven Penny

    Steven Penny - 2014-02-11

    @Alexx83 thanks for the feedback, however I am still having the problem

    $ tar xf file-5.15.tar.gz
    
    $ cd file-5.15
    
    $ patch -p1 <../file-5.15-msys2.patch
    
    $ ./configure
    
    $ du Makefile
    0       Makefile
    
     
  • Alexx83

    Alexx83 - 2014-02-11

    I don't have your problem: http://pastebin.com/Eh344CNG
    Something wrong with your installation.

    Also in compare with MSYS1 I see you use mingw toolchain there not msys:

    -checking whether the gcc -std=gnu99 linker (/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... yes
    +checking whether the gcc -std=gnu99 linker (c:/mingw/mingw32/bin/ld.exe) supports shared libraries... yes

     
    Last edit: Alexx83 2014-02-11
  • Steven Penny

    Steven Penny - 2014-02-13

    After some research I found the issue.

    msys2-base-x86_64-20140205.tar.xz
    

    Contains hard links, example here

    $ tar tvf msys2-base-x86_64-20140205.tar.xz msys64/bin/gawk.exe
    hrwxr-xr-x alexey/None       0 2013-11-12 06:44 msys64/bin/gawk.exe link to msys64/bin/gawk-4.1.0.exe
    

    http://gnu.org/software/tar/manual/html_section/Portability#SEC141

    Now this is an issue for new users. 7-zip and others do not preserve these links
    when extracting, so you are left with 0 byte files for any hard links.

    http://superuser.com/q/413450/7-zip-archive-with-hard-links

    The only way to get a proper installation would be to install MSYS2, then
    extract the ".tar.xz" again properly using "tar". In my opinion either the hard
    links should be removed, or MSYS2 should be distributed as ".zip"

     
  • Alexx83

    Alexx83 - 2014-02-13

    I will upload new snapshots today. I just need use tar with "--dereference --hard-dereference" options.

     
  • Alexx83

    Alexx83 - 2014-02-13
    • assigned_to: Alexx83
     
  • Steven Penny

    Steven Penny - 2014-02-13

    @Alexx83 thanks!

     
  • Alexx83

    Alexx83 - 2014-02-16
    • status: open --> closed
     
  • Alexx83

    Alexx83 - 2014-02-16

    Fixed in snapshot from 20140216

     
  • Steven Penny

    Steven Penny - 2014-02-16

    @Alexx83 yes confirmed!

    $ tar tvf msys2-base-x86_64-20140216.tar.xz msys64/bin/gawk.exe
    -rwxr-xr-x alexey/None  555141 2013-11-12 06:44 msys64/bin/gawk.exe
    
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks