Post by Roine GustafssonPost by Iz Miror strip -x /Users/me/Desktop/libavcodec.a
strip: symbols referenced by indirect symbol table entries that can't
be stripped in: /Users/me/Desktop/libavcodec.a(mpegvideo.o)
_sse_mb
_dct_quantize_refine
_encode_picture
ya know, I don't NEED it stripped.
Use -x for .dylibs, and no stripping for .a. Static libraries should
be stripped when the executable is built.
What? No stripping, but when you strip...? Plain strip doesn't do it
either.
Post by Roine GustafssonPost by Iz MirPost by Roine GustafssonPost by Iz Mir+ LDFLAGS=`echo $LDFLAGS | sed 's/-d,//g'`
??
Why not just remove the "-d" yourself?
Well someone put it in for some reason for a static build of ffmpeg.
And seeing how you were with 0.4.6 (a simple keystroke error),
imagine what it would be like if I deleted something! Besides, it
might be require for a static ffmpeg build - I haven't tested it,
just dynamic libraries. And the -d conflicts with dynamic libraries,
but doesn't for a static ffmpeg - so I just left it there.
No, the -d was a fix that didn't work. It should be removed.
ffmpeg is supported by peer review, so expect to answer for any change
you want to make. This process leads to fewer keystroke bugs :)
But a nice pair of asbestos underwear comes in handy around here
sometimes.
Apparently so. I was thinking "What a total crotch" Ooops, one of those
keystroke errors again - I meant "NOT a total..." Great, looking
forward to more barbs.
Post by Roine GustafssonPost by Iz MirPost by Roine GustafssonPost by Iz Mir+ -compatibility_version 1 -current_version 0.4.6
Are you working on 0.4.6??? Sir, please put down your compiler and
step away from the source.
And giving a higher compatibility version than current version means
it's incompatible with itself. Why are you hard-coding the versions?
Unless you are in some obscene hurry to get dynamic libraries
backported to older releases, it's better to help this go into the
current ffmpeg CVS. Then your port file will be reduced to supplying
some options to ./configure.
wow, so I missed by 1 key. It should be a 9.
Good :)
I think there is no reasonable value for compatibility_version, so you
should probably not set it. The source changes breaks binary
compatibility less frequently these days, so maybe setting it to 0.4.9
for the future would be a good idea.
Compat 1, current 0.4.9 still works as well as anything else - it just
looks odd. As long as it doesn't complain, do whatcha like.
Post by Roine Gustafsson[...]
Post by Iz Mir------------
Regression test succeeded.
------------
Means everything is A-OK. The output you posted is normal.
Expellent!
Post by Roine GustafssonPost by Iz MirSo please resend your patch.
Apparently GMane stores the attachments. Nice.
<http://article.gmane.org/gmane.comp.video.ffmpeg.devel/19357>
Bubulah, are you meshugener? Using your patches with ogg enabled:
rm -f libavformat.a
ar rc libavformat.a utils.o cutils.o os_support.o allformats.o mpeg.o
mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o avienc.o
avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o yuv4mpeg.o 4xm.o
flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o nut.o wc3movie.o
mp3.o westwood.o segafilm.o idcin.o flic.o sierravmd.o matroska.o sol.o
electronicarts.o nsvdec.o asf.o asf-enc.o pnm.o yuv.o png.o jpeg.o
gifdec.o sgi.o avio.o aviobuf.o file.o framehook.o udp.o tcp.o http.o
rtsp.o rtp.o rtpproto.o ogg.o
ranlib libavformat.a
cc -dynamiclib -o libavformat.dylib utils.o cutils.o os_support.o
allformats.o mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o
rm.o avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o
yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o
nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o sierravmd.o
matroska.o sol.o electronicarts.o nsvdec.o asf.o asf-enc.o pnm.o yuv.o
png.o jpeg.o gifdec.o sgi.o avio.o aviobuf.o file.o framehook.o udp.o
tcp.o http.o rtsp.o rtp.o rtpproto.o ogg.o -L/opt/local/lib -lz
-lavcodec -L../libavcodec -lmp3lame -Wl,-search_paths_first
-Wl,-current_version,0.4.9,-install_name,/usr/local/lib/
libavformat.dylib
ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
_ogg_page_serialno
_ogg_stream_clear
_ogg_stream_flush
_ogg_stream_init
_ogg_stream_packetin
_ogg_stream_packetout
_ogg_stream_pagein
_ogg_stream_pageout
_ogg_sync_buffer
_ogg_sync_clear
_ogg_sync_init
_ogg_sync_pageout
_ogg_sync_wrote
/usr/bin/libtool: internal link edit command failed
There is no -logg in your patch.
----------------------
• I think prefix is being used too early, and set too late for the
library path. From the config.mak:
prefix=/opt/local
SLDFLAGS=-Wl,-current_version,$(VERSION_NUMERIC),-install_name,/usr/
local/lib/$(SLIB)
\$(prefix) then? I didn't even know a variable could be passed through
like that.
-----------------------
->• The static libraries (libavformat.a & libavcodec.a) aren't
installed, just built and forgotten. (one last thing to do)
• When I had a 1 day old library installed already, and using these new
patches I saw tons of "using something from path/*.dylib not from
path/*.dylib" errors. All anyone had to do is remove the libxx.dylib,
but I just hadn't come across this with the previous patches.
• I am coping & dealing with the embedded compat vers (they are the
same for the libraries):
otool -L ffmpeg
/opt/local/bin/ffmpeg:
/opt/local/lib/libavformat.dylib (compatibility version 0.0.0,
current version 0.4.9)
/opt/local/lib/libavcodec.dylib (compatibility version 0.0.0,
current version 0.4.9)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/opt/local/lib/libvorbis.0.dylib (compatibility version 4.0.0,
current version 4.0.0)
/opt/local/lib/libvorbisenc.2.dylib (compatibility version
3.0.0, current version 3.0.0)
/opt/local/lib/libogg.0.dylib (compatibility version 6.0.0,
current version 6.0.0)
/opt/local/lib/libxvidcore.4.dylib (compatibility version
4.0.0, current version 4.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 71.1.1)
----------------------
And the libraries aren't stripped.
+ifeq ($(CONFIG_DARWIN),yes)
+ifdef STRIP
+ $(STRIP) $(SLIB)
+endif
+endif
or something like a DARWIN_DYLIB_STRIP to config.mak.
• "make test" has the same results (wmv2 & mpeg4 have some problems).
And libquicktime picks up libavcodec - it just brings a tear to my eye.
It's a thing of booty.
--------------------------------------------------------------
Your patches are great. Thanks for seeing it through. So here are the
patches as they stand now:
--- configure Mon Feb 7 10:35:46 2005
+++ configure copy Sat Feb 19 12:42:18 2005
@@ -167,6 +167,8 @@
optimize="yes"
debug="yes"
dostrip="yes"
+installstrip="-s"
+haveldconfig="yes"
extralibs="-lm"
simpleidct="yes"
bigendian="no"
@@ -262,11 +264,16 @@
dv1394="no"
ffserver="no"
SHFLAGS="-dynamiclib"
+CFLAGS="$CFLAGS -fno-common"
extralibs=""
darwin="yes"
strip="strip -x"
-LDFLAGS="-Wl,-d,-search_paths_first"
+haveldconfig="no"
+installstrip="" #
+LDFLAGS="-Wl,-search_paths_first"
+SLDFLAGS="-Wl,-current_version,\$(VERSION_NUMERIC),-
install_name,\$(prefix)/lib/\$(SLIB)"
FFSLDFLAGS=-Wl,-bind_at_load
+SLIBSUF=".dylib"
;;
MINGW32*)
# Note: the rest of the mingw32 config is done afterwards as mingw32
@@ -1100,7 +1107,8 @@
echo "RANLIB=$ranlib" >> config.mak
if test "$dostrip" = "yes" ; then
echo "STRIP=$strip" >> config.mak
-echo "INSTALLSTRIP=-s" >> config.mak
+echo "HAVE_LDCONFIG=$haveldconfig" >> config.mak
+echo "INSTALLSTRIP=$installstrip" >> config.mak
else
echo "STRIP=echo ignoring strip" >> config.mak
echo "INSTALLSTRIP=" >> config.mak
@@ -1116,6 +1124,7 @@
echo "OPTFLAGS=$CFLAGS" >> config.mak
echo "SHCFLAGS=$SHCFLAGS">>config.mak
echo "LDFLAGS=$LDFLAGS" >> config.mak
+echo "SLDFLAGS=$SLDFLAGS" >> config.mak
echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
echo "SHFLAGS=$SHFLAGS" >> config.mak
echo "LIBPREF=$LIBPREF" >> config.mak
@@ -1247,6 +1256,11 @@
version=`grep '#define FFMPEG_VERSION '
"$source_path/libavcodec/avcodec.h" |
cut -d '"' -f 2`
echo "VERSION=$version" >>config.mak
+
+# Version guaranteed to be in x.y.z format
+version_numeric=`echo $version| sed
's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1.\2.\3/'`
+echo "VERSION_NUMERIC=$version_numeric" >>config.mak
+
# if you do not want to use encoders, disable that.
echo "#define CONFIG_ENCODERS 1" >> $TMPH
echo "CONFIG_ENCODERS=yes" >> config.mak
-----------
--- libavcodec/Makefile Sat Jan 22 12:52:00 2005
+++ libavcodec/Makefile copy Sat Feb 19 19:53:30 2005
@@ -222,7 +222,7 @@
$(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 $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
$(LDFLAGS) $(SLDFLAGS)
endif
dsputil.o: dsputil.c dsputil.h
@@ -242,7 +242,7 @@
dep: depend
clean: $(CLEANAMR)
- rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \
+ rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so *.dylib i386/*.o i386/*~
\
armv4l/*.o armv4l/*~ \
mlib/*.o mlib/*~ \
alpha/*.o alpha/*~ \
@@ -294,9 +294,16 @@
install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
else
install -d $(prefix)/lib
- install $(INSTALLSTRIP) -m 755 $(SLIB)
$(prefix)/lib/libavcodec-$(VERSION).so
- ln -sf libavcodec-$(VERSION).so $(prefix)/lib/libavcodec.so
+ifeq ($(CONFIG_DARWIN),yes)
+ifdef STRIP
+ $(STRIP) $(SLIB)
+endif
+endif
+ install $(INSTALLSTRIP) -m 755 $(SLIB)
$(prefix)/lib/libavcodec-$(VERSION_NUMERIC)$(SLIBSUF)
+ ln -sf libavcodec-$(VERSION_NUMERIC)$(SLIBSUF)
$(prefix)/lib/libavcodec$(SLIBSUF)
+ifeq ($(LDCONFIG),yes)
ldconfig || true
+endif
endif
ifeq ($(CONFIG_PP),yes)
$(MAKE) -C libpostproc $@
--- libavformat/Makefile Tue Jan 11 03:16:04 2005
+++libavformat/Makefile copy Sat Feb 19 19:54:38 2005
@@ -74,6 +74,7 @@
ifeq ($(CONFIG_VORBIS),yes)
OBJS+= ogg.o
+EXTRALIBS+=-logg
endif
ifeq ($(TARGET_ARCH_SPARC64),yes)
@@ -104,7 +105,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 $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(LDFLAGS)
$(SLDFLAGS)
endif
depend: $(SRCS)
@@ -116,10 +117,17 @@
install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
else
install -d $(prefix)/lib
- install $(INSTALLSTRIP) -m 755 $(SLIB)
$(prefix)/lib/libavformat-$(VERSION).so
- ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
+ifeq ($(CONFIG_DARWIN),yes)
+ifdef STRIP
+ $(STRIP) $(SLIB)
+endif
+endif
+ install $(INSTALLSTRIP) -m 755 $(SLIB)
$(prefix)/lib/libavformat-$(VERSION_NUMERIC)$(SLIBSUF)
+ ln -sf libavformat-$(VERSION_NUMERIC)$(SLIBSUF)
$(prefix)/lib/libavformat$(SLIBSUF)
+ifeq ($(HAVE_LDCONFIG),yes)
ldconfig || true
endif
+endif
else
install:
endif
@@ -142,7 +150,7 @@
g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
distclean clean:
- rm -f *.o *.d .depend *~ *.a *.so $(LIB)
+ rm -f *.o *.d .depend *~ *.a *.so *.dylib $(SLIB) $(LIB)
#
# include dependency files if they exist
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click