I give up!

Any other question that don't fit into the other support categorizes.
Khaos64
Posts: 9
Joined: Thu Jun 13, 2013 3:19 pm

Re: I give up!

Post by Khaos64 » Fri Jun 14, 2013 7:16 pm

Alright I'll give it a go, and let you know

*Edit
Ajaja wrote:
Khaos64 wrote:Hey, after "autoreconf -fiv" it gets stuck at "autoreconf: running: libtoolize --copy --force"
autoreconf in MSYS has some problems with \r\n line breaks in configure.ac, so you can try:

Code: Select all

cp configure.ac configure.ac.bak
tr -d '\r' <configure.ac.bak >configure.ac
before autoreconf -fiv

I was able to get past that point and think all went well.Though now on the ffmpeg part. I put the ffmpeg folder into the fdk folder and after "autoreconf -fiv"

Code: Select all

./configure --disable-shared --enable-static --prefix=/mingw/x86_64-w64-mingw32 --host=x86_64-w64-mingw32
make install

cd ffmpeg
./configure --disable-shared --enable-static --enable-nonfree --enable-libfdk-aac --prefix=/mingw/x86_64-w64-mingw32
I get an error saying "yasm not found, use --disable-yasm for a crippled build"

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: I give up!

Post by Ajaja » Fri Jun 14, 2013 10:25 pm

Khaos64 wrote:I get an error saying "yasm not found, use --disable-yasm for a crippled build"
Yes, I forgot about YASM:
http://www.tortall.net/projects/yasm/re ... -win32.exe (for 32-bit Windows)
http://www.tortall.net/projects/yasm/re ... -win64.exe (for 64)
Rename to yasm.exe and copy into /msys/bin (or any PATH folder)

Khaos64
Posts: 9
Joined: Thu Jun 13, 2013 3:19 pm

Re: I give up!

Post by Khaos64 » Sat Jun 15, 2013 3:02 am

Ajaja wrote:
Khaos64 wrote:I get an error saying "yasm not found, use --disable-yasm for a crippled build"
Yes, I forgot about YASM:
http://www.tortall.net/projects/yasm/re ... -win32.exe (for 32-bit Windows)
http://www.tortall.net/projects/yasm/re ... -win64.exe (for 64)
Rename to yasm.exe and copy into /msys/bin (or any PATH folder)

Thanks Ajaja - i think I got it all working - built the .exe but got missing libwinpthread-1.dll error. I did use the --enable-static, so unsure why it didn't include it. It worked just fine when I moved the .dll to the same directory as ffmpeg.exe.

But instead of rebuilding - I tested building avconv. As I have heard libav seems to be replacing ffmpeg. It seems to have worked just fine by replacing ffmpeg steps w/ avconv. No errors by just starting "avconv -h". Havent tested any encoding.

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: I give up!

Post by Ajaja » Sat Jun 15, 2013 8:49 am

Khaos64 wrote:Thanks Ajaja - i think I got it all working - built the .exe but got missing libwinpthread-1.dll error. I did use the --enable-static, so unsure why it didn't include it. It worked just fine when I moved the .dll to the same directory as ffmpeg.exe.
To avoid dependencies I remove libwinpthread.dll.a and libpthread.dll.a from Mingw, build static pthreads and use --extra-cflags="-DPTW32_STATIC_LIB" for building x264 and Ffmpeg.

Code: Select all

build_pthreads()
{
#ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz
 cd $build_path
 cd pthreads-w32-2-9-1-release
 make clean GC-static  || exit 1
 cp libpthreadGC2.a ${mingw_prefix}/lib/libpthread.a
 cp pthread.h sched.h semaphore.h ${mingw_prefix}/include
}
Ffmpeg may also need --disable-w32threads.

And if you build on virtual drive in memory then I recommend to create tmp folder on it add set in msys.bat TMP and TEMP environment variables:

Code: Select all

SET TEMP=Z:\msys\tmp
SET TMP=%TEMP%
All compiling process will be in memory without using of HDD.


BTW. I got one problem with compiling Ffmpeg using MSYS/Mingw. Can't compile with --enable-lto (-flto) without -fno-use-linker-plugin. Can someone test it using cross-compiling? Is it MSYS/Mingw problem or GCC/Ffmpeg?

Khaos64
Posts: 9
Joined: Thu Jun 13, 2013 3:19 pm

Re: I give up!

Post by Khaos64 » Tue Jun 18, 2013 7:34 pm

Ajaja wrote:
Khaos64 wrote:Thanks Ajaja - i think I got it all working - built the .exe but got missing libwinpthread-1.dll error. I did use the --enable-static, so unsure why it didn't include it. It worked just fine when I moved the .dll to the same directory as ffmpeg.exe.
To avoid dependencies I remove libwinpthread.dll.a and libpthread.dll.a from Mingw, build static pthreads and use --extra-cflags="-DPTW32_STATIC_LIB" for building x264 and Ffmpeg.

Code: Select all

build_pthreads()
{
#ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz
 cd $build_path
 cd pthreads-w32-2-9-1-release
 make clean GC-static  || exit 1
 cp libpthreadGC2.a ${mingw_prefix}/lib/libpthread.a
 cp pthread.h sched.h semaphore.h ${mingw_prefix}/include
}
Ffmpeg may also need --disable-w32threads.

And if you build on virtual drive in memory then I recommend to create tmp folder on it add set in msys.bat TMP and TEMP environment variables:

Code: Select all

SET TEMP=Z:\msys\tmp
SET TMP=%TEMP%
All compiling process will be in memory without using of HDD.


BTW. I got one problem with compiling Ffmpeg using MSYS/Mingw. Can't compile with --enable-lto (-flto) without -fno-use-linker-plugin. Can someone test it using cross-compiling? Is it MSYS/Mingw problem or GCC/Ffmpeg?

Thanks, havent given it a try - but all i need to do is download th pthreads from the above link - run the above

Code: Select all

cd $build_path
 cd pthreads-w32-2-9-1-release
 make clean GC-static  || exit 1
 cp libpthreadGC2.a ${mingw_prefix}/lib/libpthread.a
 cp pthread.h sched.h semaphore.h ${mingw_prefix}/include
Then in my ffmpeg ./configure inculde --disable-w32threads, correct?

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: I give up!

Post by rogerdpack » Tue Jun 18, 2013 8:41 pm

Khaos64 wrote:
Ajaja wrote:
Khaos64 wrote:Thanks Ajaja - i think I got it all working - built the .exe but got missing libwinpthread-1.dll error. I did use the --enable-static, so unsure why it didn't include it. It worked just fine when I moved the .dll to the same directory as ffmpeg.exe.
To avoid dependencies I remove libwinpthread.dll.a and libpthread.dll.a from Mingw, build static pthreads and use --extra-cflags="-DPTW32_STATIC_LIB" for building x264 and Ffmpeg.

Code: Select all

build_pthreads()
{
#ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz
 cd $build_path
 cd pthreads-w32-2-9-1-release
 make clean GC-static  || exit 1
 cp libpthreadGC2.a ${mingw_prefix}/lib/libpthread.a
 cp pthread.h sched.h semaphore.h ${mingw_prefix}/include
}
Ffmpeg may also need --disable-w32threads.

And if you build on virtual drive in memory then I recommend to create tmp folder on it add set in msys.bat TMP and TEMP environment variables:

Code: Select all

SET TEMP=Z:\msys\tmp
SET TMP=%TEMP%
All compiling process will be in memory without using of HDD.


BTW. I got one problem with compiling Ffmpeg using MSYS/Mingw. Can't compile with --enable-lto (-flto) without -fno-use-linker-plugin. Can someone test it using cross-compiling? Is it MSYS/Mingw problem or GCC/Ffmpeg?

Thanks, havent given it a try - but all i need to do is download th pthreads from the above link - run the above

Code: Select all

cd $build_path
 cd pthreads-w32-2-9-1-release
 make clean GC-static  || exit 1
 cp libpthreadGC2.a ${mingw_prefix}/lib/libpthread.a
 cp pthread.h sched.h semaphore.h ${mingw_prefix}/include
Then in my ffmpeg ./configure inculde --disable-w32threads, correct?

sounds right to me...

Khaos64
Posts: 9
Joined: Thu Jun 13, 2013 3:19 pm

Re: I give up!

Post by Khaos64 » Sat Jul 13, 2013 3:52 am

Hey, thanks for all the help before...though I just was leaving the .dll in the same directory as my .exe, so I never got around to applying the above. But I am now trying to recompile everything, it seems to go fine with no errors during, but still get the pthreads error upon execution in windows.

I downloaded the pthreads from ftp://sourceware.org/pub/pthreads-win32 ... ase.tar.gz

extracted and ran

Code: Select all

make clean GC-static  || exit 1
 cp libpthreadGC2.a /mingw/x86_64-w64-mingw32/lib/libpthread.a
 cp pthread.h sched.h semaphore.h /mingw/x86_64-w64-mingw32/include
I then compiled ffmpeg with

Code: Select all

./configure --disable-shared --enable-static --enable-nonfree --enable-libfdk-aac --prefix=/mingw/x86_64-w64-mingw32 --disable-w32threads --extra-cflags="-DPTW32_STATIC_LIB"
make
But I still get libwinpthread-1.dll is missing

any thoughts?

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: I give up!

Post by Ajaja » Sat Jul 13, 2013 8:34 am

Try to rename/delete libwinpthread.dll.a.

Khaos64
Posts: 9
Joined: Thu Jun 13, 2013 3:19 pm

Re: I give up!

Post by Khaos64 » Sat Jul 13, 2013 2:38 pm

Ajaja wrote:Try to rename/delete libwinpthread.dll.a.
I just renamed it to libwinpthread.dll.a.bak, but still same result....thanks though...if it makes any difference...i don't know...

I run make clean.. and then the above ./configure...when done, at the end... it says...

creating config.mak, config.h, and doc/config.texi...
config.h is unchanged
config.asm is unchanged
libavutil/avconfig.h is unchanged

Edit*
Also just tried removing both the libwinpthread.dll.a and libwinpthread.dll file....same result

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: I give up!

Post by Ajaja » Sat Jul 13, 2013 3:29 pm

Remove libpthread.dll.a too. Only libpthread.dll.a and libwinpthread.dll.a have libwinpthread-1.dll dependencies. If you remove them then linker will use libpthread.a and libwinpthread.a. Linker flag -static may help too, but i prefer to remove *.dll.a

Post Reply
'