[MacPorts] #51345: vlc @2.2.2_4 Compile error
#51345: vlc @2.2.2_4 Compile error -------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: vlc -------------------------+-------------------------------- :info:build ../doltcompile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -DMODULE_STRING=\"core\" -DLOCALEDIR=\"/opt/local/share/locale\" -DPKGDATADIR=\"/opt/ local/share/vlc\" -DPKGLIBDIR=\"/opt/local/lib/vlc\" -DHAVE_DYNAMIC_PLUGINS -I../include -I../include -I/opt/local/include -D__unix__=1 -I/opt/local/lib/live/liveMedia/include -I /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/include -pipe -Os -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror- implicit-function-declaration -pipe -fvisibility=hidden -O3 -ffast-math -funroll-loops -fomit-frame-pointer -MT misc/picture_fifo.lo -MD -MP -MF $depbase.Tpo -c -o misc/picture_fifo.lo misc/picture_fifo.c &&\ :info:build mv -f $depbase.Tpo $depbase.Plo :info:build misc/picture.c:43:1: error: expected identifier or '(' :info:build static_assert(sizeof (uintptr_t) == sizeof (atomic_uintptr_t), :info:build ^ -- Ticket URL: <https://trac.macports.org/ticket/51345> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Changes (by mf2k@…): * port: vlc => VLC Comment: In the future, please use WikiFormatting. -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Description changed by mf2k@…: Old description:
:info:build ../doltcompile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -DMODULE_STRING=\"core\" -DLOCALEDIR=\"/opt/local/share/locale\" -DPKGDATADIR=\"/opt/ local/share/vlc\" -DPKGLIBDIR=\"/opt/local/lib/vlc\" -DHAVE_DYNAMIC_PLUGINS -I../include -I../include -I/opt/local/include -D__unix__=1 -I/opt/local/lib/live/liveMedia/include -I /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/include -pipe -Os -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror- implicit-function-declaration -pipe -fvisibility=hidden -O3 -ffast-math -funroll-loops -fomit-frame-pointer -MT misc/picture_fifo.lo -MD -MP -MF $depbase.Tpo -c -o misc/picture_fifo.lo misc/picture_fifo.c &&\ :info:build mv -f $depbase.Tpo $depbase.Plo :info:build misc/picture.c:43:1: error: expected identifier or '(' :info:build static_assert(sizeof (uintptr_t) == sizeof (atomic_uintptr_t), :info:build ^
New description: {{{ :info:build ../doltcompile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -DMODULE_STRING=\"core\" -DLOCALEDIR=\"/opt/local/share/locale\" -DPKGDATADIR=\"/opt/ local/share/vlc\" -DPKGLIBDIR=\"/opt/local/lib/vlc\" -DHAVE_DYNAMIC_PLUGINS -I../include -I../include -I/opt/local/include -D__unix__=1 -I/opt/local/lib/live/liveMedia/include -I /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/include -pipe -Os -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.2.2/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror- implicit-function-declaration -pipe -fvisibility=hidden -O3 -ffast-math -funroll-loops -fomit-frame-pointer -MT misc/picture_fifo.lo -MD -MP -MF $depbase.Tpo -c -o misc/picture_fifo.lo misc/picture_fifo.c &&\ :info:build mv -f $depbase.Tpo $depbase.Plo :info:build misc/picture.c:43:1: error: expected identifier or '(' :info:build static_assert(sizeof (uintptr_t) == sizeof (atomic_uintptr_t), :info:build ^ }}} -- -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Changes (by devans@…): * cc: rjvbertin@…, devans@… (added) -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Comment (by rjvbertin@…): That's really strange, in my experience I had to patch fewer things in vlc_fixups.h when VLC 2.2.2 was released. Looks like I'm going to have to try building VLC with a clang version that's more recent than Apple clang 602. Dave: aren't you on 10.11? -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Comment (by rjvbertin@…): Here's a patch to apply in `port dir VLC`, hopefully it'll make the build succeed: {{{ diff --git a/multimedia/VLC/Portfile b/multimedia/VLC/Portfile index 8e67a2e..1899dcf 100644 --- a/multimedia/VLC/Portfile +++ b/multimedia/VLC/Portfile @@ -184,7 +184,9 @@ if {(${subport} eq ${name}) || (${subport} eq "lib${name}")} { depends_lib-append port:lua52 # depends_lib-append port:lua - compiler.blacklist gcc-4.2 llvm-gcc-4.2 {clang < 300} + # VLC doesn't currently build for me using port:clang-3.8 + compiler.blacklist-append \ + gcc-4.2 llvm-gcc-4.2 macports-clang-3.8 {clang < 300} patchfiles buildfix-package.mak.patch \ configure.ac-no-arch.patch \ @@ -203,6 +205,9 @@ if {(${subport} eq ${name}) || (${subport} eq "lib${name}")} { ${worksrcpath}/modules/access/Makefile.am } } + post-configure { + system -W ${worksrcpath} "patch -Np0 -i ${filespath}/patch- static_assert.diff" + } use_autoreconf yes autoreconf.cmd ./bootstrap diff --git a/multimedia/VLC/files/patch-static_assert.diff b/multimedia/VLC/files/patch-static_assert.diff new file mode 100644 index 0000000..f00a7df --- /dev/null +++ b/multimedia/VLC/files/patch-static_assert.diff @@ -0,0 +1,11 @@ +--- config.h.orig 2016-03-22 15:34:33.000000000 +0000 ++++ config.h 2016-03-22 15:34:57.000000000 +0000 +@@ -793,6 +793,7 @@ + /* Define to `int' if <stddef.h> does not define. */ + /* #undef ssize_t */ + ++#define static_assert _Static_assert + #include <vlc_fixups.h> + + + }}} -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Comment (by rjvbertin@…): Dieter: if you're feeling adventurous you could help test-drive the new port version-in-preparation: https://github.com/RJVB/macstrop/tree/master/multimedia/VLC (cf. ticket:50697) -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Comment (by dietervdw@…): Wow super impressed with how fast you guys acted on this issue! I am feeling adventurous yes, bring it on :) . I am a developer and have a C++ background, so there's that. But not super familiar with the MacPorts build process though, can you give some quick pointers on the MacPorts specifics of how to test-drive this? -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Comment (by rjvbertin@…): Well, in all honesty I should say that we were working on the port anyway, and that a fix already existed for the issue you encountered. I don't think I have to explain how to get a copy of the files from github. The easiest way to continue will be to: - `port clean VLC` - identify where VLC'd port directory lives on your system: `port dir VLC` - replace its contents with the contents from the github link above (or the multimedia/VLC directory from your working copy) - repeat the port install command that failed for you Don't be surprised when you see ffmpeg being built first, the new port uses its own ffmpeg copy. You'll be the first to test this, so apologies if something doesn't work out of the box! -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Comment (by devans@…): Sorry for not getting back to you before now, but I've been pulled away on various non-MacPorts issues this week. Yes, I can test on 10.8+ including latest 10.11. I believe that this ticket refers to the same issue as #50913. My experience is that this error only appears on Yosemite (10.10) when using Xcode 7+. Your suggested patch doesn't apply cleanly to the current VLC port so perhaps you're using a modified version. But after making the changes manually, I got some very strange results when compiling. I think this has to due with your patching of config.h post-configure which is a bit unconventional. Perhaps it would be better to combine your patch- static_assert.diff with the existing static_assert.patch although I'm not sure how you would do this. Seems like the latter patch is doing the same thing to no avail. Perhaps it would be best to table this and #50913 for now and push ahead with the new port updates, addressing any outstanding issues there. -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#51345: vlc @2.2.2_4 Compile error --------------------------+-------------------------------- Reporter: dietervdw@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: VLC | --------------------------+-------------------------------- Comment (by rjvbertin@…): Replying to [comment:9 devans@…]:
I believe that this ticket refers to the same issue as #50913. My experience is that this error only appears on Yosemite (10.10) when using Xcode 7+.
Actually, it also appeared for me on 10.9 when building with port:clang-3.8
Your suggested patch doesn't apply cleanly to the current VLC port so perhaps you're using a modified version. But after making the changes manually, I got some very strange results when compiling. I think this has to due with your patching of config.h post-configure which is a bit unconventional. Perhaps it would be better to combine your patch- static_assert.diff with the existing static_assert.patch although I'm not sure how you would do this. Seems like the latter patch is doing the same thing to no avail.
I didn't notice anything odd or alarming with the patch, but there's another possible fix. IIRC, the static_cast macro is used only in picture.c and it should never fail on OS X. In other words, it should be safe to remove the calls altogether.
Perhaps it would be best to table this and #50913 for now and push ahead with the new port updates, addressing any outstanding issues there.
That's what I'm doing! -- Ticket URL: <https://trac.macports.org/ticket/51345#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts