Menu

#245 Can't recognize configure script

2.0
closed
nobody
None
2016-03-08
2016-02-20
No

When building ffmpeg:

$ ./configure --enable-memalign-hack --arch=x86_64 --target_os=mingw64 --prefix=/mingw64 --enable-gpl --enable-nonfree --enable-shared --diable-static
Unknown option "--enable-memalign-hack".

$ ./configure --arch=x86_64 --target_os=mingw64 --prefix=/mingw64 --enable-gpl --enable-nonfree --enable-shared --diable-static
Unknown option "--arch=x86_64".

$ ./configure --target_os=mingw64 --prefix=/mingw64 --enable-gpl --enable-nonfree --enable-shared --diable-static
Unknown option "--target_os=mingw64".

$ ./configure --prefix=/mingw64 --enable-gpl --enable-nonfree --enable-shared --diable-static
Unknown option "--prefix=/mingw64".

$ ./configure
Unknown OS ''.

Tested with official 3.0 release and latest git clone.
Seems that sh can't recognize any flags with configure script, nor can it get the OS.
The configure script: http://git.videolan.org/?p=ffmpeg.git;a=blob_plain;f=configure;hb=HEAD

Software version: Windows 10 + MSYS2 20160205

Discussion

  • David Macek

    David Macek - 2016-02-20

    Oh wow, I thought the script was hung, but it was just doing everything in silence...

    Anyway, I downloaded ffmpeg-3.0.tar.xz (ffmpeg.org), ran mingw64 shell, ran tar -xf ffmpeg-3.0.tar.xz, cd ffmpeg-3.0, ./configure and I got a good-looking output after a while with Creating config.mak, config.h, and doc/config.texi... at the end.

    I have base-devel, mingw-w64-x86_64-toolchain (and various other) packages installed.

    Did you do anything differently (especially how you started your shell)?

     
    • Albert Chang

      Albert Chang - 2016-02-21

      I used mingw64_shell.bat. Reinstalled MSYS2 but still the same.
      I think the problem is with the toupper and tolower function.
      I wrote a test script.

      #!/bin/sh
      
      tolower(){
          echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
      }
      
      test1=$(uname -s)
      test2=$(tolower $(uname -s))
      echo $test1
      echo $test2
      echo $(tolower $(uname -s))
      

      Run on Linux:

      $ ./test
      Linux
      linux
      linux

      Run on MSYS2:

      $ ./test
      MINGW64_NT-10.0

      mingw64_nt-10.0

      Seems that if you store the result of the function in a variable then you can't get it again. This is really wired.

       

      Last edit: Albert Chang 2016-02-21
  • Albert Chang

    Albert Chang - 2016-02-21

    Reinstalled version 20150916 and there was no problem. The test script mentioned above worked well.

    $ ./test
    MINGW64_NT-10.0
    mingw64_nt-10.0
    mingw64_nt-10.0

    But after I ran update-core and reopened the shell, it couldn't work. So I suppose it's a BUG of the latest version.
    Update: Tried every version of msys2-runtime, found that the BUG began with version 2.4.0.16814.ac5d7ed-1. The last version with no problem is 2.4.0.16752.6eb10ef-1.

     

    Last edit: Albert Chang 2016-02-21
  • David Macek

    David Macek - 2016-02-22

    I'm running the latest 64-bit MSYS2 and have tested this on Windows Server 2012 R2.

    $ pacman -Ss msys2-runtime
    msys/msys2-runtime 2.4.1.16860.40c26fc-1 (base) [installed]
    
    1. Try restarting your computer.
    2. Did you follow the upgrade process? Especially the close everything part.
    3. Check if you're running anything from BLODA.
    4. Capture the output of strace bash -xv ./test and paste it somewhere (probably not directly into this discussion, but rather onto pastebin or similar).

    Seems related to https://sourceforge.net/p/msys2/discussion/general/thread/aa858e3e/.

     
  • Albert Chang

    Albert Chang - 2016-02-23

    Well it's the problem of MacType. Same as the issue you mentioned.
    Adding sh.exe (and perhaps bash.exe just in case) to the [UnloadDll] section of MacType config file fixes the problem.
    Thanks for you help!

     

    Last edit: Albert Chang 2016-02-23
  • David Macek

    David Macek - 2016-03-08
    • status: open --> closed
     
  • David Macek

    David Macek - 2016-03-08

    Happy to hear that. Closing.

     
MongoDB Logo MongoDB