Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

main.log (373.2 KB) - added by kennethenner@… 8 years ago.

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by kennethenner@…

Attachment: main.log added

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to rjvbertin@…
Port: VLC added
Summary: vlc compiling failedVLC @2.1.5: error: expected expression

The log says:

:info:build bluray.c:744:51: error: expected expression
:info:build     p_sys->p_overlays[ov->plane]->released_once = ATOMIC_FLAG_INIT;
:info:build                                                   ^
:info:build /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'
:info:build #define ATOMIC_FLAG_INIT { 0 }
:info:build                          ^

An update to 2.2.1 has been submitted in #49051; you could check if that fixes the problem.

comment:2 Changed 8 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 8 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 8 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 8 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:6 Changed 8 years ago by chihangli@…

Cc: chihangli@… added

Cc Me!

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

Cc: majoc@… added

Cc Me!

comment:8 Changed 8 years ago by Russell-Jones-OxPhys (Russell Jones)

Cc: russell.jones@… added

Cc Me!

comment:9 in reply to:  description ; Changed 8 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 in reply to:  9 Changed 8 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 8 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

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.

Last edited 8 years ago by dbevans (David B. Evans) (previous) (diff)

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

Note: See TracTickets for help on using tickets.