Opened 11 years ago

Closed 8 years ago

#40900 closed defect (fixed)

pdf2htmlex on Mac OS X 10.6: Error: you compiler does not support C++0x, please update it.

Reported by: mojca (Mojca Miklavec) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jmroot (Joshua Root), iapain@…, cooljeanius (Eric Gallager)
Port: pdf2htmlex

Description

Compiling pdf2htmlEX fails on 10.6 with:

-- Performing Test CXX0X_SUPPORT
-- Performing Test CXX0X_SUPPORT - Failed
CMake Error at CMakeLists.txt:162 (message):
  Error: you compiler does not support C++0x, please update it.

This is the corresponding source:

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()

# CYGWIN or GCC 4.5.x bug
if(CYGWIN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("${CMAKE_CXX_FLAGS}" CXX0X_SUPPORT)
if(NOT CXX0X_SUPPORT)
    message(FATAL_ERROR "Error: you compiler does not support C++0x, please update it.")
endif()

The port should use a different compiler by default.

Change History (11)

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

Cc: egall@… added

Cc Me!

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Could you attach the main.log file?

comment:3 Changed 11 years ago by iapain@…

Clang >= 3.3 or GCC >= 4.4.6 are required to compile it properly.

comment:4 in reply to:  3 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to iapain@…:

Clang >= 3.3 or GCC >= 4.4.6 are required to compile it properly.

So would this work for the blacklist?

compiler.blacklist-append *clang-3.2 *clang-3.1 *clang-2.9 *gcc-4.3 *gcc-4.2 *gcc-4.0 gcc-3.3

comment:5 Changed 11 years ago by iapain@…

Looks good to me.

comment:6 Changed 11 years ago by jmroot (Joshua Root)

There's no libc++ on 10.6, so switching compilers won't really help.

comment:7 in reply to:  6 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to jmr@…:

There's no libc++ on 10.6, so switching compilers won't really help.

I'm on 10.6 and have a libc++:

Local-Admins-MacBook-Pro:magicseteditor ericgallager$ port search libcxx
libcxx @183506 (lang)
    libc++ is a new implementation of the C++ standard library, targeting C++11

libcxxabi @183506 (lang)
    libc++abi is a new implementation of low level support for a standard C++ library.

Found 2 ports.
Local-Admins-MacBook-Pro:magicseteditor ericgallager$ port installed libcxx*
The following ports are currently installed:
  libcxx @183506_0+universal (active)
  libcxxabi @183506_0+universal (active)
Local-Admins-MacBook-Pro:magicseteditor ericgallager$ port contents libcxx*
Port libcxx contains:
  /usr/lib/libc++.1.dylib
  /usr/lib/libc++.dylib
Port libcxxabi contains:
  /usr/include/cxa_demangle.h
  /usr/include/cxxabi.h
  /usr/lib/libc++abi.dylib

comment:8 Changed 11 years ago by iapain@…

I clearly remember that I was able to compile it successfully with newer gcc (default one was 4.2.1), which I assume must have installed libc++ or libcxx

comment:9 Changed 10 years ago by mojca (Mojca Miklavec)

I would like to close this (trivial) ticket.

The compilation doesn't fail for me on 10.7. I'm not sure which clang version that is, but I have the impression that blacklisting

compiler.blacklist-append *clang-3.2 *clang-3.1 *clang-2.9 ...

would also blacklist the default compiler on Lion? Or am I wrong?

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

See duplicate #44239. I think using

PortGroup compiler_blacklist_versions 1.0

compiler.blacklist *gcc* {clang < 300} 

should do the trick. Since it works with default clang on 10.7 and up, libc++ is not the issue.

comment:11 in reply to:  10 Changed 8 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

Replying to devans@…:

See duplicate #44239. I think using

PortGroup compiler_blacklist_versions 1.0

compiler.blacklist *gcc* {clang < 300} 

should do the trick. Since it works with default clang on 10.7 and up, libc++ is not the issue.

Committed this suggested fix in r143681. Builds successfully on 10.6 buildbot.

Note: See TracTickets for help on using tickets.