Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building frei0r errors out #707

Open
Kadigan opened this issue Aug 4, 2023 · 8 comments
Open

Building frei0r errors out #707

Kadigan opened this issue Aug 4, 2023 · 8 comments

Comments

@Kadigan
Copy link

Kadigan commented Aug 4, 2023

I don't see an option to disable frei0r in any way; it seems to be expected to be built. However, building frei0r fails no matter what I do - it throws a ton of errors on stuff like std::thread, std::future, and a few failed assertions when trying to build filter "kaleid0sc0pe".

Had to edit it out by disabling it in the build queue, and removing --enable-frei0r from the cmdline.

Is that something that'll see an update, or is this ticket relevant?

@timothymowens
Copy link
Contributor

timothymowens commented Aug 5, 2023

I believe this is an issue that needs to be created for the frei0r project. It looks like they recently added the kaleid0sc0pe filter with v2.3.1, which seems to be breaking complilation when building for Windows via mingw.

I submitted a ticket to them: dyne/frei0r#178

@timothymowens
Copy link
Contributor

timothymowens commented Aug 5, 2023

As a side note, I made the following edit to the build_frei0r() function in the cross_compile_ffmpeg.sh script and was able to successfully move on past the frei0r issue. This simply downloads the previous v2.3.0 build instead of latest:

build_frei0r() {
  #do_git_checkout https://github.com/dyne/frei0r.git
  #cd frei0r_git
  download_and_unpack_file https://github.com/dyne/frei0r/archive/refs/tags/v2.3.0.tar.gz frei0r-2.3.0
  cd frei0r-2.3.0
    sed -i.bak 's/-arch i386//' CMakeLists.txt # OS X https://github.com/dyne/frei0r/issues/64
    do_cmake_and_install "-DWITHOUT_OPENCV=1" # XXX could look at this more...

    mkdir -p $cur_dir/redist # Strip and pack shared libraries.
    if [ $bits_target = 32 ]; then
      local arch=x86
    else
      local arch=x86_64
    fi
    archive="$cur_dir/redist/frei0r-plugins-${arch}-$(git describe --tags).7z"
    if [[ ! -f "$archive.done" ]]; then
      for sharedlib in $mingw_w64_x86_64_prefix/lib/frei0r-1/*.dll; do
        ${cross_prefix}strip $sharedlib
      done
      for doc in AUTHORS ChangeLog COPYING README.md; do
        sed "s/$/\r/" $doc > $mingw_w64_x86_64_prefix/lib/frei0r-1/$doc.txt
      done
      7z a -mx=9 $archive $mingw_w64_x86_64_prefix/lib/frei0r-1 && rm -f $mingw_w64_x86_64_prefix/lib/frei0r-1/*.txt
      touch "$archive.done" # for those with no 7z so it won't restrip every time
    fi
  cd ..
}

@mitchcapper
Copy link
Contributor

reverting to the old version works but its still pretty easy to use master and just disable the module with sed or any other string manipulation. Each is independent so I don't think it causes any issues.

@Kadigan
Copy link
Author

Kadigan commented Aug 10, 2023

Does the script have the ability to "blacklist" known-incompatible lib versions, at least until the issue is resolved (as I understand, it's a mingw issue with using win32 threads and no futures support)? Is it a thing?

@mitchcapper
Copy link
Contributor

The frei0r lib is a set of optional filters for ffmpeg that apply things like effects. The kaleid0sc0pe is an arbitrary effect recently added to frei0r. It does require a threads feature that mingw does not by default support (there may be a work around). The first of the frei0r lib however doesn't use those features so simply excluding this specific filter resolves the issue without locking this helper script to static in time frei0r lib.

@Kadigan
Copy link
Author

Kadigan commented Aug 10, 2023

From what I could see, they're adding some extra checks to verify actual support for those C++11 features, so hopefully this won't show up again in this particular library.

@rdp
Copy link
Owner

rdp commented Aug 12, 2023

should be work arounded now, hopefully, till they merge the check on their end...

@Reino17
Copy link
Contributor

Reino17 commented Sep 7, 2023

I see you're still installing these...

build_mingw_std_threads() {
do_git_checkout https://github.com/meganz/mingw-std-threads.git # it needs std::mutex too :|
cd mingw-std-threads_git
cp *.h "$mingw_w64_x86_64_prefix/include"
cd ..
}

...so why not use them?

sed -i.bak 's/<future>/"mingw.future.h"/' src/filter/kaleid0sc0pe/kaleid0sc0pe.cpp
This works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants