Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <430E2736.2080405@familiehaase.de> Date: Thu, 25 Aug 2005 22:16:54 +0200 From: "Gerrit P. Haase" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 MIME-Version: 1.0 To: Frodo CC: cygwin AT cygwin DOT com Subject: Re: mini install of cygwin References: <000f01c5a983$b63bf600$db482f51 AT MATRIX> In-Reply-To: <000f01c5a983$b63bf600$db482f51@MATRIX> Content-Type: multipart/mixed; boundary="------------070005080605080902040505" X-IsSubscribed: yes --------------070005080605080902040505 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Frodo wrote: > ffmpeg ( I can't compile it i don't know how to or why i can't ) You cannot compile it but you don't know why? I can compile it but it doesn't run, and I don't know why. Isn't that funny? However, I have a version online which is older and works (no idea if vhook works though): http://loreley.ath.cx/cygwin/cygwin-1.5/ffmpeg/ I case someone wants to try to figure out what is going wrong I have attached the patch I used to build it (also my script). Have fun, Gerrit --------------070005080605080902040505 Content-Type: text/plain; name="ffmpeg-0.4.9-pre1-1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ffmpeg-0.4.9-pre1-1.patch" diff -urN -x .build -x .inst -x .sinst ffmpeg-0.4.9-pre1-orig/Makefile ffmpeg-0.4.9-pre1/Makefile --- ffmpeg-0.4.9-pre1-orig/Makefile 2004-07-08 13:02:04.000000000 +0200 +++ ffmpeg-0.4.9-pre1/Makefile 2005-08-25 21:49:11.558470400 +0200 @@ -105,7 +105,7 @@ $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS) qt-faststart$(EXESUF): qt-faststart.c - $(CC) qt-faststart.c -o qt-faststart$(EXESUF) + $(CC) $(SRC_PATH)/qt-faststart.c -o qt-faststart$(EXESUF) ffplay.o: ffplay.c $(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $< @@ -167,7 +167,7 @@ $(MAKE) -C libavcodec clean $(MAKE) -C libavformat clean $(MAKE) -C tests clean - rm -f *.o *.d *~ .libs .depend gmon.out TAGS ffmpeg_g$(EXESUF) ffplay_g$(EXESUF) $(PROG) $(PROGTEST) + rm -f *.o *.d *~ *.exe .libs .depend gmon.out TAGS ffmpeg_g$(EXESUF) ffplay_g$(EXESUF) $(PROG) $(PROGTEST) clean-vhook: $(MAKE) -C vhook clean diff -urN -x .build -x .inst -x .sinst ffmpeg-0.4.9-pre1-orig/configure ffmpeg-0.4.9-pre1/configure --- ffmpeg-0.4.9-pre1-orig/configure 2004-07-05 20:06:16.000000000 +0200 +++ ffmpeg-0.4.9-pre1/configure 2004-08-25 01:16:37.000000000 +0200 @@ -489,26 +489,26 @@ needmdynamicnopic="no" if test $targetos = Darwin; then if test -n "`$cc -v 2>&1 | grep xlc`"; then - CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto" + CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto" else - gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`" - case "$gcc_version" in - *2.95*) - CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" - ;; - *3.*) - CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare" - if test "$lshared" = no; then - needmdynamicnopic="yes" - fi - ;; - *) - CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" - if test "$lshared" = no; then - needmdynamicnopic="yes" - fi - ;; - esac + gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`" + case "$gcc_version" in + *2.95*) + CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" + ;; + *3.*) + CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare" + if test "$lshared" = no; then + needmdynamicnopic="yes" + fi + ;; + *) + CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" + if test "$lshared" = no; then + needmdynamicnopic="yes" + fi + ;; + esac fi fi @@ -526,59 +526,59 @@ POWERPCMODE="32bits" if test $tune != "generic"; then case $tune in - 601|ppc601|PowerPC601) - CFLAGS="$CFLAGS -mcpu=601" - if test $altivec = "yes"; then - echo "WARNING: tuning for PPC601 but altivec enabled !"; - fi - TUNECPU=ppc601 - ;; - 603*|ppc603*|PowerPC603*) - CFLAGS="$CFLAGS -mcpu=603" - if test $altivec = "yes"; then - echo "WARNING: tuning for PPC603 but altivec enabled !"; - fi - TUNECPU=ppc603 - ;; - 604*|ppc604*|PowerPC604*) - CFLAGS="$CFLAGS -mcpu=604" - if test $altivec = "yes"; then - echo "WARNING: tuning for PPC604 but altivec enabled !"; - fi - TUNECPU=ppc604 - ;; - G3|g3|75*|ppc75*|PowerPC75*) - CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt" - if test $altivec = "yes"; then - echo "WARNING: tuning for PPC75x but altivec enabled !"; - fi - TUNECPU=ppc750 - ;; - G4|g4|745*|ppc745*|PowerPC745*) - CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt" - if test $altivec = "no"; then - echo "WARNING: tuning for PPC745x but altivec disabled !"; - fi - TUNECPU=ppc7450 - ;; - 74*|ppc74*|PowerPC74*) - CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt" - if test $altivec = "no"; then - echo "WARNING: tuning for PPC74xx but altivec disabled !"; - fi - TUNECPU=ppc7400 - ;; - G5|g5|970|ppc970|PowerPC970|power4*|Power4*) - CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64" - if test $altivec = "no"; then - echo "WARNING: tuning for PPC970 but altivec disabled !"; - fi - TUNECPU=ppc970 + 601|ppc601|PowerPC601) + CFLAGS="$CFLAGS -mcpu=601" + if test $altivec = "yes"; then + echo "WARNING: tuning for PPC601 but altivec enabled !"; + fi + TUNECPU=ppc601 + ;; + 603*|ppc603*|PowerPC603*) + CFLAGS="$CFLAGS -mcpu=603" + if test $altivec = "yes"; then + echo "WARNING: tuning for PPC603 but altivec enabled !"; + fi + TUNECPU=ppc603 + ;; + 604*|ppc604*|PowerPC604*) + CFLAGS="$CFLAGS -mcpu=604" + if test $altivec = "yes"; then + echo "WARNING: tuning for PPC604 but altivec enabled !"; + fi + TUNECPU=ppc604 + ;; + G3|g3|75*|ppc75*|PowerPC75*) + CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt" + if test $altivec = "yes"; then + echo "WARNING: tuning for PPC75x but altivec enabled !"; + fi + TUNECPU=ppc750 + ;; + G4|g4|745*|ppc745*|PowerPC745*) + CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt" + if test $altivec = "no"; then + echo "WARNING: tuning for PPC745x but altivec disabled !"; + fi + TUNECPU=ppc7450 + ;; + 74*|ppc74*|PowerPC74*) + CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt" + if test $altivec = "no"; then + echo "WARNING: tuning for PPC74xx but altivec disabled !"; + fi + TUNECPU=ppc7400 + ;; + G5|g5|970|ppc970|PowerPC970|power4*|Power4*) + CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64" + if test $altivec = "no"; then + echo "WARNING: tuning for PPC970 but altivec disabled !"; + fi + TUNECPU=ppc970 POWERPCMODE="64bits" - ;; - *) - echo "WARNING: unknown CPU "$tune", ignored" - ;; + ;; + *) + echo "WARNING: unknown CPU "$tune", ignored" + ;; esac fi @@ -662,6 +662,12 @@ bindir="$prefix" fi +if test "$cygwin" = "yes" ; then + SLIBPREF="cyg" + SLIBSUF=".dll" + EXESUF=".exe" +fi + cc="${cross_prefix}${cc}" ar="${cross_prefix}${ar}" ranlib="${cross_prefix}${ranlib}" @@ -674,8 +680,8 @@ cat > $TMPC << EOF #include int main(int argc, char ** argv){ - volatile uint32_t i=0x01234567; - return (*((uint8_t*)(&i))) == 0x67; + volatile uint32_t i=0x01234567; + return (*((uint8_t*)(&i))) == 0x67; } EOF @@ -710,8 +716,8 @@ cat > $TMPC << EOF #include int main(int argc, char ** argv){ - volatile uint_fast64_t i=0x01234567; - return 0; + volatile uint_fast64_t i=0x01234567; + return 0; } EOF @@ -910,10 +916,10 @@ case "`$cc -v 2>&1 | grep version`" in *gcc*) - CFLAGS="-Wall $CFLAGS" - ;; + CFLAGS="-Wall $CFLAGS" + ;; *) - ;; + ;; esac if test "$sdl" = "no" ; then @@ -921,7 +927,7 @@ fi if test "$debug" = "yes"; then - CFLAGS="-g $CFLAGS" + CFLAGS="-g $CFLAGS" fi if test "$optimize" = "small"; then @@ -931,10 +937,10 @@ if test "$optimize" = "yes"; then if test -n "`$cc -v 2>&1 | grep xlc`"; then - CFLAGS="$CFLAGS -O5" - LDFLAGS="$LDFLAGS -O5" + CFLAGS="$CFLAGS -O5" + LDFLAGS="$LDFLAGS -O5" else - CFLAGS="-O3 $CFLAGS" + CFLAGS="-O3 $CFLAGS" fi fi @@ -1379,9 +1385,9 @@ diff $TMPH config.h >/dev/null 2>&1 if test $? -ne 0 ; then - mv -f $TMPH config.h + mv -f $TMPH config.h else - echo "config.h is unchanged" + echo "config.h is unchanged" fi rm -f $TMPO $TMPC $TMPE $TMPS $TMPH diff -urN -x .build -x .inst -x .sinst ffmpeg-0.4.9-pre1-orig/libavcodec/Makefile ffmpeg-0.4.9-pre1/libavcodec/Makefile --- ffmpeg-0.4.9-pre1-orig/libavcodec/Makefile 2004-06-18 15:11:15.000000000 +0200 +++ ffmpeg-0.4.9-pre1/libavcodec/Makefile 2005-08-25 21:48:24.871337600 +0200 @@ -192,12 +192,12 @@ $(AR) rc $@ $(OBJS) $(AMREXTRALIBS) $(RANLIB) $@ -$(SLIB): $(OBJS) +$(SLIB): $(OBJS) libpostproc/libpostproc.a ifeq ($(CONFIG_WIN32),yes) $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) -lib /machine:i386 /def:$(@:.dll=.def) else - $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS) + $(CC) $(SHFLAGS) -o $@ -Wl,--out-implib=libavcodec.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive $(OBJS) -Wl,--no-whole-archive $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS) endif dsputil.o: dsputil.c dsputil.h @@ -218,6 +218,7 @@ clean: $(CLEANAMR) rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ + *.dll *.dll.a \ armv4l/*.o armv4l/*~ \ mlib/*.o mlib/*~ \ alpha/*.o alpha/*~ \ @@ -269,9 +270,9 @@ install -s -m 755 $(SLIB) "$(prefix)" else install -d $(prefix)/lib - install -s -m 755 $(SLIB) $(prefix)/lib/libavcodec-$(VERSION).so - ln -sf libavcodec-$(VERSION).so $(prefix)/lib/libavcodec.so - ldconfig || true + install -m 644 libavcodec.dll.a libavcodec.a $(prefix)/lib + install -d $(prefix)/bin + install -s -m 755 $(SLIB) $(prefix)/bin endif else install: diff -urN -x .build -x .inst -x .sinst ffmpeg-0.4.9-pre1-orig/libavcodec/liba52/resample_mmx.c ffmpeg-0.4.9-pre1/libavcodec/liba52/resample_mmx.c --- ffmpeg-0.4.9-pre1-orig/libavcodec/liba52/resample_mmx.c 2003-04-16 22:03:07.000000000 +0200 +++ ffmpeg-0.4.9-pre1/libavcodec/liba52/resample_mmx.c 2005-08-25 20:05:47.417353600 +0200 @@ -7,10 +7,10 @@ and it would mean (C / MMX2 / MMX / 3DNOW) versions */ -static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL; -static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL; -static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL; -static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; +static uint64_t __attribute__((used)) __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL; +static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL; +static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL; +static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; diff -urN -x .build -x .inst -x .sinst ffmpeg-0.4.9-pre1-orig/libavformat/Makefile ffmpeg-0.4.9-pre1/libavformat/Makefile --- ffmpeg-0.4.9-pre1-orig/libavformat/Makefile 2004-04-24 17:16:23.000000000 +0200 +++ ffmpeg-0.4.9-pre1/libavformat/Makefile 2005-08-25 21:47:34.208488000 +0200 @@ -51,11 +51,12 @@ OBJS+= audio.o endif +# this is the default ! +EXTRALIBS+=-lavcodec -L../libavcodec + ifeq ($(CONFIG_AUDIO_BEOS),yes) PPOBJS+= beosaudio.o EXTRALIBS+=-lbe -lmedia -# this should be the default ! -EXTRALIBS+=-lavcodec -L../libavcodec endif ifeq ($(CONFIG_NETWORK),yes) @@ -68,6 +69,7 @@ ifeq ($(CONFIG_VORBIS),yes) OBJS+= ogg.o +EXTRALIBS+=-logg endif ifeq ($(TARGET_ARCH_SPARC64),yes) @@ -93,7 +95,7 @@ $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll -lib /machine:i386 /def:$(@:.dll=.def) else - $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) + $(CC) $(SHFLAGS) -o $@ -Wl,--out-implib=libavformat.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive $(OBJS) $(PPOBJS) -Wl,--no-whole-archive $(EXTRALIBS) endif depend: $(SRCS) @@ -105,9 +107,9 @@ install -s -m 755 $(SLIB) "$(prefix)" else install -d $(prefix)/lib - install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so - ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so - ldconfig || true + install -m 644 libavformat.dll.a libavformat.a $(prefix)/lib + install -d $(prefix)/bin + install -s -m 755 $(SLIB) $(prefix)/bin endif else install: @@ -131,7 +133,7 @@ g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< distclean clean: - rm -f *.o *.d .depend *~ *.a $(LIB) + rm -f *.o *.d .depend *~ *.a $(LIB) *.dll.a *.dll # # include dependency files if they exist diff -urN -x .build -x .inst -x .sinst ffmpeg-0.4.9-pre1-orig/vhook/Makefile ffmpeg-0.4.9-pre1/vhook/Makefile --- ffmpeg-0.4.9-pre1-orig/vhook/Makefile 2004-07-08 13:02:04.000000000 +0200 +++ ffmpeg-0.4.9-pre1/vhook/Makefile 2005-08-25 20:36:00.564531200 +0200 @@ -29,6 +29,7 @@ install -d "$(prefix)/lib/vhook" install -m 755 $(HOOKS) "$(prefix)/lib/vhook" +ifneq ($(TARGET_OS),CYGWIN) imlib2.so: imlib2.o $(CC) -g -o $@ $(SHFLAGS) $< -lImlib2 @@ -37,7 +38,17 @@ %.so: %.o $(CC) -g -o $@ $(SHFLAGS) $< +else +imlib2.so: imlib2.o + $(CC) $(SHFLAGS) -o $@ -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive $< -Wl,--no-whole-archive -lavcodec -L../libavcodec -lavformat -L../libavformat -lImlib2 + +drawtext.so: drawtext.o + $(CC) $(SHFLAGS) -o $@ -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive $< -Wl,--no-whole-archive -lavcodec -L../libavcodec -lavformat -L../libavformat `freetype-config --libs` +%.so: %.o + $(CC) $(SHFLAGS) -o $@ -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive $< -Wl,--no-whole-archive -lavcodec -L../libavcodec -lavformat -L../libavformat +endif + clean: rm -f *.o *.d .depend *.so *~ diff -urN -x .build -x .inst -x .sinst ffmpeg-0.4.9-pre1-orig/vhook/fish.c ffmpeg-0.4.9-pre1/vhook/fish.c --- ffmpeg-0.4.9-pre1-orig/vhook/fish.c 2003-06-10 03:47:41.000000000 +0200 +++ ffmpeg-0.4.9-pre1/vhook/fish.c 2004-08-25 02:05:30.000000000 +0200 @@ -38,13 +38,18 @@ #include #include #include -#include #include #include #include "framehook.h" #include "dsputil.h" +#if defined time +#undef time +#endif +#include +#include + #define SCALEBITS 10 #define ONE_HALF (1 << (SCALEBITS - 1)) #define FIX(x) ((int) ((x) * (1<