Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 31st January 2025, 22:54   #1641  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Quote:
Originally Posted by StvG View Post
Try with installing it on the Windows-wide and reopen the ucrt64 shell from vs cmd to get nasm in the path.

Edit: I will try it myself now with cl (I always use clang-cl) to see if there are errors.
Done (and I added the path to the system-wide nasm.exe in environment variables), but with no change to the errors. MSYS2's nasm.exe was already in MSYS2's path.

Perhaps I should get clang...
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 31st January 2025, 23:02   #1642  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Mmm. MSYS2 nasm shouldn't be issue because when I type in the ucrt64 shell "where nasm" I get "C:\msys64\ucrt64\bin\nasm.exe". You need "mingw-w64-ucrt-x86_64-nasm".

If you didn't see the other edits from my previous post I updated the script to be more friendly. Also you can use vcpkg to build ffmpeg with MSVC much more easily.

Edit: for vcpkg you can see an example here.

Last edited by StvG; 31st January 2025 at 23:08.
StvG is offline   Reply With Quote
Old 31st January 2025, 23:10   #1643  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Yup, that's the same result I get from "where nasm". But I haven't done anything to tell Visual Studio/cl.exe to use nasm when it finds inline assembler, if that can even be done...

I tried with the new version of script, with these changes:

Code:
compiler="cl"
cmake_path="/c/Program Files/CMake/bin/cmake"
dav1d_cross_file="/c/msys64/home/David/dav1d_cross.txt"
but still get the errors.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 31st January 2025, 23:15   #1644  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Share "config.log" from "ffmpeg\ffbuild".

Also "config.h" and "config_components.h", and "config.asm" from "ffmpeg".
StvG is offline   Reply With Quote
Old 31st January 2025, 23:24   #1645  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Quote:
Originally Posted by StvG View Post
Share "config.log" from "ffmpeg\ffbuild".

Also "config.h" and "config_components.h", and "config.asm" from "ffmpeg".
https://horman.net/avisynth/ffmpeg_stuff.zip
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 31st January 2025, 23:29   #1646  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Thanks. Found the issue (I thought modifying mingw header was only necessary clang-cl). Use this script https://pastebin.com/gJTFMdzd
StvG is offline   Reply With Quote
Old 31st January 2025, 23:50   #1647  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Quote:
Originally Posted by StvG View Post
Thanks. Found the issue (I thought modifying mingw header was only necessary clang-cl). Use this script https://pastebin.com/gJTFMdzd
This gets me further, thanks (and thank you very much for your continued efforts and patience).

I was getting a few instances of this:

Code:
Cannot open include file: 'stdalign.h'
I haven't found a definite solution so far, but it seems stdalign.h isn't included/supported in Visual Studio. The file does exist within MSYS2 though - I added the path to --extra-cflags in PKG_CONFIG_PATH, and now I get:

Code:
Compiler lacks support for C11 static assertions
Here's ffbuild\config.log: https://pastebin.com/Fk7Feuc2
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 1st February 2025, 00:02   #1648  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
I have it - https://i.ibb.co/VcyPrtKQ/Untitled.png. Try to install the latest Windows SDK or reinstall the one you have.
StvG is offline   Reply With Quote
Old 1st February 2025, 01:41   #1649  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Quote:
Originally Posted by StvG View Post
I have it - https://i.ibb.co/VcyPrtKQ/Untitled.png. Try to install the latest Windows SDK or reinstall the one you have.
Yup, i installed the latest SDK and it has the file.

I'll try running the script again tomorrow to see if I still get the same C11 static error.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 1st February 2025, 01:46   #1650  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
In case you didn't already you can delete from line 42 to 207 from the script in order to run only the ffmpeg part.
StvG is offline   Reply With Quote
Old 1st February 2025, 21:45   #1651  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Okay, that all seems to have worked!

So now I need to:

Quote:
4. While you're still in the ucrt64 shell, download lsmash (vimeo) and obuparse and build them, install them in the same location as ffmpeg.
I don't actually know where ffmpeg has installed itself or how to install the other two things there (yes, I really am this clueless).

What are the files that L-SMASH Works will be looking for in "DCMAKE_PREFIX_PATH="path_to_folder_where_are_include/lib_directories" when I get that far?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 1st February 2025, 22:17   #1652  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,515
Quote:
Originally Posted by wonkey_monkey View Post
I don't actually know where ffmpeg has installed itself or how to install the other two things there (yes, I really am this clueless).
The value of --prefix is where ffmpeg gets installed when the 'make install' step is performed. If you don't know which directory that is (meaning, you didn't specify it), look inside the script to see what it was setting for that option.

Quote:
What are the files that L-SMASH Works will be looking for in "DCMAKE_PREFIX_PATH="path_to_folder_where_are_include/lib_directories" when I get that far?
CMAKE_PREFIX_PATH sets a search path for an entire tree of headers, libs, and such, so it depends on what exactly the next steps actually look for. In some cases, it's the pkgconfig files in lib/pkgconfig, in others, the CMake modules in lib/cmake, in still other cases it's just a way of saying: look at this top-level directory and pull any .h and .a files from the include/ and lib/ folders.
qyot27 is offline   Reply With Quote
Old 1st February 2025, 23:43   #1653  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Quote:
Originally Posted by wonkey_monkey View Post
I don't actually know where ffmpeg has installed itself or how to install the other two things there (yes, I really am this clueless).
The script creates folder "deps\x64-Release" next to the script. Search for it.

Quote:
Originally Posted by wonkey_monkey View Post
What are the files that L-SMASH Works will be looking for in "DCMAKE_PREFIX_PATH="path_to_folder_where_are_include/lib_directories" when I get that far?
FFmpeg include files/libraries, external libs/include files, liblsmash include file/lib, obuparse include file/lib...
StvG is offline   Reply With Quote
Old 1st February 2025, 23:57   #1654  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Okay... for obuparse, since it doesn't have a configure script, I edited the Makefile and just changed the first line to

Code:
PREFIX ?= ~/deps/x64-release
Then did make and make install.

For l-smash, I did

Code:
./configure --prefix="~/deps/x64-release" --extra-cflags=-I/home/david/deps/x64-Release/include --extra-ldflags=-L/home/david/deps/x64-Release/lib --includedir=~/deps/x64-Release/include --libdir=~/deps/x64-Release/lib
(I'm not sure why I couldn't use ~ as a prefix for the extra cflags and extra ldflags, but it didn't work so I specified the full path)

make/make install put .h and .a files in the x64-Release/include and x64-Release/lib directories.

Next:

Code:
cmake -B build_folder -DCMAKE_PREFIX_PATH="C:\msys64\home\David\deps\x64-Release" -DENABLE_VPX=OFF
This worked, although it complained about not finding Git or PkgConfig.

Trying to build the created .sln resulted in four unresolved externals:

Code:
__mingw_fprintf
__mingw_sprintf
___chkstk_ms
__mingw_vfprintf
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 2nd February 2025 at 00:03.
wonkey_monkey is offline   Reply With Quote
Old 2nd February 2025, 00:04   #1655  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Actually I build obuparse with created VS solution files and manually copy "obuparse.h" and the lib in "deps\x64-Release\relevant_dirs". Also I modified lsmash VS solution files to work correctly with vimeo version and again manually copy "lsmash.h" and "liblsmash.lib" to "deps\x64-Release\relevant_dirs". If you prefer VS solution files, I can share them so you can build them with VS.
StvG is offline   Reply With Quote
Old 2nd February 2025, 00:11   #1656  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Quote:
Originally Posted by wonkey_monkey View Post
Code:
__mingw_fprintf
__mingw_sprintf
___chkstk_ms
__mingw_vfprintf
This suggests that you're linking against ffmpeg/external libs created with GCC and not VS. For what libs are these errors?

Edit: Oh, for obuparse and liblsmash I guess you didn't explicitly used cl instead GCC. You can do in the shell: "export CC=cl".

Last edited by StvG; 2nd February 2025 at 00:19.
StvG is offline   Reply With Quote
Old 2nd February 2025, 00:19   #1657  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,515
It's not necessary to specify --includedir= or --libdir= if you've set --prefix. Those are automatically populated by whatever the prefix is, and you only really want to change them if you deliberately want them somewhere else.

And the extra-{cflags,ldflags} arguments can understand $HOME, e.g., --extra-cflags=-I$HOME/deps/x64-Release/include.

Not finding Git or pkgconf sounds like you haven't added MSys2's /usr/bin to the %PATH% (or alternatively, launched MSys2 from within the VS Command Prompt so the MSys2 environment can see MSVC).
qyot27 is offline   Reply With Quote
Old 2nd February 2025, 00:20   #1658  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,888
Ah, all the errors are for liblsmash! I probably need to change the compiler to cl. Please hold...
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 2nd February 2025, 00:34   #1659  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Quote:
Originally Posted by wonkey_monkey View Post
Ah, all the errors are for liblsmash! I probably need to change the compiler to cl. Please hold...
obuparse has hardcoded GCC in the Makefile.

Here are the VS solution files for obuparse and l-smash. Extract them in the root of the relevant folders and build the libs from there.

Edit: Copy "obuparse.h" in the root of l-smash folder.

Last edited by StvG; 2nd February 2025 at 00:56.
StvG is offline   Reply With Quote
Old 2nd February 2025, 00:37   #1660  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 609
Quote:
Originally Posted by qyot27 View Post
Not finding Git or pkgconf sounds like you haven't added MSys2's /usr/bin to the %PATH% (or alternatively, launched MSys2 from within the VS Command Prompt so the MSys2 environment can see MSVC).
For L-SMASH-Works - it checks if pkgconfig is available and if not it finds the libs with CMAKE_PREFIX_PATH. This is just warning that pkgconfig is not used. Part of the code.

Last edited by StvG; 2nd February 2025 at 00:47.
StvG is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.