#49178 closed defect (fixed)
VLC @2.1.5: error: expected expression
Reported by: | kennethenner@… | Owned by: | RJVB (René Bertin) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | chihangli@…, majoc-at-astro (majoc-at-astro), Russell-Jones-OxPhys (Russell Jones) | |
Port: | VLC |
Description
vlc not compiling
Attachments (1)
Change History (13)
Changed 9 years ago by kennethenner@…
comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to rjvbertin@… |
---|---|
Port: | VLC added |
Summary: | vlc compiling failed → VLC @2.1.5: error: expected expression |
comment:2 Changed 9 years ago by RJVB (René Bertin)
Hard to say what will happen on 10.11 (in 32bit mode, at that), but the bluray.c file shipped with 2.2.1 no longer invokes ATOMIC_FLAG_INIT directly.
comment:3 Changed 9 years ago by Russell-Jones-OxPhys (Russell Jones)
Happens on 10.10, too. Looks like an incompatibility with Xcode 7.0's clang at a glance. rjvbertin, have you had VLC 2.2.1 build on Xcode 7?
DEBUG: OS darwin/14.5.0 (Mac OS X 10.10) arch i386
...
In file included from dvdread.c:62: In file included from /opt/local/include/dvdread/nav_read.h:24: /opt/local/include/dvdread/nav_types.h:241:3: warning: unknown attribute 'gcc_struct' ignored [-Wunknown-attributes] } ATTRIBUTE_PACKED dsi_t; ^ /opt/local/include/dvdread/ifo_types.h:36:49: note: expanded from macro 'ATTRIBUTE_PACKED' #define ATTRIBUTE_PACKED __attribute__ ((packed,gcc_struct)) ^ bluray.c:744:51: error: expected expression p_sys->p_overlays[ov->plane]->released_once = ATOMIC_FLAG_INIT; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/include/stdatomic.h:165:26: note: expanded from macro 'ATOMIC_FLAG_INIT' #define ATOMIC_FLAG_INIT { 0 } ^ 1 error generated. make[5]: *** [liblibbluray_plugin_la-bluray.lo] Error 1 make[5]: *** Waiting for unfinished jobs....
I'll upload the log in a bit, I'm pushed for time at the moment.
comment:4 Changed 9 years ago by RJVB (René Bertin)
No need to upload the full log AFAIC if it just confirms the one already attached.
To answer your question: no, I'm running OS X 10.9 so no Xcode 7. What's the real clang provided by that Xcode, 3.6 or 3.7? I have port:clang-3.6, my willingness to install the 3.7 port depends on whether it carries a release version and comes in a binary package ;)
comment:5 Changed 9 years ago by RJVB (René Bertin)
FWIW, VLC 2.2.1 builds fine using port:clang-3.6 and my usual variants (+dbus+qtkit+quartz+x11), but I can only speak for OS X 10.9 .
comment:8 Changed 9 years ago by Russell-Jones-OxPhys (Russell Jones)
Cc: | russell.jones@… added |
---|
Cc Me!
comment:9 follow-up: 10 Changed 9 years ago by didox1207@…
Replying to kennethenner@…:
vlc not compiling
I had the same problem on Mac OS X 10.10 Yosemite and VLC 2.1.5. Unless you need bluray support you can solve it going in the configure file in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.1.5 and modify line 31389 to
enable_bluray=false;
and line 31391 with the same.
comment:10 Changed 9 years ago by dbevans (David B. Evans)
Replying to didox1207@…:
Replying to kennethenner@…:
vlc not compiling
I had the same problem on Mac OS X 10.10 Yosemite and VLC 2.1.5. Unless you need bluray support you can solve it going in the configure file in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-2.1.5 and modify line 31389 to
enable_bluray=false;and line 31391 with the same.
Probably simpler to just change the configure option --enable-bluray to --disable-bluray. You can test the Portfile global variable $xcodeversion to do this conditionally for Xcode 7.0+.
comment:11 Changed 9 years ago by dbevans (David B. Evans)
Resolution: | → fixed |
---|---|
Status: | new → closed |
It turns out that the difference between Xcode 7.0 and earlier versions is that Xcode 7.0 introduces an implementation of C11 native atomics that doesn't exist in earlier Xcode versions. VLC attempts to use this if present, resulting in the build failure in the bluray module. VLC falls back to its own implementation if none are provided by the native OS. This is what happends for Xcode 6.4 and earlier.
This doesn't necessarily mean that the Xcode 7.0 atomitcs code is faulty, since over half a dozen other VLC modules use them successfully.
Patch applied in r143186 that disables the use of Xcode 7.0 atomics (in the bluray module only) causing VLC to use its fall back code as in the earlier Xcode versions.
comment:12 Changed 9 years ago by RJVB (René Bertin)
Is there a reason I'm being kept as the ticket owner while avoiding the VLC 2.2.1 port I've proposed months ago already?
The log says:
An update to 2.2.1 has been submitted in #49051; you could check if that fixes the problem.