Opened 8 years ago

Last modified 8 years 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@… 8 years ago.
build log

Download all attachments as: .zip

Change History (11)

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

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

comment:2 Changed 8 years ago by ryandesign (Ryan 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 8 years ago by daniel@…

Attachment: main.log added

build log

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

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

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

Cc: luca@… added

Has duplicate #38131.

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

Cc: egall@… added

Cc Me!

comment:7 Changed 8 years ago by luca@…

Cc: luca@… removed

Cc Me!

comment:8 Changed 8 years ago by luca@…

Cc: luca@… added

Cc Me!

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

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

-> nomaintainer

comment:10 in reply to:  2 Changed 8 years ago by ryandesign (Ryan 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

Note: See TracTickets for help on using tickets.