Bug 184500 - [patch] multimedia/ffmpeg0: configure reports opencv-core not found after update to 2.4.7
Summary: [patch] multimedia/ffmpeg0: configure reports opencv-core not found after upd...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-04 20:00 UTC by Lawrence Chen
Modified: 2013-12-04 22:40 UTC (History)
1 user (show)

See Also:


Attachments
patch (474 bytes, patch)
2013-12-04 20:00 UTC, Lawrence Chen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lawrence Chen 2013-12-04 20:00:00 UTC
	

	root@zen:/usr/ports/multimedia/ffmpeg0 236# make
	===>  License GPLv2 LGPL21 GPLv3 LGPL3 accepted by the user
	===>  Found saved configuration for ffmpeg0-0.7.16,1
	===> Fetching all distfiles required by ffmpeg0-0.7.16_1,1 for building
	===>  Extracting for ffmpeg0-0.7.16_1,1
	=> SHA256 Checksum OK for ffmpeg-0.7.16.tar.bz2.
	===>  Patching for ffmpeg0-0.7.16_1,1
	===>  Applying FreeBSD patches for ffmpeg0-0.7.16_1,1
	===>   ffmpeg0-0.7.16_1,1 depends on executable: yasm - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/bin/as - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/bin/texi2html - found
	===>   ffmpeg0-0.7.16_1,1 depends on executable: gmake - found
	===>   ffmpeg0-0.7.16_1,1 depends on executable: pkgconf - found
	===>   	ffmpeg0-0.7.16_1,1 depends on file: /usr/local/include/frei0r.h - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/include/vdpau/vdpau.h - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/libdata/pkgconfig/xext.pc - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/libdata/pkgconfig/xfixes.pc - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/bin/sdl-config - found
	===>   ffmpeg0-0.7.16_1,1 depends on file: /usr/local/bin/perl5.16.3 - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libaacplus.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libasound.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libopencore-amrnb.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libopencore-amrwb.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libcelt0.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libdirac_encoder.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libfaac.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libfreetype.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libgsm.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libmp3lame.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libopencv_imgproc.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libopenjpeg.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: librtmp.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libschroedinger-1.0.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libspeex.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libtheora.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libva.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libvorbisenc.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libvpx.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libx264.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: libxvidcore.so - found
	===>   ffmpeg0-0.7.16_1,1 depends on shared library: SDL-1.2 - found
	===>  Configuring for ffmpeg0-0.7.16_1,1
	ERROR: opencv-core not found
	
	If you think configure made a mistake, make sure you are using the latest
	version from Git.  If the latest version fails, report the problem to the
	ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
	Include the log file "config.log" produced by configure as this will help
	solving the problem.
	===>  Script "configure" failed unexpectedly.
	Please report the problem to wg@FreeBSD.org [maintainer] and attach the
	"/usr/ports/multimedia/ffmpeg0/work/ffmpeg-0.7.16/config.err" including the
	output of the failure of your make command. Also, it might be a good idea to
	provide an overview of all packages installed on your system (e.g. a
	/usr/sbin/pkg_info -Ea).
	*** [do-configure] Error code 1
	
	Stop in /usr/ports/multimedia/ffmpeg0.
	*** [build] Error code 1
	
	Stop in /usr/ports/multimedia/ffmpeg0.

Fix: At the end of config.log:

	BEGIN /tmp/ffconf.N00ytKj2.c
	    1   #include <opencv2/core/core_c.h>
	    2   long check_cvCreateImageHeader(void) { return (long) cvCreateImageHeader; }
	    3   int main(void) { return 0; }
	END /tmp/ffconf.N00ytKj2.c
	cc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -O2 -fno-strict-aliasing -pipe -march=nocona -DNO_IDEA -msse -O3 -ffast-math -fno-finite-math-only -fomit-frame-pointer -I/usr/local/include/vorbis -I/usr/local/include -std=c99 -fomit-frame-pointer -fPIC -I/usr/local/include/dirac -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/opencv -I/usr/local/include /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_imgproc.so -c -o /tmp/ffconf.aykNe0mf.o /tmp/ffconf.N00ytKj2.c
	cc: /usr/local/lib/libopencv_core.so: linker input file unused because linking not done
	cc: /usr/local/lib/libopencv_imgproc.so: linker input file unused because linking not done
	cc -Wl,-rpath=/usr/lib:/usr/local/lib -L/usr/local/lib -Wl,--as-needed -I/usr/local/include/opencv -I/usr/local/include /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_imgproc.so -o /tmp/ffconf.r561Dg6C /tmp/ffconf.aykNe0mf.o -lopencore-amrwb -lopencore-amrnb -lmp3lame -lgsm -L/usr/local/lib -lfreetype -lfaac -L/usr/local/lib -ldirac_encoder -ldirac_decoder -lstdc++ -laacplus -lcelt0 -lva -lm -lbz2 -lz -pthread
	/tmp/ffconf.aykNe0mf.o: In function `check_cvCreateImageHeader':
	ffconf.N00ytKj2.c:(.text+0x3): undefined reference to `cvCreateImageHeader'
	ERROR: opencv-core not found

	But, typing out my own ffconf.c and trying it as:

	cc -o ffconf ffconf.c -L/usr/local/lib -lopencv_core

	worked...so after some trial and error, found that the '-Wl,--as-needed'
	switch is causing the error.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-04 20:00:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 William Grzybowski 2013-12-04 20:38:15 UTC
Hi,

It really doesn't sound like a fix, but an ugly workaround to make it build.

-- 
William Grzybowski
------------------------------------------
Curitiba/PR - Brasil
Comment 3 William Grzybowski freebsd_committer freebsd_triage 2013-12-04 22:31:43 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-04 22:31:47 UTC
Author: wg
Date: Wed Dec  4 22:31:40 2013
New Revision: 335645
URL: http://svnweb.freebsd.org/changeset/ports/335645

Log:
  multimedia/ffmpeg0: temporary workaround for opencv issue
  
  PR:		ports/184500
  Submitted by:	Lawrence Chen <lchen zen.lhaven.homeip.net>

Modified:
  head/multimedia/ffmpeg0/Makefile

Modified: head/multimedia/ffmpeg0/Makefile
==============================================================================
--- head/multimedia/ffmpeg0/Makefile	Wed Dec  4 22:23:20 2013	(r335644)
+++ head/multimedia/ffmpeg0/Makefile	Wed Dec  4 22:31:40 2013	(r335645)
@@ -413,6 +413,7 @@ post-patch:
 		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
 	@${REINPLACE_CMD} -e 's|-ldl||; s|$$(LIBMAJOR)|${SHLIB_VER}|g;' \
 		-e 's|opencv opencv/cxcore.h|opencv-core opencv2/core/core_c.h|g' \
+		-e 's|check_ldflags -Wl,--as-needed||' \
 		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
 	@${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL5}|g' \
 		${WRKSRC}/doc/texi2pod.pl
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"