Opened 5 years ago

Last modified 4 years ago

#58682 assigned defect

VLC @3.0.7.1: configure: error: C++ preprocessor "/usr/bin/clang++" fails sanity check

Reported by: stilwellweather Owned by: RJVB (René Bertin)
Priority: Normal Milestone:
Component: ports Version: 2.5.99
Keywords: Cc: cooljeanius (Eric Gallager)
Port: VLC

Description

Trying to build vlc 3.0.7.1 on my Mac running macOS 10.14.5 with Xcode 10.2.1 (10E1001) on the development git branch and VLC fails to configure

Error: Failed to configure VLC, consult /opt/local/var/macports/build/_opt_mports_macports-ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/config.log
Error: Failed to configure VLC: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_mports_macports-ports_multimedia_VLC/VLC/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port vlc failed

Log files after running port clean attached

Attachments (7)

config.log.zip (40.7 KB) - added by stilwellweather 5 years ago.
main.log.zip (16.7 KB) - added by stilwellweather 5 years ago.
main.log.2.zip (16.7 KB) - added by stilwellweather 5 years ago.
VLC with Clang 5
main.log.3.zip (16.7 KB) - added by stilwellweather 5 years ago.
VLC with Clang 5
config.log.2.zip (40.7 KB) - added by stilwellweather 5 years ago.
VLC with Clang 5
config.log.3.zip (40.7 KB) - added by stilwellweather 5 years ago.
VLC with Clang 6
main.log.4.zip (16.7 KB) - added by stilwellweather 5 years ago.
VLC with Clang 6

Download all attachments as: .zip

Change History (18)

Changed 5 years ago by stilwellweather

Attachment: config.log.zip added

Changed 5 years ago by stilwellweather

Attachment: main.log.zip added

comment:1 Changed 5 years ago by jmroot (Joshua Root)

Owner: changed from RJVB, to RJVB

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

Priority: LowNormal

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

What do you mean with "the development git branch"? Do you mean that you're running some kind of beta OS or toolchain version?

The failure:

configure:17889: checking how to run the C++ preprocessor
configure:17955: result: /usr/bin/clang++
configure:17975: /usr/bin/clang++ -I/opt/local/include -D__unix__=1 -Wno-unknown-pragmas -I/opt/local/lib/live/liveMedia/include -I/opt/local/var/macports/build/_opt_mports_macports-ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/contrib/include conftest.cpp
conftest.cpp:41:8: error: unknown type name 'Syntax'
                     Syntax error
                     ^
conftest.cpp:41:20: error: expected ';' after top level declarator
                     Syntax error
                                 ^
                                 ;
2 errors generated.
configure:17975: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "vlc"
| #define PACKAGE_TARNAME "vlc"
| #define PACKAGE_VERSION "3.0.7.1"
| #define PACKAGE_STRING "vlc 3.0.7.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "vlc"
| #define VERSION "3.0.7.1"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define _FORTIFY_SOURCE 2
| #define _FILE_OFFSET_BITS 64
| #define _THREAD_SAFE /**/
| #define __LIBVLC__ /**/
| #define WIN32_LEAN_AND_MEAN /**/
| #define YYTEXT_POINTER 1
| #define restrict __restrict
| #define VLC_WINSTORE_APP 0
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error

Yes, there appears to be the words "Syntax error" appended to the conftest.cpp file, using tabs for indentation. I have no idea where this can come from...

Could you try with clang 5 or 6 from MacPorts (I have tested those myself, and I would avoid clang 8 because of a warning I saw somewhere)?

Version 0, edited 5 years ago by RJVB (René Bertin) (next)

comment:4 Changed 5 years ago by stilwellweather

When I say git development branch, I meant to say I installed MacPorts from git and didn't checkout a specific version. I tested the build with both versions of clang (5 and 6) as you suggested and it still failed.

Changed 5 years ago by stilwellweather

Attachment: main.log.2.zip added

VLC with Clang 5

Changed 5 years ago by stilwellweather

Attachment: main.log.3.zip added

VLC with Clang 5

Changed 5 years ago by stilwellweather

Attachment: config.log.2.zip added

VLC with Clang 5

Changed 5 years ago by stilwellweather

Attachment: config.log.3.zip added

VLC with Clang 6

Changed 5 years ago by stilwellweather

Attachment: main.log.4.zip added

VLC with Clang 6

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

This has me flabbergasted. Doesn't VLC build on the 10.14 buildbot?

I don't see a trivial/proper way to disable the preprocessor check either. Ship a tweaked c.m4 file, maybe? The only easy thing I can think of ATM is a tweak to the portfile. Please do port edit VLC and then find the part where CXXCPP is set. Add a corresponding definition for CPP, e.g.

if {[vercmp [macports_version] 2.5.99] >= 0} {
    configure.env-append \
                    "CPP=${configure.cc} -E" \
                    "CXXCPP=${configure.cxx} -E"
} else {
    configure.env-append \
                    CPP="${configure.cc} -E" \
                    CXXCPP="${configure.cxx} -E"
}

Then, clean and attempt again

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

If that fails too, there's 1 more thing to try: replace ${configure.cc} above with clang-cpp-mp-N (where N is 5.0 or 6.0 or whatever clang version you're using).

comment:7 Changed 5 years ago by stilwellweather

Good news. It looks like replacing ${configure.cc} with clang-cpp-mp-5.0 did the trick. It built and opened perfectly.

comment:8 Changed 5 years ago by cjones051073 (Chris Jones)

${configure.cc} should refer to a C compiler, not a C++ compiler, which are what clang-cpp-mp-N are. So regardless of this works or not, its not really an acceptable fix.

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

Are you certain that clang-cpp is a C++ compiler and not a (C) preprocessor?

Also, please read more carefully. The tested fix is not replacing the value configure.cc, but replacing the use of configure.cc in the CPP env. variable.

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

Port: VLC added; vlc removed
Summary: vlc @3.0.7.1 build failure - failed to configureVLC @3.0.7.1: configure: error: C++ preprocessor "/usr/bin/clang++" fails sanity check
Version: 2.5.99

comment:11 Changed 4 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.