Opened 8 years ago

Closed 4 years ago

#51345 closed defect (duplicate)

vlc @2.2.2_4: error: expected identifier or '('

Reported by: dietervdw@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: RJVB (René Bertin), dbevans (David B. Evans), majoc-at-astro (majoc-at-astro)
Port: VLC

Description (last modified by mf2k (Frank Schima))

: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 ^

Attachments (1)

main.log (722.0 KB) - added by dietervdw@… 8 years ago.
The main.log file

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by dietervdw@…

Attachment: main.log added

The main.log file

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Port: VLC added; vlc removed

In the future, please use WikiFormatting.

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 8 years ago by dbevans (David B. Evans)

Cc: rjvbertin@… devans@… added

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

Edit: ok, what's strange (but sadly not so very surprising) is that I couldn't remember my exchange with "majoc" about exactly this error. I have a patch that works around the issue, but I just came across another compiler error when using clang-mp-3.8 . This does NOT happen with clang-mp-3.7 (3.7.1) . I wonder if this is related to the C++ flavour being used by default?

CD vlc-mp9-work/vlc-2.2.3/modules/ ../doltlibtool --tag=CXX --mode=compile clang-mp-3.8 -DHAVE_CONFIG_H -I. -I.. -DMODULE_STRING=\"bla\" -D__PLUGIN__ -I./access -I./codec -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_site-ports_multimedia_VLC/VLC/work/vlc-2.2.3/contrib/include -O3 -g -stdlib=libc++ -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_local_site-ports_multimedia_VLC/VLC/work/vlc-2.2.3/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -fvisibility=hidden -O3 -ffast-math -funroll-loops -fomit-frame-pointer -MT demux/mkv/libmkv_plugin_la-util.lo -MD -MP -MF demux/mkv/.deps/libmkv_plugin_la-util.Tpo -c -o demux/mkv/libmkv_plugin_la-util.lo `test -f 'demux/mkv/util.cpp' || echo './'`demux/mkv/util.cpp
/opt/local/var/macports/build/_opt_local_site-ports_multimedia_VLC/VLC/work/vlc-2.2.3/modules
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:823:1: error: expected unqualified-id
kill_dependency(_Tp __y) _NOEXCEPT
^
../include/vlc_atomic.h:45:7: note: expanded from macro 'kill_dependency'
    ((void)0)
      ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:823:1: error: expected ')'
../include/vlc_atomic.h:45:7: note: expanded from macro 'kill_dependency'
    ((void)0)
      ^
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:823:1: note: to match this '('
../include/vlc_atomic.h:45:6: note: expanded from macro 'kill_dependency'
    ((void)0)
     ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:823:1: error: expected ')'
kill_dependency(_Tp __y) _NOEXCEPT
^
../include/vlc_atomic.h:45:12: note: expanded from macro 'kill_dependency'
    ((void)0)
           ^
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:823:1: note: to match this '('
../include/vlc_atomic.h:45:5: note: expanded from macro 'kill_dependency'
    ((void)0)
    ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:926:8: error: explicit specialization of non-template struct
      '__atomic_base'
struct __atomic_base<_Tp, true>
       ^            ~~~~~~~~~~~
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:927:14: error: too many template arguments for class template
      '__atomic_base'
    : public __atomic_base<_Tp, false>
             ^                  ~~~~~~
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:926:8: note: template is declared here
struct __atomic_base<_Tp, true>
       ^
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:929:13: error: too many template arguments for class template
      '__atomic_base'
    typedef __atomic_base<_Tp, false> __base;
            ^                  ~~~~~~
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:926:8: note: template is declared here
struct __atomic_base<_Tp, true>
       ^
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:933:58: error: constructor initializer '__base' (aka 'int') does
      not name a class
    _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
                                                         ^~~~~~
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1089:1: error: expected unqualified-id
atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT
^
../include/vlc_atomic.h:54:5: note: expanded from macro 'atomic_is_lock_free'
    false
    ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1271:57: error: too many arguments provided to function-like macro
      invocation
                                      memory_order __s, memory_order __f) _NOEXCEPT
                                                        ^
../include/vlc_atomic.h:161:11: note: macro 'atomic_compare_exchange_weak_explicit' defined here
#  define atomic_compare_exchange_weak_explicit(object,expected,desired,order) \
          ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1280:57: error: too many arguments provided to function-like macro
      invocation
                                      memory_order __s, memory_order __f) _NOEXCEPT
                                                        ^
../include/vlc_atomic.h:161:11: note: macro 'atomic_compare_exchange_weak_explicit' defined here
#  define atomic_compare_exchange_weak_explicit(object,expected,desired,order) \
          ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1292:59: error: too many arguments provided to function-like macro
      invocation
                                        memory_order __s, memory_order __f) _NOEXCEPT
                                                          ^
../include/vlc_atomic.h:155:11: note: macro 'atomic_compare_exchange_strong_explicit' defined here
#  define atomic_compare_exchange_strong_explicit(object,expected,desired,order) \
          ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1302:59: error: too many arguments provided to function-like macro
      invocation
                                        memory_order __s, memory_order __f) _NOEXCEPT
                                                          ^
../include/vlc_atomic.h:155:11: note: macro 'atomic_compare_exchange_strong_explicit' defined here
#  define atomic_compare_exchange_strong_explicit(object,expected,desired,order) \
          ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1676:1: error: expected unqualified-id
atomic_flag_test_and_set(volatile atomic_flag* __o) _NOEXCEPT
^
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:132:2: note: expanded from macro 'atomic_exchange'
({  \
 ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1676:1: error: expected ')'
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:132:2: note: expanded from macro 'atomic_exchange'
({  \
 ^
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1676:1: note: to match this '('
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:131:43: note: expanded from macro 'atomic_exchange'
#  define atomic_exchange(object,desired) \
                                          ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1683:1: error: expected unqualified-id
atomic_flag_test_and_set(atomic_flag* __o) _NOEXCEPT
^
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:132:2: note: expanded from macro 'atomic_exchange'
({  \
 ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1683:1: error: expected ')'
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:132:2: note: expanded from macro 'atomic_exchange'
({  \
 ^
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1683:1: note: to match this '('
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:131:43: note: expanded from macro 'atomic_exchange'
#  define atomic_exchange(object,desired) \
                                          ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1690:1: error: expected unqualified-id
atomic_flag_test_and_set_explicit(volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
^
../include/vlc_atomic.h:198:5: note: expanded from macro 'atomic_flag_test_and_set_explicit'
    atomic_flag_test_and_set(object)
    ^
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:132:2: note: expanded from macro 'atomic_exchange'
({  \
 ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1690:1: error: expected ')'
../include/vlc_atomic.h:198:5: note: expanded from macro 'atomic_flag_test_and_set_explicit'
    atomic_flag_test_and_set(object)
    ^
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:132:2: note: expanded from macro 'atomic_exchange'
({  \
 ^
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1690:1: note: to match this '('
../include/vlc_atomic.h:198:5: note: expanded from macro 'atomic_flag_test_and_set_explicit'
    atomic_flag_test_and_set(object)
    ^
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:131:43: note: expanded from macro 'atomic_exchange'
#  define atomic_exchange(object,desired) \
                                          ^
In file included from demux/mkv/util.cpp:24:
In file included from demux/mkv/mkv.hpp:56:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/iostream:38:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/ios:216:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/__locale:15:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/string:439:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/algorithm:628:
In file included from /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/memory:616:
/opt/local/libexec/llvm-3.8/bin/../include/c++/v1/atomic:1697:1: error: expected unqualified-id
atomic_flag_test_and_set_explicit(atomic_flag* __o, memory_order __m) _NOEXCEPT
^
../include/vlc_atomic.h:198:5: note: expanded from macro 'atomic_flag_test_and_set_explicit'
    atomic_flag_test_and_set(object)
    ^
../include/vlc_atomic.h:195:5: note: expanded from macro 'atomic_flag_test_and_set'
    atomic_exchange(object, true)
    ^
../include/vlc_atomic.h:132:2: note: expanded from macro 'atomic_exchange'
({  \
 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Last edited 8 years ago by RJVB (René Bertin) (previous) (diff)

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

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>
+
+
+

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

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)

comment:7 Changed 8 years ago 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?

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

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!

comment:9 Changed 8 years ago by dbevans (David B. Evans)

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.

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

Replying to 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!

comment:11 Changed 8 years ago by majoc-at-astro (majoc-at-astro)

Cc: majoc@… added

Cc Me!

comment:12 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: newclosed
Summary: vlc @2.2.2_4 Compile errorvlc @2.2.2_4: error: expected identifier or '('

Duplicate of #50913

Note: See TracTickets for help on using tickets.