orcaman / gmf

Automatically exported from code.google.com/p/gmf
0 stars 0 forks source link

treating errors as warnings, and there are warnings #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Not sure how to turn off treating warnings as errors, and if this is a good 
idea.

goinstall gmf.googlecode.com/hg/gmf

/bin/bash: === cd /home/richardworley/go/src/pkg/gmf.googlecode.com/hg/gmf; 
bash gomake -f- install
CGOPKGPATH=gmf.googlecode.com/hg cgo -- 
-I/home/richardworley/ffmpeg/ffmpeg/include avcodec.go avformat.go avutil.go 
swscale.go 
cc1: warnings being treated as errors
avcodec.go:44: error: 'avcodec_alloc_context' is deprecated (declared at 
/usr/local/include/libavcodec/avcodec.h:3741)
avcodec.go:63: error: 'avcodec_open' is deprecated (declared at 
/usr/local/include/libavcodec/avcodec.h:3870)
make: *** [_obj/_cgo_run] Error 2
--- exit status 2
goinstall: gmf.googlecode.com/hg/gmf: install: running bash: exit status 2

What version of the product are you using? On what operating system?

ffmpeg version N-33774-gffb7c6e, Copyright (c) 2000-2011 the FFmpeg developers
  built on Oct 18 2011 15:21:02 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
  libavutil    51. 22. 0 / 51. 22. 0
  libavcodec   53. 21. 0 / 53. 21. 0
  libavformat  53. 16. 1 / 53. 16. 1
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 44. 0 /  2. 44. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0

Using Go:
parent: 10125:6d7136d74b65 weekly weekly.2011-10-18
 weekly.2011-10-18

Have the following variables in .bashrc:
export FFMPEG_ROOT=/home/richardworley/ffmpeg/ffmpeg
export CGO_LDFLAGS="-L$FFMPEG_ROOT/lib/ -lavcodec -lavformat -lavutil -lswscale"
export CGO_CFLAGS="-I$FFMPEG_ROOT/include"
export GOROOT=$HOME/go
export GOBIN=$HOME/go/bin
export GOPATH=$HOME/go

Please provide any additional information below.

user@server:~/go/src$ grep -R Werror ./*
./cmd/cgo/gcc.go:       "-Werror",                           // warnings are errors
./pkg/crypto/tls/root_darwin.go:// Note: We disable -Werror here because the 
code in this file uses a deprecated API to stay
./quietgcc.bash:    -Werror \

Original issue reported on code.google.com by g...@worleyworks.com on 20 Oct 2011 at 8:39

GoogleCodeExporter commented 9 years ago
I commented out go/src/cmd/cgo/gcc.go "-Werror" to and ran ./all.bash
Then I ran gofix - hopefully bringing source go files up to date.

richardworley@ffmpegServer:~/go/src/pkg/gmf.googlecode.com/hg/gmf$ make
CGOPKGPATH= cgo -- -I/home/richardworley/ffmpeg/ffmpeg/include/ avformat.go 
avcodec.go avutil.go swscale.go
touch _obj/_cgo_run
6g   -p gmf -o _go_.6 Datasource.go MediaLocator.go Demultiplexer.go Track.go 
Format.go Rational.go Timestamp.go Decoder.go Encoder.go Coder.go Datasink.go 
Multiplexer.go Resizer.go Resampler.go Deinterlacer.go FrameRateConverter.go 
Buffer.go gmf.go _obj/avformat.cgo1.go _obj/avcodec.cgo1.go _obj/avutil.cgo1.go 
_obj/swscale.cgo1.go _obj/_cgo_gotypes.go
Datasource.go:17: undefined: os.ErrorString
Datasource.go:21: undefined: os.ErrorString
MediaLocator.go:11: too many arguments in call to strings.Split
MediaLocator.go:19: too many arguments in call to strings.Split
Encoder.go:25: undefined: math.Fmax
Datasink.go:23: undefined: os.ErrorString
Resampler.go:27: undefined: os.ErrorString
make: *** [_go_.6] Error 1

Running gofix - yields:
hg/gmf/Datasink.go: fixed oserrorstring
hg/gmf/Datasource.go: fixed oserrorstring
hg/gmf/Encoder.go: fixed math
hg/gmf/MediaLocator.go: fixed stringssplit
hg/gmf/Resampler.go: fixed oserrorstring

Now it tries to Make, but is running into lots of errors associated with 
libavcodec.
Here's a sample error:
ffmpeg/libavcodec/cook.c:174: undefined reference to `pow'

Original comment by g...@worleyworks.com on 20 Oct 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Habe a look into this issue

Regards,
Jan

Original comment by Jan.Hoel...@gmail.com on 20 Oct 2011 at 11:14

GoogleCodeExporter commented 9 years ago
From: 
http://mailman.videolan.org/pipermail/x264-devel/2011-July/008652.html

Replace avcodec_open with avcodec_open2. Now requires libavcodec 53.6.0 or 
newer.

Original comment by g...@worleyworks.com on 21 Oct 2011 at 4:37

GoogleCodeExporter commented 9 years ago
and from:
http://ffmpeg.org/doxygen/trunk/deprecated.html

Global avcodec_alloc_context
use avcodec_alloc_context3()

Original comment by g...@worleyworks.com on 21 Oct 2011 at 4:51