Opened 7 years ago

Closed 7 years ago

#53719 closed defect (fixed)

highlight @3.35 does not build with libstdc++ because of missing 'to_string’ declaration "in this scope"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: tiger leopard snowleopard lion mountainlion Cc: iEFdev, 1-61803
Port: highlight

Description

/usr/bin/llvm-g++-4.2 -Os -arch x86_64 -c -I ./include/ -I/opt/local/include ./core/rtfgenerator.cpp
./core/rtfgenerator.cpp: In member function ‘virtual std::string highlight::RtfGenerator::maskCharacter(unsigned char)’:
./core/rtfgenerator.cpp:279: error: ‘to_string’ was not declared in this scope
./core/rtfgenerator.cpp: In member function ‘virtual std::string highlight::RtfGenerator::maskCharacter(unsigned char)’:
./core/rtfgenerator.cpp:279: error: ‘to_string’ was not declared in this scope
make[1]: *** [rtfgenerator.o] Error 1

Attachments (1)

main.log (12.4 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
mail.log from Snow Leopard

Download all attachments as: .zip

Change History (15)

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

mail.log from Snow Leopard

comment:2 Changed 7 years ago by kencu (Ken)

port has nomaintainer, Pete. Do you want to go ahead submit a PR adding the cxx11 portgroup, and hopefully someone will pull it for you.

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

Keywords: tiger leopard snowleopard lion mountainlion added; Snow Leopard removed
Summary: highlight @3.35 does not build on Mac OS X 10.6.8, Snow Leopard, because of missing 'to_string’ declaration "in this scope"highlight @3.35 does not build with libstdc++ because of missing 'to_string’ declaration "in this scope"

comment:4 in reply to:  2 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

port has nomaintainer, Pete. Do you want to go ahead submit a PR adding the cxx11 portgroup, and hopefully someone will pull it for you.

No. I do not understand C++, PR, cxx11 portgroup and why macOS has become so unusable. Leopard and Snow Leopard are so fine systems, I hardly can see a reason to deviate from this. But PR, i.e. Public Relations, might be shouting: A new version comes first. And now we have the salad… (as we Germans say)

comment:5 Changed 7 years ago by kencu (Ken)

Ah, OK. I will never see these kinds of errors, because all my snowleopard machines are set up properly with LibcxxOnOlderSystems. Rather than stumble across these more and more as time goes on, I would suggest you consider doing the same. The buildbots may not prebuild the software, but the time it takes your computer to build the apps yourself is peanuts compared to the time you're wasting chasing down these dinosaurs.

comment:6 Changed 7 years ago by kencu (Ken)

$ port -v installed highlight
The following ports are currently installed:
  highlight @3.35_0 (active) platform='darwin 10' archs='x86_64' date='2017-03-05T15:17:59-0800'

comment:7 in reply to:  5 ; Changed 7 years ago by iEFdev

Incase it will help anyone esle… I managed to upgrade highlight now, using a couple of configure options.

Adding cxx_stdlib libc++ to the conf file didn't help. But I found an install note on the Inkscape-page: CompilingMacOsX#Compiling_with_clang_3.3_and_libc.

Just using both options to inlcude libc++ made it through.

sudo port upgrade highlight configure.cxxflags="-stdlib=libc++" configure.cxx="clang++ -stdlib=libc++"
$ port -v installed highlight
The following ports are currently installed:
  highlight @3.36_0 (active) platform='darwin 11' archs='x86_64' date='2017-04-18T06:14:46+0200'
Last edited 7 years ago by iEFdev (previous) (diff)

comment:8 Changed 7 years ago by iEFdev

Cc: iEFdev added

comment:9 Changed 7 years ago by 1-61803

Cc: 1-61803 added

comment:10 in reply to:  7 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to iEFdev:

I can confirm that highlight @0.15.2_0 built with this setup on Snow Leopard, Mac OS X 10.6.8.

comment:11 Changed 7 years ago by 1-61803

I confirm sudo port install highlight configure.cxxflags="-stdlib=libc++" configure.cxx="clang++ -stdlib=libc++" builds 3.36 on 10.8.

comment:12 Changed 7 years ago by kencu (Ken)

Glad it worked. Couple of things, tho.

clang++ does not specify a specific compiler, and will just pull in whatever clang++ happens to be first on your path, which may or may not work. In your case, it apparently did work, though. For reliability, configure.cxx should point towards a more completely specified compiler.

Also, setting configure.cxxflags="-stdlib=libc++" will overwrite any other cxxflags there might be, which may or may not be important -- you probably would rather do a configure.cxxflags-append instead, if you're looking for a proper fix for the Portfile.

comment:13 Changed 7 years ago by 1-61803

See #53994 re v3.36.

comment:14 Changed 7 years ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 1aee29e12f6c9ee099f1fd194df8623daa9b5108/macports-ports:

highlight: update to 3.39

change to cxx11 1.1 portgroup
add -stdlib to clang builds
fixes: #53994
fixes: #53719

Note: See TracTickets for help on using tickets.