Bug 195600 - [patch] multimedia/ffmpegthumbnailer 2.0.9 build fails on FreeBSD 8.4
Summary: [patch] multimedia/ffmpegthumbnailer 2.0.9 build fails on FreeBSD 8.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Thomas Zander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-03 07:10 UTC by Don Lewis
Modified: 2014-12-25 22:51 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (clutton)


Attachments
patch to fix ffmpegthumbnailer build on FreeBSD 8.4 (1.23 KB, patch)
2014-12-03 07:10 UTC, Don Lewis
no flags Details | Diff
poudriere testport result on 9.2/amd64 (48.11 KB, text/x-log)
2014-12-09 08:22 UTC, Lawrence Chen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer freebsd_triage 2014-12-03 07:10:58 UTC
Created attachment 150133 [details]
patch to fix ffmpegthumbnailer build on FreeBSD 8.4

The multimedia/ffmpegthumbnailer port version 2.0.9 build fails on FreeBSD 8.4.  I suspect that FreeBSD 9.x is also affected since the base compiler is
still gcc 4.2.1.

===>  Building for ffmpegthumbnailer-2.0.9
/usr/bin/make  all-recursive
Making all in man
depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; c++ -DHAVE_CONFIG_H -I.    -I/usr/local/include -D__STDC_CONSTANT_MACROS  -O2 -pipe -fno-strict-aliasing -std=c++11 -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.cpp && mv -f $depbase.Tpo $depbase.Po
/bin/sh ./libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I.   -I/usr/local/include -D__STDC_CONSTANT_MACROS  -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -fno-strict-aliasing -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-moviedecoder.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c -o libffmpegthumbnailer/libffmpegthumbnailer_la-moviedecoder.lo `test -f 'libffmpegthumbnailer/moviedecoder.cpp' || echo './'`libffmpegthumbnailer/moviedecoder.cpp
/bin/sh ./libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I.   -I/usr/local/include -D__STDC_CONSTANT_MACROS  -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -fno-strict-aliasing -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-stringoperations.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-stringoperations.Tpo -c -o libffmpegthumbnailer/libffmpegthumbnailer_la-stringoperations.lo `test -f 'libffmpegthumbnailer/stringoperations.cpp' || echo './'`libffmpegthumbnailer/stringoperations.cpp
/bin/sh ./libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I.   -I/usr/local/include -D__STDC_CONSTANT_MACROS  -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -fno-strict-aliasing -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-videothumbnailer.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-videothumbnailer.Tpo -c -o libffmpegthumbnailer/libffmpegthumbnailer_la-videothumbnailer.lo `test -f 'libffmpegthumbnailer/videothumbnailer.cpp' || echo './'`libffmpegthumbnailer/videothumbnailer.cpp
cc1plus: error: unrecognized command line option "-std=c++11"
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I/usr/local/include -D__STDC_CONSTANT_MACROS -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -fno-strict-aliasing -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-moviedecoder.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c libffmpegthumbnailer/moviedecoder.cpp  -fPIC -DPIC -o libffmpegthumbnailer/.libs/libffmpegthumbnailer_la-moviedecoder.o
cc1plus: error: unrecognized command line option "-std=c++11"
*** Error code 1
*** Error code 1
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I/usr/local/include -D__STDC_CONSTANT_MACROS -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -fno-strict-aliasing -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-videothumbnailer.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-videothumbnailer.Tpo -c libffmpegthumbnailer/videothumbnailer.cpp  -fPIC -DPIC -o libffmpegthumbnailer/.libs/libffmpegthumbnailer_la-videothumbnailer.o
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I/usr/local/include -D__STDC_CONSTANT_MACROS -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -fno-strict-aliasing -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-stringoperations.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-stringoperations.Tpo -c libffmpegthumbnailer/stringoperations.cpp  -fPIC -DPIC -o libffmpegthumbnailer/.libs/libffmpegthumbnailer_la-stringoperations.o
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
*** Error code 1
*** Error code 1
4 errors
*** Error code 1
1 error
*** Error code 2
1 error
===> Compilation failed unexpectedly.


My first attempt at fixing was to add "USES= compiler:c++11-lib" to the Makefile.  That got the build to go a bit further:

libtool: compile:  g++48 -DHAVE_CONFIG_H -I. -I/usr/local/include -D__STDC_CONSTANT_MACROS -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-filmstripfilter.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-filmstripfilter.Tpo -c libffmpegthumbnailer/filmstripfilter.cpp -o libffmpegthumbnailer/libffmpegthumbnailer_la-filmstripfilter.o >/dev/null 2>&1
mv -f libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-filmstripfilter.Tpo libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-filmstripfilter.Plo
In file included from libffmpegthumbnailer/jpegwriter.h:24:0,
                 from libffmpegthumbnailer/jpegwriter.cpp:17:
/usr/local/include/jpeglib.h:954:30: error: 'FILE' has not been declared
 EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
                              ^
/usr/local/include/jpeglib.h:955:29: error: 'FILE' has not been declared
 EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
                             ^
In file included from libffmpegthumbnailer/jpegwriter.cpp:17:0:
libffmpegthumbnailer/jpegwriter.h:48:5: error: 'FILE' does not name a type
     FILE*                   m_pFile;
     ^
libtool: compile:  g++48 -DHAVE_CONFIG_H -I. -I/usr/local/include -D__STDC_CONSTANT_MACROS -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -std=c++11 -MT libffmpegthumbnailer/libffmpegthumbnailer_la-pngwriter.lo -MD -MP -MF libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-pngwriter.Tpo -c libffmpegthumbnailer/pngwriter.cpp -o libffmpegthumbnailer/libffmpegthumbnailer_la-pngwriter.o >/dev/null 2>&1
libffmpegthumbnailer/jpegwriter.cpp: In constructor 'ffmpegthumbnailer::JpegWriter::JpegWriter(const string&)':
libffmpegthumbnailer/jpegwriter.cpp:44:3: error: class 'ffmpegthumbnailer::JpegWriter' does not have any field named 'm_pFile'
 , m_pFile(NULL)
   ^
libffmpegthumbnailer/jpegwriter.cpp:48:2: error: 'm_pFile' was not declared in this scope
  m_pFile = outputFile == "-" ? stdout : fopen(outputFile.c_str(), "wb");
  ^
libffmpegthumbnailer/jpegwriter.cpp: In constructor 'ffmpegthumbnailer::JpegWriter::JpegWriter(std::vector<unsigned char>&)':
libffmpegthumbnailer/jpegwriter.cpp:60:3: error: class 'ffmpegthumbnailer::JpegWriter' does not have any field named 'm_pFile'
 , m_pFile(NULL)
   ^
libffmpegthumbnailer/jpegwriter.cpp: In destructor 'virtual ffmpegthumbnailer::JpegWriter::~JpegWriter()':
libffmpegthumbnailer/jpegwriter.cpp:76:9: error: 'm_pFile' was not declared in this scope
     if (m_pFile)
         ^
*** Error code 1
mv -f libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-pngwriter.Tpo libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-pngwriter.Plo
mv -f libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-videothumbnailer.Tpo libffmpegthumbnailer/.deps/libffmpegthumbnailer_la-videothumbnailer.Plo
1 error
*** Error code 1
1 error
*** Error code 2
1 error
===> Compilation failed unexpectedly.


I found a patch for the latter problem here: <http://sourceforge.net/p/cygwin-ports/ffmpegthumbnailer/ci/master/tree/2.0.6-jpeg.patch>

With those two changes, I can now build ffmpegthumbnailer on FreeBSD 8.4.  The build on FreeBSD 10.1 appears to be unaffected.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-03 07:10:58 UTC
Maintainer CC'd
Comment 2 clutton 2014-12-03 21:53:18 UTC
(In reply to Bugzilla Automation from comment #1)
> Maintainer CC'd

I've tested on 8x. Patch fixes the problem.
Comment 3 ml 2014-12-08 19:54:07 UTC
(In reply to Don Lewis from comment #0)
> Created attachment 150133 [details]
> patch to fix ffmpegthumbnailer build on FreeBSD 8.4
> 
> The multimedia/ffmpegthumbnailer port version 2.0.9 build fails on FreeBSD
> 8.4.  I suspect that FreeBSD 9.x is also affected since the base compiler is
> still gcc 4.2.1.

I can confirm both that this problem exists with 9.3/i386, and that with this patch I was able to compile.

Thanks.
Comment 4 Lawrence Chen 2014-12-09 08:22:35 UTC
Created attachment 150385 [details]
poudriere testport result on 9.2/amd64

In the evening of Dec 2nd, I had come up with the patch to make this build in poudriere for 9.2/amd64.  But, left it to later to see about submitting.

The only thing I did for mine was add 'compiler:c++11x-lang' to the 'USES=' line.
Comment 5 clutton 2014-12-10 07:43:31 UTC
(In reply to Lawrence Chen from comment #4)
> Created attachment 150385 [details]
> poudriere testport result on 9.2/amd64
> 
> In the evening of Dec 2nd, I had come up with the patch to make this build
> in poudriere for 9.2/amd64.  But, left it to later to see about submitting.
> 
> The only thing I did for mine was add 'compiler:c++11x-lang' to the 'USES='
> line.

For 8x the header is still needs to be modified.
Comment 6 commit-hook freebsd_committer freebsd_triage 2014-12-25 22:44:47 UTC
A commit references this bug:

Author: riggs
Date: Thu Dec 25 22:44:00 UTC 2014
New revision: 375609
URL: https://svnweb.freebsd.org/changeset/ports/375609

Log:
  Fix build on 8.x systems

  PR:		195600
  Submitted by:	truckman@FreeBSD.org
  Approved by:	clutton@zoho.com (maintainer)

Changes:
  head/multimedia/ffmpegthumbnailer/Makefile
  head/multimedia/ffmpegthumbnailer/files/patch-libffmpegthumbnailer_jpegwriter.h
Comment 7 Thomas Zander freebsd_committer freebsd_triage 2014-12-25 22:51:29 UTC
Committed, thanks!