Opened 5 years ago

Closed 3 years ago

#43417 closed defect (fixed)

mpd: error: no type named 'function' in namespace 'std'

Reported by: bnilsson11 Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc:
Port: mpd

Description (last modified by ryandesign (Ryan Schmidt))

mpd does not build:

--->  Building mpd
Error: org.macports.build for port mpd returned: command execution failed
Please see the log file for port mpd for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_mpd/mpd/main.log
In the log file, the first error is:
:info:build In file included from ./src/DatabaseHelpers.hxx:23:
:info:build ./src/DatabaseVisitor.hxx:30:14: error: no type named 'function' in namespace 'std'
:info:build typedef std::function<bool(const Directory &, Error &)> VisitDirectory;

Googling on "no type named 'function' in namespace 'std'" indicates a possible lack of C++11 support.

MacPorts 2.2.1

 System version:	Mac OS X 10.7.5 (11G63)
  Kernel version:	Darwin 11.4.2

Attachments (1)

main.log (65.6 KB) - added by bnilsson11 5 years ago.
main.log

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by bnilsson11

gcc: i686-apple-darwin11-llvm-gcc-4.2

Xcode 4.6.3

Last edited 5 years ago by bnilsson11 (previous) (diff)

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

Description: modified (diff)
Owner: changed from macports-tickets@… to rmstonecipher@…
Port: mpd added
Summary: port mpd does not buildmpd: error: no type named 'function' in namespace 'std'

Please attach the main.log file.

Changed 5 years ago by bnilsson11

Attachment: main.log added

main.log

comment:3 in reply to:  description Changed 5 years ago by dbevans (David B. Evans)

Replying to bnilsson11@…:

Googling on "no type named 'function' in namespace 'std'" indicates a possible lack of C++11 support.

Yes, std::function is a C++11 feature requiring libc++, meaning it will probably only build on Mavericks and higher, if at all.

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

Confirmed that mpd currently only builds on Mavericks.

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

Owner: changed from rmstonecipher@… to macports-tickets@…

rmstonecipher has retired. See #51138.

comment:6 Changed 3 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed

Agreed, this requires C++11. r153111

Note: See TracTickets for help on using tickets.