Page 1 of 1

error Compiling Vice - Solved

Posted: Sun 03 Jun 2012, 23:20
by Tman
I decided to compile Vice for Slacko 5.3.3, mainly becuase I was bored.

Slacko already had most of the dependencies, but I needed to compile libXmu, first.

After having done that, I tried compiling Vice, with the following .configure options:
--prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-linux-gnu --enable-static-lame --without-esd --with-x

I got the following error messages:

Code: Select all

In file included from ffmpegdrv.c:35:0:
ffmpeglib.h:64:1: warning: 'ByteIOContext' is deprecated (declared at /usr/include/libavformat/avio.h:50)
ffmpeglib.h:65:1: warning: 'ByteIOContext' is deprecated (declared at /usr/include/libavformat/avio.h:50)
ffmpegdrv.c: In function 'ffmpegmovie_init_audio':
ffmpegdrv.c:310:21: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function)
ffmpegdrv.c:310:21: note: each undeclared identifier is reported only once for each function it appears in
ffmpegdrv.c: In function 'ffmpegmovie_encode_audio':
ffmpegdrv.c:337:22: error: 'PKT_FLAG_KEY' undeclared (first use in this function)
ffmpegdrv.c: In function 'ffmpegdrv_init_video':
ffmpegdrv.c:526:21: error: 'CODEC_TYPE_VIDEO' undeclared (first use in this function)
ffmpegdrv.c: In function 'ffmpegdrv_record':
ffmpegdrv.c:771:22: error: 'PKT_FLAG_KEY' undeclared (first use in this function)
make[3]: *** [ffmpegdrv.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
I did end up managing to compile Vice after adding --disable-ffmpeg to the options mentioned above.

But I don't understand what the error messages mean and why it doesn't allow me to compile with ffmpeg?

Does anyone have any ideas on this?

Posted: Mon 04 Jun 2012, 18:44
by Tman
For those who may try to compile it in the future, I should mention that a small hack is needed:
After extracting the source, you need to edit line 348 of the file named /src/arch/unix/x11/xaw/x11video.c and replaced "X_ShmAttach" with "1"
Then, just .configure and make

Also, Vice-2.2 for Slacko (without ffmpeg) is available for anyone who wants to try:
http://www.murga-linux.com/puppy/viewtopic.php?t=78776

Posted: Thu 07 Jun 2012, 22:25
by Karl Godt
I would probably

Code: Select all

grep -R CODEC_TYPE_AUDIO /usr/include
and if found a header that contains the searched definition, check the ffmpegdrv.c if that has a #include <HEADER> line containing the header . Another possibility is recompile ffmpeg which comes in versions 5.x, 6.x, 7.x, 8.x, 9.x ... so to have the needed header .

Posted: Sat 09 Jun 2012, 20:47
by Tman
Thanks Karl fort the feedback.

I tried your suggested code and got no return output.

I tried compiling ffmpeg 10.3, but it gave me errors concerning "libmpcodecs". For example:

Code: Select all

libavfilter/libmpcodecs/vf_fspp.c:938: Warning: missing operand; zero assumed
Ah well.. I don't know if it's worth pursuing this any further.

Posted: Sun 10 Jun 2012, 03:12
by Karl Godt
I think to download version 0.5.8 first and then upwards would be a better PATH to go than always the very latest.
January 12, 2012, FFmpeg 0.8.10, 0.7.11, 0.6.5, 0.5.8

We have made 4 new point releases, (0.5.8, 0.6.5, 0.7.11 and 0.8.10). All of them contain fixes for CVE-2011-3892 (already in previous 0.8 and 0.7 releases), CVE-2011-3893, and CVE-2011-3895. In addition 0.8.10 and 0.7.11 contain all critical security fixes from 0.9.1. We recommend users, distributors and system integrators to upgrade unless they use current git master. We recommend everyone to upgrade to at least 0.7.11, 0.8.10 or 0.9.1.
http://ffmpeg.org/

Posted: Sun 10 Jun 2012, 21:40
by Tman
Karl Godt wrote:I think to download version 0.5.8 first and then upwards would be a better PATH to go than always the very latest.
Thanks Karl, I am still getting errors compiling ffmpeg. I checked online and a lot other people were getting the same errors as me. Unfortunately, I did not find a solution. Anyhow, I'm not gonna beat my head over it.
Vice works without ffmpeg, and I have lost interest in doing any further work with it.

Posted: Sat 06 Oct 2012, 19:00
by Tman
Just to wrap up this thread.

I finally was able to compile ffmpeg from info from other threads in this forum (sorry, I'm too lazy to find the link at the moment).

But one solution was to add this before configuring and compiling:

Code: Select all

export LDFLAGS="-Wl,-L/lib,-L/usr/lib,-L/usr/X11R7/lib"
And Shinobar's solution was this:

Code: Select all

export LIBRARY_PATH=$LD_LIBRARY_PATH
I didn't see the harm in using both options, and ffmpeg compiled fine for me afterwards, although I have not done any more work with Vice commodore emulator.