Opened 11 years ago

Last modified 8 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)

main.log (11.9 KB) - added by daniel@… 11 years ago.
build log

Download all attachments as: .zip

Change History (13)

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

Cc: singingwolfboy@… removed
Owner: changed from macports-tickets@… to singingwolfboy@…

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

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.

Changed 11 years ago by daniel@…

Attachment: main.log added

build log

comment:3 Changed 11 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 Changed 11 years ago by jmroot (Joshua Root)

Only Apple compilers accept -fconstant-cfstrings, so a workaround would be to deselect FSF gcc.

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

Cc: luca@… added

Has duplicate #38131.

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

Cc: egall@… added

Cc Me!

comment:7 Changed 11 years ago by luca@…

Cc: luca@… removed

Cc Me!

comment:8 Changed 11 years ago by luca@…

Cc: luca@… added

Cc Me!

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

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

-> nomaintainer

comment:10 in reply to:  2 Changed 11 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 in reply to:  4 ; Changed 8 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 in reply to:  11 Changed 8 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...

Note: See TracTickets for help on using tickets.