Opened 12 years ago
Last modified 2 months ago
#36747 new defect
phantomjs @1.7.0_0 build error - g++ unrecognised option `-fconstant-cfstrings`
Reported by: | daniel@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | cooljeanius (Eric Gallager), luca@… | |
Port: | phantomjs |
Description
Building phantomjs @1.7.0_0 on my system fails with this error:
:info:build g++: error: unrecognized command line option '-fconstant-cfstrings'
As root I see:
sudo g++ --version g++ (MacPorts gcc47 4.7.2_2) 4.7.2 sudo type g++ g++ is /opt/local/bin/g++
I have attached the full build log from the failure.
Attachments (1)
Change History (14)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | singingwolfboy@… removed |
---|---|
Owner: | changed from macports-tickets@… to singingwolfboy@… |
comment:2 follow-up: 10 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 12 years ago by daniel@…
I have updated the log file to the result of sudo port clean phantomjs
followed by an upgrade outdated. Sorry, I thought that was clean. Will note that for next time. :)
comment:4 follow-up: 11 Changed 12 years ago by jmroot (Joshua Root)
Only Apple compilers accept -fconstant-cfstrings, so a workaround would be to deselect FSF gcc.
comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | luca@… added |
---|
Has duplicate #38131.
comment:9 Changed 12 years ago by jmroot (Joshua Root)
Owner: | changed from singingwolfboy@… to macports-tickets@… |
---|
-> nomaintainer
comment:10 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign@…:
What you have attached is not a full log. Please "sudo port clean phantomjs", then try again, then attach the new log.
It does at least show that phantomjs is not UsingTheRightCompiler.
I have tried to fix this and it seems to be very complicated, thanks partly to the use of qmake, which seems to think it should be in control of what compiler is used. I've filed a bug report with the project asking them for help: http://code.google.com/p/phantomjs/issues/detail?id=1087
comment:11 follow-up: 12 Changed 16 months ago by barracuda156
Replying to jmroot:
Only Apple compilers accept -fconstant-cfstrings, so a workaround would be to deselect FSF gcc.
Documentation claims those are/were supported by [some] non-Apple compilers. https://releases.llvm.org/5.0.2/tools/clang/docs/genindex.html https://gcc.gnu.org/onlinedocs/gcc-6.5.0/gcc/Objective-C-and-Objective-C_002b_002b-Dialect-Options.html
The flag is not accepted by gcc12 though.
comment:12 follow-up: 13 Changed 16 months ago by cooljeanius (Eric Gallager)
Replying to barracuda156:
Replying to jmroot:
Only Apple compilers accept -fconstant-cfstrings, so a workaround would be to deselect FSF gcc.
Documentation claims those are/were supported by [some] non-Apple compilers. https://releases.llvm.org/5.0.2/tools/clang/docs/genindex.html https://gcc.gnu.org/onlinedocs/gcc-6.5.0/gcc/Objective-C-and-Objective-C_002b_002b-Dialect-Options.html
The flag is not accepted by gcc12 though.
Tracked by GCC bug 108743: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108743
Currently there's been a patch committed for GCC trunk and the 13 branch, I'm guessing Iain is leaving it open for further backporting...
comment:13 Changed 2 months ago by cooljeanius (Eric Gallager)
Replying to cooljeanius:
Replying to barracuda156:
Replying to jmroot:
Only Apple compilers accept -fconstant-cfstrings, so a workaround would be to deselect FSF gcc.
Documentation claims those are/were supported by [some] non-Apple compilers. https://releases.llvm.org/5.0.2/tools/clang/docs/genindex.html https://gcc.gnu.org/onlinedocs/gcc-6.5.0/gcc/Objective-C-and-Objective-C_002b_002b-Dialect-Options.html
The flag is not accepted by gcc12 though.
Tracked by GCC bug 108743: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108743
Currently there's been a patch committed for GCC trunk and the 13 branch, I'm guessing Iain is leaving it open for further backporting...
Update: the upstream GCC bug has now been closed as fixed, so all currently-supported FSF versions of GCC now support the -fconstant-cfstrings
flag now, too.
What you have attached is not a full log. Please "sudo port clean phantomjs", then try again, then attach the new log.
It does at least show that phantomjs is not UsingTheRightCompiler.