Opened 3 years ago
Closed 18 months ago
#64555 closed defect (worksforme)
ncpp is not using the right compiler or flags
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | mf2k (Frank Schima) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | ||
Port: | ncpp |
Description
ncpp is not using the right compiler or flags therefore it fails to build on older systems that require those flags.
g++ -o raf/ACconfig.o -c -g -Wall -std=c++11 -Wno-write-strings -Wno-deprecated-register -g -Wall -Wno-write-strings -DPNG -I. -I/opt/X11/include -I/opt/local/include raf/ACconfig.cc g++ -o raf/PMSspex.o -c -g -Wall -std=c++11 -Wno-write-strings -Wno-deprecated-register -g -Wall -Wno-write-strings -DPNG -I. -I/opt/X11/include -I/opt/local/include raf/PMSspex.cc g++ -o raf/Queue.o -c -g -Wall -std=c++11 -Wno-write-strings -Wno-deprecated-register -g -Wall -Wno-write-strings -DPNG -I. -I/opt/X11/include -I/opt/local/include raf/Queue.cc g++ -o raf/TextFile.o -c -g -Wall -std=c++11 -Wno-write-strings -Wno-deprecated-register -g -Wall -Wno-write-strings -DPNG -I. -I/opt/X11/include -I/opt/local/include raf/TextFile.cc raf/TextFile.cc:13:17: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream<char>') std::ifstream file(filename); ^ ~~~~~~~~ /usr/include/c++/4.2.1/fstream:465:7: note: candidate constructor not viable: no known conversion from 'const std::string' (aka 'const basic_string<char>') to 'const char *' for 1st argument basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) ^ /usr/include/c++/4.2.1/bits/fstream.tcc:894:25: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const std::string' (aka 'const basic_string<char>') to 'const std::basic_ifstream<char>' for 1st argument extern template class basic_ifstream<char>; ^ /usr/include/c++/4.2.1/fstream:451:7: note: candidate constructor not viable: requires 0 arguments, but 1 was provided basic_ifstream() : __istream_type(), _M_filebuf() ^ 1 error generated. scons: *** [raf/TextFile.o] Error 1
The port makes some effort to manually set build args for the compiler to use, but then overwrites those args with others. It doesnt seem to have any code to use the right flags.
Using the makefile 1.0 portgroup can help you use the right compiler and flags.
Change History (3)
comment:1 Changed 3 years ago by mf2k (Frank Schima)
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Please do still have an interest in using the right compiler and flags, however. Doing so enables many MacPorts capabilities, only one of which is support for older operating systems.
comment:3 Changed 18 months ago by mf2k (Frank Schima)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Builders work all the way back to Snow Leopard. If you have a patch, please submit a PR.
Note: See
TracTickets for help on using
tickets.
I tried to set it. I'll see what I can do. I have zero interest in ancient operating systems though.