m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.49k stars 256 forks source link

install-rav1e-c failed #2682

Closed F1EJP closed 1 month ago

F1EJP commented 1 month ago

building 64-bit error: could not compile rav1e (build script) due to 1 previous error warning: build failed, waiting for other jobs to finish... Error: CliError { error: Some(1 job failed), exit_code: 101 } install-rav1e-c failed. Check C:/media-autobuild_suite-master/build/rav1e-git/ab-suite.install-rav1e-c.log(B

logs.zip

Thank you for your analyse, i have not see this in issue.

LigH-de commented 1 month ago

Kind of duplicate of #2670 which got closed prematurely.

mojie126 commented 1 month ago

Kind of duplicate of #2670 which got closed prematurely.

I don’t know what I did, but somehow it was able to compile.

LigH-de commented 1 month ago

A workaround, if not even a solution:

media-suite_compile.sh line 1147:

         PKG_CONFIG="$LOCALDESTDIR/bin/ab-pkg-config-static.bat" \
             CC="ccache clang" \
             CXX="ccache clang++" \
             log "install-rav1e-c" cargo capi install \
-            --release --jobs "$cpuCount" --prefix="$LOCALDESTDIR" \
+            --release --no-default-features --jobs "$cpuCount" --prefix="$LOCALDESTDIR" \
             --destdir="$PWD/install-$bits"
1480c1 commented 1 month ago

I believe this has been fixed

LigH-de commented 1 month ago

Unfortunately not, I still have to add --no-default-features until git2 gets substituted upstream (by e.g. gix).

logs.zip

1480c1 commented 1 month ago

Unfortunately not, I still have to add --no-default-features until git2 gets substituted upstream (by e.g. gix).

logs.zip

I ran a clean build using the config files in your zip file and it succeeded. I am running it again to make sure

1480c1 commented 1 month ago

Ran it again and had no issues compiling

LigH-de commented 1 month ago

So what's wrong in my setup?

logs.zip

1480c1 commented 1 month ago

can you try cleaning up /opt/cargo/bin? It's possible that there's some stuff left over from there during the transition to using msys2's rust packages

LigH-de commented 1 month ago

AFAICS it does not exist. There is an msys64/opt/cargo with binaries in toolchains/stable-{i686|x86_64}-pc-windows-gnu though, how much of that could I prune safely?

1480c1 commented 1 month ago

you should be able to prune all of /opt/cargo safely as far as I know, it should only hold registry and a few other files. Pretty much everything under bin was migrated to using msys2's packages. The registry folder can always be recreated the next time cargo runs

LigH-de commented 1 month ago

Nope, same linker error.

I assume that ld would look for a file libgit2.a due to the parameter -lgit2 ?

The only location where this file exists on my PC is G:\MABS\build\rav1e-git\target\release-no-lto\build\libgit2-sys-afacc7b5410267df\out\build\libgit2.a

1480c1 commented 1 month ago

hmm, would you be able to zip up msys64, local* and send them to me? Via email is fine

LigH-de commented 1 month ago

Uhm, no, msys64 alone is 15 GB uncompressed, you won't get that through any email server. Or did I misunderstand you, did you only want the names of existing files?

1480c1 commented 1 month ago

Darn, I wanted to see if I could trace what's different from my setup and yours. I thought it was fixed by way of hiding the .pc file, which it would check to see if it could use the system's libgit2.

I'm going to go the route of building our own libgit2 since that seems to be the least hassle at this time.

LigH-de commented 1 month ago

As I said, there is no libgit2 library file in the system. Except for crate and rlib files which must belong to rust exclusively, and the above mentioned libgit2.a file which was built but not copied to local libs, there are only these files in the MSYS2 system:

G:\MABS\msys64\mingw32\bin\libgit2-1.7.dll G:\MABS\msys64\mingw64\bin\libgit2-1.7.dll

To check the existence of files I use "Everything", a Windows tool which uses the commit database of NTFS drives. libgit2

LigH-de commented 1 month ago

Additional note: A rav1e.exe has been created in local32/bin-video; but its size is >50 MB. A previous build in local64/bin-video is just ~5 MB. So what actually fails may not be the building but the stripping, using ld? Confusing to me.

ASopH commented 1 month ago

Hi, same here: 32bit .exe is >50 MB, but an older 64 bit .exe is >63 MB logs.zip

hope the logs help a little bit :-)

LigH-de commented 1 month ago

That last 64 bit exe in my suite was compiled with that --no-default-features option.

From Feb. 2024: 32 bit ~4 MB, 64 bit ~5 MB.

ASopH commented 1 month ago

Hi LigH, I've started yesterday a new, clean run without "--no-default-features" - after a new start ist breaks at 32bit compile...

LigH-de commented 1 month ago

OK, the fact that it works for a 1st time is certainly interesting...

ASopH commented 1 month ago

Ok, a new try: deleted local* dirs and started again .. must wait :-)

ASopH commented 1 month ago

So, compiling ended - with error: logs.zip perhaps something in MSYS ?? - no clue

LigH-de commented 1 month ago

For me, rav1e builds without additional changes now. Probably thanks to https://github.com/m-ab-s/media-autobuild_suite/commit/5f6a79487106d57320a1cf72a9347a628d06f17f

ASopH commented 1 month ago

ok, seems to work

F1EJP commented 1 month ago

it's seem ok for me now

F1EJP commented 1 month ago

thanks for all i close