Git Product home page Git Product logo

Comments (13)

darkcharmander avatar darkcharmander commented on June 12, 2024 1

Sure thing. I am going to try to build with MinGW now as per your script. I will try Clang as well.

from cavif.

f11894 avatar f11894 commented on June 12, 2024 1

Try running the following command in powershell.

$env:MSYSTEM="MINGW64"
curl.exe -L -O https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe
.\msys2-base-x86_64-latest.sfx.exe x -y -o"."
.\msys64\usr\bin\bash -lc "pacman -S mingw-w64-x86_64-nasm mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-meson git base-devel --noconfirm"
.\msys64\usr\bin\bash -lc "git clone --recurse-submodules --recursive https://github.com/link-u/cavif"
.\msys64\usr\bin\bash -lc "cd cavif && mkdir build && cd build && cmake .. -G 'MSYS Makefiles' -DCMAKE_CXX_FLAGS=-static && make -j4 && strip cavif.exe"

from cavif.

darkcharmander avatar darkcharmander commented on June 12, 2024

Okay, disregard that. I had to add an SSH dummy key to be able to clone these repos, never had that before with public repos.

Anyways, building the projects stalls again:

Performing download step (DIR copy) for 'vmaf_repo'
Error copying directory from "U:/Desktop/cavif/external/vmaf/libvmaf" to "U:/D
esktop/cavif/build/src/vmaf_repo".
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\
VC\v160\Microsoft.CppCommon.targets(231,5): error MSB6006: "cmd.exe" exited with
code 1. [U:\Desktop\cavif\build\external\vmaf-repo\vmaf_repo.vcxproj]
-- Install configuration: "Release"
--- aom_configure: Detected CPU: x86_64
CMake Error at external/libaom/CMakeLists.txt:438 (message):
VMAF library not found.

I tried to compile the VMAF library (Downloaded separately) by myself but it's stubborn and doesn't want to work with clang or MVSC. I cannot believe that it's supposed to be as complicated that you have to compile VMAF separately yourself. What am I doing wrong? I did download python and nasm, these were two dependencies that you need for building as well.

from cavif.

darkcharmander avatar darkcharmander commented on June 12, 2024

@ledyba-z Do you know what to do?

from cavif.

ledyba-z avatar ledyba-z commented on June 12, 2024

@darkcharmander Very sorry to be late reply!

Currently, we have to use msys/mingw to build in windows (I really would like to fix this issue in the near future!).

Please read appveyor.yml. We are building windows binary using this script.

from cavif.

ledyba-z avatar ledyba-z commented on June 12, 2024

Can I change the title of this issue to "Impossible to build on Windows with MSVC toolchain"?

from cavif.

ledyba-z avatar ledyba-z commented on June 12, 2024

Thank you!

I will try Clang as well.

Please tell me the result!

from cavif.

darkcharmander avatar darkcharmander commented on June 12, 2024

Unfortunately it seems that I can't even get to the step of compiling. I've tried MingW from http://winlibs.com/ and http://www.mingw.org, both don't work and fail with the same error. CMake will spew out a strange error about the compiler not working well - This just isn't true since I've tried to compile some stuff with it, and they both work fine.

cmake .. -G "MSYS Makefiles" -DCMAKE_CXX_FLAGS=-static && make -j && strip cavif.exe
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "C:/MinGW/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: U:/Desktop/cavif/build-mingw/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/Tools/make.exe cmTC_c8a35/fast && C:/Tools/make.exe -f CMakeFiles/cmTC_c8a35.dir/build.make CMakeFiles/cmTC_c8a35.dir/build
    make.exe[1]: Entering directory `U:/Desktop/cavif/build-mingw/CMakeFiles/CMakeTmp'
    The system cannot find the path specified.
    make.exe[1]: *** [CMakeFiles/cmTC_c8a35.dir/testCCompiler.c.obj] Error 1
    make.exe[1]: Leaving directory `U:/Desktop/cavif/build-mingw/CMakeFiles/CMakeTmp'
    make.exe: *** [cmTC_c8a35/fast] Error 2

I will try Clang later on. MinGW (From Winlibs and mingw.org) seems to 'not' do anything.

from cavif.

darkcharmander avatar darkcharmander commented on June 12, 2024

On a side-note: The MinGW compiler from mingw.org seems to do something weird: Multiple antivirus scanners state that a simple C++ hello world program compiled by it contains a trojan horse. Despite not really knowing why such a things happens, I advise against using that compiler because of that. The MinGW compiler from winlibs.com does not seem to 'inject trojan horses'. Try it at your own risk :p

from cavif.

darkcharmander avatar darkcharmander commented on June 12, 2024

Well, nothing seems to be working. I also tried MSYS but that really didn't work out.

Compiling to Clang through a windows command prompt:

-- Build files have been written to: U:/Desktop/cavif/build-clang/external/vmaf-repo
Scanning dependencies of target vmaf_repo
[ 12%] Creating directories for 'vmaf_repo'
[ 25%] Performing download step (DIR copy) for 'vmaf_repo'
[ 37%] No patch step for 'vmaf_repo'
[ 50%] No update step for 'vmaf_repo'
[ 62%] Performing configure step for 'vmaf_repo'
'env' is not recognized as an internal or external command,
operable program or batch file.
make.exe[2]: *** [U:/Desktop/cavif/build-clang/src/vmaf_repo-stamp/vmaf_repo-configure] Error 1
make.exe[1]: *** [CMakeFiles/vmaf_repo.dir/all] Error 2
make.exe: *** [all] Error 2
[Lots of junk]
CMake Error at external/libaom/CMakeLists.txt:438 (message):
  VMAF library not found. 

Compiling to Clang through Cygwin:

-- Build files have been written to: U:/Desktop/cavif/build-clang/external/vmaf-repo
←[35m←[1mScanning dependencies of target vmaf_repo←[0m
[ 12%] ←[34m←[1mCreating directories for 'vmaf_repo'←[0m
[ 25%] ←[34m←[1mPerforming download step (DIR copy) for 'vmaf_repo'←[0m
[ 37%] ←[34m←[1mNo patch step for 'vmaf_repo'←[0m
[ 50%] ←[34m←[1mNo update step for 'vmaf_repo'←[0m
[ 62%] ←[34m←[1mPerforming configure step for 'vmaf_repo'←[0m

ERROR: Neither directory contains a build file meson.build.
make.exe[2]: *** [U:/Desktop/cavif/build-clang/src/vmaf_repo-stamp/vmaf_repo-configure] Error 1
make.exe[1]: *** [CMakeFiles/vmaf_repo.dir/all] Error 2
CMake Error at external/libaom/build/cmake/aom_configure.cmake:58 (if):
  if given arguments:

    "EQUAL" "4"

I have no idea what to do. There is something wrong with the VMAF repo; initializing it always goes wrong for some reason. Cygwin fails with some other error, but it still shows that the VMAF repo has problems.

Edit: In case the command that I used is desired: CC=clang CXX=clang cmake .. -G "Unix Makefiles" -DCMAKE_CXX_FLAGS=-static && make -j && strip cavif.exe

from cavif.

ledyba-z avatar ledyba-z commented on June 12, 2024

@darkcharmander Thank you for trying!

Do you use MinGW with msys2?
https://www.msys2.org/

MinGW contains just a compiler, thus it lacks many basic unix commands, such as env.
I think it might cause errors.

Could you install msys2 and mingw, and build cavif again?

msys2 has a package manager, pacman. You can install mingw-w64 from it.

Here is the command:
https://github.com/link-u/cavif/blob/master/.appveyor.yml#L9

from cavif.

darkcharmander avatar darkcharmander commented on June 12, 2024

After using the pacman command to install the stuff, CMake (MSYS 64 bit) spews out these errors when following your guide:

CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.

MSYS (normal) can't even find CMake. Executing the natively installed CMake also fails with the same errors as MSYS 64 bit.
Adding the path of the MinGW compiler to $PATH results in the same errors.

from cavif.

darkcharmander avatar darkcharmander commented on June 12, 2024

@f11894 Thank you so much! It works!!!

However, I had to make a slight change: you have to clone via a different way, otherwise the vmaf repo will be corrupted: git clone --recurse-submodules --recursive [email protected]:link-u/cavif.git. That way of cloning does require a dummy SSH key however. (Like I mentioned in my first and second post on this issue)

For the sake of convenience, I will repost all commands here with the fixed 'git clone' command, credits go to @f11894.
Execute in a powershell window:

$env:MSYSTEM="MINGW64"
curl.exe -L -O https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe
.\msys2-base-x86_64-latest.sfx.exe x -y -o"."
.\msys64\usr\bin\bash -lc "pacman -S mingw-w64-x86_64-nasm mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-meson git base-devel --noconfirm"
.\msys64\usr\bin\bash -lc "git clone --recurse-submodules --recursive [email protected]:link-u/cavif.git"
.\msys64\usr\bin\bash -lc "cd cavif && mkdir build && cd build && cmake .. -G 'MSYS Makefiles' -DCMAKE_CXX_FLAGS=-static && make -j4 && strip cavif.exe"

Issue solved. Have a good day, everyone!

from cavif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.