bob 1.2.0: build fails when using ffmpeg 2.0

93 görüntüleme
İlk okunmamış mesaja atla

David B. Evans

okunmadı,
5 Ağu 2013 23:43:275.08.2013
alıcı bob-...@googlegroups.com
When attempting to build bob 1.2.0 with recently released ffmpeg 2.0 as a dependency, the build fails as follows:


[ 23%] Building CXX object src/core/python/CMakeFiles/bob_core_py27.dir/typeinfo.cc.o
/opt/local/var/macports/build/_opt_macports_trunk_dports_science_bob/bob/work/bob-1.2.0/src/io/cxx/VideoUtilities.cc:49:9: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
typedef CodecID AVCodecID;
        ^~~~~~~
        AVCodecID
/opt/local/include/libavcodec/avcodec.h:100:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
1 error generated.


Build is successful with when using ffmpeg 1.2.2.

A number of deprecated API usages that were allowed in 1.2.2 are now removed in 2.0.

 

André Anjos

okunmadı,
6 Ağu 2013 02:57:026.08.2013
alıcı bob-...@googlegroups.com
Thanks for the report. I've applied a small patch (attached) that fixes the problem both on the 1.2 and on the master branch (they are now being tested: https://www.idiap.ch/software/bob/buildbot/waterfall)

As far as MacPorts goes, it would be helpful if you could test the build with the attached patch. If that works and our nightlies pass fine, I can submit the new Portfile to MacPorts by tomorrow.

A

diff --git a/src/io/cxx/VideoUtilities.cc b/src/io/cxx/VideoUtilities.cc
index 2b8e9c1..d78cc67 100644
--- a/src/io/cxx/VideoUtilities.cc
+++ b/src/io/cxx/VideoUtilities.cc
@@ -41,12 +41,11 @@ extern "C" {
 /**
  * Some code to account for older versions of ffmpeg
  */
-#ifndef AV_CODEC_ID_NONE
-#define AV_CODEC_ID_NONE CODEC_ID_NONE
-#define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
-#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
-#define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
-typedef CodecID AVCodecID;
+#if LIBAVCODEC_VERSION_INT < 0x363b64 //54.59.100 @ ffmpeg-1.0
+#  define AV_CODEC_ID_NONE CODEC_ID_NONE
+#  define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
+#  define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
+#  define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
 #endif
 
 #ifndef AV_PKT_FLAG_KEY

David Evans

okunmadı,
6 Ağu 2013 11:14:436.08.2013
alıcı bob-...@googlegroups.com
On 8/5/13 11:57 PM, Andr� Anjos wrote:
> diff --git a/src/io/cxx/VideoUtilities.cc b/src/io/cxx/VideoUtilities.cc
> index 2b8e9c1..d78cc67 100644
> --- a/src/io/cxx/VideoUtilities.cc
> +++ b/src/io/cxx/VideoUtilities.cc
> @@ -41,12 +41,11 @@ extern "C" {
> /**
> * Some code to account for older versions of ffmpeg
> */
> -#ifndef AV_CODEC_ID_NONE
> -#define AV_CODEC_ID_NONE CODEC_ID_NONE
> -#define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
> -#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
> -#define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
> -typedef CodecID AVCodecID;
> +#if LIBAVCODEC_VERSION_INT < 0x363b64 //54.59.100 @ ffmpeg-1.0
> +# define AV_CODEC_ID_NONE CODEC_ID_NONE
> +# define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
> +# define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
> +# define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
> #endif
>
> #ifndef AV_PKT_FLAG_KEY
Andr� --

This patch fixes the problem for me. I was able to build cleanly using
the following ffmpeg versions:

ffmpeg-1.2.2 (current MacPorts ffmpeg @1.2.2_0+gpl2+universal)
ffmpeg recent master (current MacPorts ffmpeg-devel
@20130727_1+gpl2+universal)
ffmpeg-2.0 (not yet released MacPorts ffmpeg @2.0_0+gpl2+universal)

If you agree, I will commit your modified port as soon as you post it.

Dave

André Anjos

okunmadı,
6 Ağu 2013 11:19:206.08.2013
alıcı bob-...@googlegroups.com
Thanks, Dave. I still need to wait for our nightlies to make sure the fix will compile for older versions of ffmpeg. If that works out, I'll provide a Portfile patch through your ticket tomorrow. A


On Tue, Aug 6, 2013 at 5:14 PM, David Evans <db.e...@gmail.com> wrote:
On 8/5/13 11:57 PM, André Anjos wrote:
> diff --git a/src/io/cxx/VideoUtilities.cc b/src/io/cxx/VideoUtilities.cc
> index 2b8e9c1..d78cc67 100644
> --- a/src/io/cxx/VideoUtilities.cc
> +++ b/src/io/cxx/VideoUtilities.cc
> @@ -41,12 +41,11 @@ extern "C" {
>  /**
>   * Some code to account for older versions of ffmpeg
>   */
> -#ifndef AV_CODEC_ID_NONE
> -#define AV_CODEC_ID_NONE CODEC_ID_NONE
> -#define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
> -#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
> -#define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
> -typedef CodecID AVCodecID;
> +#if LIBAVCODEC_VERSION_INT < 0x363b64 //54.59.100 @ ffmpeg-1.0
> +#  define AV_CODEC_ID_NONE CODEC_ID_NONE
> +#  define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
> +#  define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
> +#  define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
>  #endif
>
>  #ifndef AV_PKT_FLAG_KEY
André --


This patch fixes the problem for me.  I was able to build cleanly using
the following ffmpeg versions:

ffmpeg-1.2.2 (current MacPorts ffmpeg @1.2.2_0+gpl2+universal)
ffmpeg recent master (current MacPorts ffmpeg-devel
@20130727_1+gpl2+universal)
ffmpeg-2.0 (not yet released MacPorts ffmpeg @2.0_0+gpl2+universal)

If you agree, I will commit your modified port as soon as you post it.

Dave

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Dr. André Anjos
Idiap Research Institute
Centre du Parc - rue Marconi 19
CH-1920 Martigny, Suisse
Phone: +41 27 721 7763
Fax: +41 27 721 7712
http://andreanjos.org

David Evans

okunmadı,
7 Ağu 2013 11:57:047.08.2013
alıcı bob-...@googlegroups.com
On 8/6/13 8:19 AM, Andr� Anjos wrote:
> Thanks, Dave. I still need to wait for our nightlies to make sure the
> fix will compile for older versions of ffmpeg. If that works out, I'll
> provide a Portfile patch through your ticket tomorrow. A
>
Andr� --

I committed your patch this morning but looks like the build failed on
buildbot for Snow Leopard. Lion and ML are ok.

The Buildbot has detected a failed build on builder buildports-snowleopard-x86_64 while building MacPorts.
Full details are available at:
http://build.macports.org/builders/buildports-snowleopard-x86_64/builds/19393


Dave


André Anjos

okunmadı,
7 Ağu 2013 12:02:427.08.2013
alıcı bob-...@googlegroups.com
Hi Dave, that is a bit strange... there is no information on the status link that failed. Maybe a random failure? Could you please re-run that build by hand? A


On Wed, Aug 7, 2013 at 5:57 PM, David Evans <db.e...@gmail.com> wrote:
On 8/6/13 8:19 AM, André Anjos wrote:
> Thanks, Dave. I still need to wait for our nightlies to make sure the
> fix will compile for older versions of ffmpeg. If that works out, I'll
> provide a Portfile patch through your ticket tomorrow. A
>
André --


I committed your patch this morning but looks like the build failed on
buildbot for Snow Leopard.  Lion and ML are ok.

The Buildbot has detected a failed build on builder buildports-snowleopard-x86_64 while building MacPorts.
Full details are available at:
 http://build.macports.org/builders/buildports-snowleopard-x86_64/builds/19393


Dave


--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


David Evans

okunmadı,
7 Ağu 2013 12:22:127.08.2013
alıcı bob-...@googlegroups.com
On 8/7/13 9:02 AM, Andr� Anjos wrote:
> Hi Dave, that is a bit strange... there is no information on the
> status link that failed. Maybe a random failure? Could you please
> re-run that build by hand? A
>
Sorry, build log is here ->
https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/19393/steps/compile/logs/stdio

André Anjos

okunmadı,
7 Ağu 2013 12:38:407.08.2013
alıcı bob-...@googlegroups.com
Thanks,

This problem is related to the fact that SL brings an older version of clang which does not support some C++11 features we have at the code.

Is there a simple way, on the Portfile, to specify we need gcc47 to compile Bob under SnowLeopard?

A


On Wed, Aug 7, 2013 at 6:22 PM, David Evans <db.e...@gmail.com> wrote:
--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


André Anjos

okunmadı,
7 Ağu 2013 12:57:447.08.2013
alıcı bob-...@googlegroups.com
The compiler line is indicating gcc-4.2.1, which I think was the default on SL. Bob should be compiled against a newer version of gcc (such as 4.4 onwards) or a modern version of clang (such as the one on Lion). I'm not sure how to conditionally set this on the Portfile. The CMake variables CC and CXX would have be set accordingly for that case. Please let me know, A

On Wednesday, August 7, 2013 6:38:40 PM UTC+2, André Anjos wrote:
Thanks,

This problem is related to the fact that SL brings an older version of clang which does not support some C++11 features we have at the code.

Is there a simple way, on the Portfile, to specify we need gcc47 to compile Bob under SnowLeopard?

A
On Wed, Aug 7, 2013 at 6:22 PM, David Evans <db.e...@gmail.com> wrote:
On 8/7/13 9:02 AM, André Anjos wrote:
> Hi Dave, that is a bit strange... there is no information on the
> status link that failed. Maybe a random failure? Could you please
> re-run that build by hand? A
>
Sorry, build log is here ->
https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/19393/steps/compile/logs/stdio

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/

---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


David Evans

okunmadı,
7 Ağu 2013 13:12:587.08.2013
alıcı bob-...@googlegroups.com
On 8/7/13 9:38 AM, Andr� Anjos wrote:
> Thanks,
>
> This problem is related to the fact that SL brings an older version of
> clang which does not support some C++11 features we have at the code.
>
> Is there a simple way, on the Portfile, to specify we need gcc47 to
> compile Bob under SnowLeopard?
>
> A
>
>
Yes, you can use

configure.compiler gcc47

see man portfile:

configure.compiler
Selects a complete compiler suite to use. This option will
override the compiler environment variable
for all compilers the named suite features. gcc-3.3 gcc-4.0
gcc-4.2 llvm-gcc-4.2 clang use the standard Xcode compiler
suites, apple-gcc-4.0 apple-gcc-4.2 use Apple's gcc suite
installed via MacPorts, macports-gcc-4.2 macports-gcc-4.3
macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6
macports-gcc-4.7 macports-gcc-4.8 macports-llvm-gcc-4.2
use the vanilla compiler suites installed via MacPorts.
Setting configure.compiler will now automatically add a dependency if
the chosen compiler is provided by a port

Type: optional

Values: gcc-3.3 gcc-4.0 gcc-4.2 llvm-gcc-4.2 clang
apple-gcc-4.0 apple-gcc-4.2 macports-gcc-4.2
macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5
macports-gcc-4.6
macports-gcc-4.7 macports-gcc-4.8 macports-llvm-gcc-4.2
macports-clang-2.9 macports-clang-3.0
macports-clang-3.1
macports-clang-3.2 macports-clang-3.3
macports-dragonegg-3.0 through macports-dragonegg-3.3

Example:
configure.compiler llvm-gcc-4.2


André Anjos

okunmadı,
7 Ağu 2013 13:26:477.08.2013
alıcı bob-...@googlegroups.com
Ok, thanks, but how to entangle this to SL builds only?

From another perspective, it would also work out if we could specify a minimum XCode version with which the package can compile. I'm not sure neither of those are possible...

And to tell you the truth, I'm not sure how those were compiling before and are not anymore. Could it be that your build servers have different versions of XCode in each of your SL build slaves?

A


On Wed, Aug 7, 2013 at 7:12 PM, David Evans <db.e...@gmail.com> wrote:
--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


David Evans

okunmadı,
7 Ağu 2013 13:52:227.08.2013
alıcı bob-...@googlegroups.com
On 8/7/13 10:26 AM, Andr� Anjos wrote:
> Ok, thanks, but how to entangle this to SL builds only?
>
> From another perspective, it would also work out if we could specify a
> minimum XCode version with which the package can compile. I'm not sure
> neither of those are possible...
>
> And to tell you the truth, I'm not sure how those were compiling
> before and are not anymore. Could it be that your build servers have
> different versions of XCode in each of your SL build slaves?
>
> A
>
>
Here's a patch that will cover SL and earlier (once in a while someone
complains that something doesn't build
on Tiger!). Is it necessary to add something like -std=c++11 to
compiler.cflags ?

Index: Portfile
===================================================================
--- Portfile (revision 109056)
+++ Portfile (working copy)
@@ -48,6 +48,15 @@
port:libsvm \
port:qt4-mac

+#
+# fix build on SL and earlier
+# compiler needs to support C++11 features
+#
+
+if {${os.platform) == "darwin" && ${os.major} < 11} {
+ configure.compiler macports-clang-3.1
+}
+
configure.args -DCMAKE_BUILD_TYPE=Release -DBOB_VERSION=${version}
-DBOB_SOVERSION=${soversion}

# blitz is not universal



André Anjos

okunmadı,
7 Ağu 2013 14:12:577.08.2013
alıcı bob-...@googlegroups.com
Thanks for the patch, that would work IFF the cmake port group automatically sets the compiler from "configure.compiler".

We don't need special flags (they are set by CMake automatically).

Will you apply it?

On Wednesday, August 7, 2013 7:52:22 PM UTC+2, David B. Evans wrote:

David Evans

okunmadı,
7 Ağu 2013 14:29:397.08.2013
alıcı bob-...@googlegroups.com
On 8/7/13 11:12 AM, Andr� Anjos wrote:
> Thanks for the patch, that would work IFF the cmake port group
> automatically sets the compiler from "configure.compiler".
>
> We don't need special flags (they are set by CMake automatically).
>
> Will you apply it?
>
I tried building the port on my machine (ML) using the new compiler
(disabled the if) and all built well so will commit and see
what happens on buildbot.

configure.compiler overrides all the various compiler environment
variables and flags as appropriate for the selected compiler so
CMake picks up on that.

As far as the various buildbot builders go, I believe that each is
configured with the latest version of XCode that will install on
that OS version.

Dave

David Evans

okunmadı,
7 Ağu 2013 15:12:317.08.2013
alıcı bob-...@googlegroups.com
On 8/7/13 11:12 AM, Andr� Anjos wrote:
> Thanks for the patch, that would work IFF the cmake port group
> automatically sets the compiler from "configure.compiler".
>
> We don't need special flags (they are set by CMake automatically).
>
> Will you apply it?
>
SL build was successful. Just a few warnings about hidden virtual
overloads.

Build log is here ->
https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/19395/steps/compile/logs/stdio

Thanks for bearing with me. I know it must be late where you are.

Dave

André Anjos

okunmadı,
7 Ağu 2013 16:09:107.08.2013
alıcı bob-...@googlegroups.com
Thanks for your work, Dave. A

On Wednesday, August 7, 2013 9:12:31 PM UTC+2, David B. Evans wrote:

David Evans

okunmadı,
8 Ağu 2013 11:24:278.08.2013
alıcı bob-...@googlegroups.com
On 8/7/13 1:09 PM, André Anjos wrote:
Thanks for your work, Dave. A

André --

One last change in the bob Portfile.  One of the MacPorts developers (jere...@macports.org) pointed out that the compiler patch we made to fix the SL build would probably fail for ppc architectures on OS X 10.5 and earlier.  Apparently the only compilers that support C++X11 for ppc architectures are recent versions of gcc.  He, therefore, committed the following patch:

https://trac.macports.org/changeset/109059

This uses the compiler_blacklist_versions PortGroup which constructs a list of possible compilers in a preference ordered fallback list. This list includes all compilers available to MacPorts not just those supplied by Xcode.  compilers.whitelist and compilers.blacklist can then be used to modify the fallback list.  Note that version constraints are also possible: clang < 300 excludes the 2.9 version of clang provided by Xcode on SL.  White-listed compilers take precedence.

Therefore, the effect of this modification is to use gcc47 on ppc and ppc64 architectures regardless of OS version.  The Xcode version of clang is used on Lion
and ML where the version is 3.0 or greater (same as before).  The fallback on SL and earlier is now MacPorts clang-3.3 (not entirely obvious).

Sorry for the long message but I thought that a detailed explanation might be useful since there is very little documentation on this PortGroup (jeremyhu is its author).

I incremented the revision number on the port this morning to force a rebuild on the buildbots.  All builds completed successfully. Note, however, that the port has not been tested on a ppc platform since none are currently available here for testing.  ppc support remains theoretical at this point.

New build log for SL is here: 

https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/19468/steps/compile/logs/stdio

Dave

André Anjos

okunmadı,
8 Ağu 2013 11:31:198.08.2013
alıcı bob-...@googlegroups.com
Thanks for these detailed account, Dave. It is awesome work. You are now upgraded to Bob OSX master ;-) A
Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti