Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#49051 closed update (fixed)

Update: VLC 2.2.1 with fix for the lua 5.3 incompatibility

Reported by: RJVB (René Bertin) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch maintainer Cc: ramundsen85
Port: VLC

Description

Attached is a port:VLC version that bumps VLC to v2.2.1, and provides a solution for the incompatibility issue introduced by Lua 5.3 .

VLC version 2.2.2 is supposed to be compatible with Lua 5.3; earlier 2.2 versions actually search first for Lua 5.2 . I added a patch to make this work with port:lua52; this will hopefully be a temporary fix.

Attachments (8)

VLC.diff (28.9 KB) - added by RJVB (René Bertin) 9 years ago.
diff against port:VLC version 2.1.5_6
VLC.tar.2.bz2 (16.9 KB) - added by RJVB (René Bertin) 9 years ago.
patch-opencv_example_include.diff (454 bytes) - added by ramundsen85 9 years ago.
insert missing include header in modules/video_filter/opencv_example.cpp
patch-linker_framework_option.diff (4.1 KB) - added by ramundsen85 9 years ago.
fix linker flags in modules/video_filter/
Portfile.diff (804 bytes) - added by ramundsen85 9 years ago.
second patch for Portfile to include another two patches
Portfile2.diff (462 bytes) - added by ramundsen85 9 years ago.
Portfile patch for 2.2.2 version
patch-opencv_includes.diff (344 bytes) - added by ramundsen85 9 years ago.
add missing include files for opencv
VLC.tar.bz2 (20.1 KB) - added by RJVB (René Bertin) 9 years ago.
upgraded to 2.2.2

Download all attachments as: .zip

Change History (29)

comment:1 Changed 9 years ago by RJVB (René Bertin)

NB: this port also provides libVLC, which IMHO has much more reason to be in MacPorts than the VLC application which can just as well be installed with the official installer.

Changed 9 years ago by RJVB (René Bertin)

Attachment: VLC.diff added

diff against port:VLC version 2.1.5_6

Changed 9 years ago by RJVB (René Bertin)

Attachment: VLC.tar.2.bz2 added

comment:2 Changed 9 years ago by RJVB (René Bertin)

Grrr, was sloppy creating the diff and tarball, and now updating the tarball attachment. :/

comment:3 Changed 9 years ago by mf2k (Frank Schima)

Keywords: maintainer added

comment:4 Changed 9 years ago by ramundsen85

Thank you for providing your port files. I another ticket you mentioned, that you use OS X 10.9. So I tried with OS X 10.11.

With default variant (+qtkit+quartz) I could not build the port due to failures in the modules/video_filter/ part. First there is a missing include header (patch-opencv_example_include.diff) and then problems with linker flags, for example:

-l-framework Cocoa

This can be solved (patch-linker_framework_option.diff) by changing the flag to

-Wl,-framework,Cocoa

The problem is, the Makefile to patch will be created during configuration. So, I wrote my own patch command into post-configure{}. I'm wondering if there is a proper solution for this. The attached Portfile.diff has to be used on the Portfile provided in VLC.tar.bz2.

Version 0, edited 9 years ago by ramundsen85 (next)

Changed 9 years ago by ramundsen85

insert missing include header in modules/video_filter/opencv_example.cpp

Changed 9 years ago by ramundsen85

fix linker flags in modules/video_filter/

Changed 9 years ago by ramundsen85

Attachment: Portfile.diff added

second patch for Portfile to include another two patches

comment:5 Changed 9 years ago by ramundsen85

Cc: framic5@… added

Cc Me!

comment:6 in reply to:  4 ; Changed 9 years ago by RJVB (René Bertin)

Replying to framic5@…:

problems with linker flags, for example:

-l-framework Cocoa

That's weird, that should fail on any OS X version...

The problem is, the Makefile to patch will be created during configuration. So, I wrote my own patch command into post-configure{}. I'm wondering if there is a proper solution for this. The attached Portfile.diff has to be used on the Portfile provided in VLC.tar.bz2.

The proper way would be to figure out where the linker option error comes from and then either fix the autoconf/automake system if that's the source, or the Makefile.am file (or whatever). I'm double-checking if it's not an error I overlooked; I don't think I've every built only with the default variants.

comment:7 in reply to:  6 Changed 9 years ago by ramundsen85

Replying to rjvbertin@…:

The proper way would be to figure out where the linker option error comes from and then either fix the autoconf/automake system if that's the source, or the Makefile.am file (or whatever).

Yes, I tried to do this. But I can not find the wrong flag. Not in Makefile.am not even with using find to see if the flag appears somewhere else in the sources. So my guess was, that this happens during creation of Makefile.

comment:8 Changed 9 years ago by RJVB (René Bertin)

If I look at the raw files after port extract VLC, a grep 'framework.*Cocoa' -R port work VLC/vlc* reveals nothing that suggests that your issue might occur.

If you're interested, you can do search for l-framework after port extract VLC, port patch VLC, and port configure VLC. It might even be a good idea to do it after the autoreconf step (by interrupting or suspending the port command as soon as the actual configure command is started).

What does your log show for these 2 lines?

checking build system type... x86_64-apple-darwin13.4.0
checking host system type... x86_64-apple-darwin13.4.0

comment:9 in reply to:  8 Changed 9 years ago by ramundsen85

Replying to rjvbertin@…:

If you're interested, you can do search for l-framework after port extract VLC, port patch VLC, and port configure VLC. It might even be a good idea to do it after the autoreconf step (by interrupting or suspending the port command as soon as the actual configure command is started).

No matches after port extract, port patch and autoreconf (interrupted by setting configure.cmd to an invalid command). After port configure I get 94 matches (87 in several Makefiles, rest in config.log and config.status).

I'm wondering why I only run into problems with the video_filter Makefile and not with the others. I looked at the failing command again and saw, that the linker flag is truncated:

libtool: link: /usr/bin/clang  -o .libs/libopencv_wrapper_plugin.dylib -bundle  .libs/libopencv_wrapper_plugin_la-opencv_wrapper.o   ../../compat/.libs/libcompat.a -L/opt/local/lib -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.1/contrib/lib ../../src/.libs/libvlccore.dylib -lintl -lidn -liconv -lm -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_hal -lpng -ltiff -ljasper -ljpeg -lImath -lIlmImf -lIex -lHalf -lIlmThread -lavcodec -lavformat -lavutil -lswscale -lavresample -lz -lbz2 -l-framework  -Os -arch x86_64 -O3 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-headerpad_max_install_names   -Wl,-exported_symbols_list,.libs/libopencv_wrapper_plugin-symbols.expsym
ld: library not found for -l-framework
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [libopencv_wrapper_plugin.la] Error 1

-l-framework is everything what's left from 5 flags. Compared to the command after I apply my patch on Makefile:

libtool: link: /usr/bin/clang  -o .libs/libopencv_wrapper_plugin.dylib -bundle  .libs/libopencv_wrapper_plugin_la-opencv_wrapper.o   ../../compat/.libs/libcompat.a -L/opt/local/lib -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.1/contrib/lib ../../src/.libs/libvlccore.dylib -lintl -lidn -liconv -lm -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_hal -lpng -ltiff -ljasper -ljpeg -lImath -lIlmImf -lIex -lHalf -lIlmThread -lavcodec -lavformat -lavutil -lswscale -lavresample -lz -lbz2  -Os -arch x86_64 -O3 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-framework -Wl,Cocoa -Wl,-framework -Wl,VideoDecodeAcceleration -Wl,-framework -Wl,QTKit -Wl,-framework -Wl,QuartzCore -Wl,-framework -Wl,AppKit   -Wl,-exported_symbols_list,.libs/libopencv_wrapper_plugin-symbols.expsym

What does your log show for these 2 lines?

:info:configure checking build system type... x86_64-apple-darwin15.0.0
:info:configure checking host system type... x86_64-apple-darwin15.0.0

comment:10 Changed 9 years ago by RJVB (René Bertin)

framic5 : my bad, I completely forgot about your patches. Do you mind checking and where necessary updating them after this port update to VLC 2.2.2 ?

comment:11 Changed 9 years ago by ramundsen85

I tested the port provided, thank you for that. But I'm facing new problems:

In file included from opencv_wrapper.c:42:
In file included from /opt/local/include/opencv2/core/core_c.h:48:
/opt/local/include/opencv2/core/types_c.h:929:13: error: implicit declaration of function 'cvRound' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ipt.x = cvRound(point.x);
            ^

The function in question is declared in opencv2/core/fast_math.hpp. I'll try to find out why it is not included.

It seems, in comment:6 we have some open issues. Do we know that we have a general problem here with OS X 10.11 or if this is problem from my side? I'll by happy to work on this, but I want to make sure this is of general interest.

Last edited 9 years ago by ramundsen85 (previous) (diff)

comment:12 Changed 9 years ago by ramundsen85

Ok, all problems I reported with 2.2.1 are gone with your new port version. To get the new port installed, I only had to include the fast_math.hpp header.

I'll attach the 2.2.2 Portfile patch file and the header include patch file which did the trick for my system.

Changed 9 years ago by ramundsen85

Attachment: Portfile2.diff added

Portfile patch for 2.2.2 version

Changed 9 years ago by ramundsen85

Attachment: patch-opencv_includes.diff added

add missing include files for opencv

comment:13 Changed 9 years ago by RJVB (René Bertin)

Sorry, I saw your earlier message about the C99 message but am not on my Mac so couldn't check if I even build that component (I'd hope so though :)). Curiously enough I got a very similar error when I tried to build against lua 5.3 which is supposed to be possible. Maybe we're simply looking at the effect of imposing the use of C99 where it shouldn't be imposed.

comment:14 Changed 9 years ago by RJVB (René Bertin)

I understand now why I didn't have issues with opencv: I was still using an older version of that port.

However, after updating I ran into 2 issues:

  • when opencv is installed with its Qt5 module (variants +qt5 or +qt4 because of a current bug in the port), VLC fails to build because the opencv pkg-config file contains errors. Do you have either of those variants active in your opencv build?
  • the opencv_example doesn't compile at all for me on 10.9 . Looks like a missing definition in a header, but more complicated than I currently am willing to investigate ... for an example.

I've addressed the 2nd issue by disabling building the opencv_example. The 1st issue can only be addressed by registering a build conflict when opencv is installed +qt4 or +qt5 , until the pkg-config file is corrected. After building VLC's opencv wrapper module loads fine when opencv is installed +qt4 or +qt5.

Changed 9 years ago by RJVB (René Bertin)

Attachment: VLC.tar.bz2 added

upgraded to 2.2.2

comment:15 in reply to:  14 Changed 9 years ago by ramundsen85

Replying to rjvbertin@…:

  • when opencv is installed with its Qt5 module (variants +qt5 or +qt4 because of a current bug in the port), VLC fails to build because the opencv pkg-config file contains errors. Do you have either of those variants active in your opencv build?

I have the default opencv variant installed (no +qt4 or +qt5):

opencv @3.1.0_1 (active)

Your new VLC 2.2.2 port works without any modifications for me on OS X 10.11, also default variant (+qtkit+quartz):

VLC @2.2.2_0+qtkit+quartz (active)
Last edited 9 years ago by ramundsen85 (previous) (diff)

comment:16 Changed 9 years ago by RJVB (René Bertin)

Good, that's as I would have hoped, thanks for confirming.

If you're feeling adventurous you could try to build VLC with +full. (That doesn't really increase VLC's footprint, but you may end up installing a bunch of additional dependencies.

comment:17 Changed 9 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

Committed in r146098.

Please open a separate ticket for locale_select.

comment:18 Changed 9 years ago by mojca (Mojca Miklavec)

The initial build on the buildbots failed due to a missing dependency on libvpx which I fixed in r146100.

I see that "Jeremy's" VLC-devel also depends on:

port:FreeRDP
port:pulseaudio
port:XviD

plus a number of other "X11" dependencies. Maybe worth investigating.

One probably also has to fix

path:lib/libssl.dylib:openssl

comment:19 Changed 9 years ago by mojca (Mojca Miklavec)

Hmmm. I don't understand that. The build work on my machine, but on the buildbot we get a lua-related error:

lua/demux.c:55:13: error: implicit declaration of function 'luaL_checkint' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    int n = luaL_checkint( L, 1 );
            ^
lua/demux.c:55:13: note: did you mean 'luaL_checkany'?
/opt/local/include/lauxlib.h:52:18: note: 'luaL_checkany' declared here
LUALIB_API void (luaL_checkany) (lua_State *L, int arg);
                 ^
lua/demux.c:76:13: warning: unused variable 'i_seek' [-Wunused-variable]
        int i_seek = stream_Read( p_demux->s, NULL, i_read );
            ^
1 warning and 1 error generated.
clang: warning: -O4 is equivalent to -O3
make[4]: *** [lua/liblua_plugin_la-demux.lo] Error 1
make[4]: *** Waiting for unfinished jobs....

Any help appreciated.

comment:20 Changed 9 years ago by mojca (Mojca Miklavec)

Ah, sorry, that's from VLC-devel. I'll open a new ticket hijack #49022.

Last edited 9 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:21 in reply to:  17 Changed 9 years ago by RJVB (René Bertin)

Replying to mojca@…:

Please open a separate ticket for locale_select.

https://trac.macports.org/ticket/50776

Note: See TracTickets for help on using tickets.