Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52365 closed defect (fixed)

phantomjs @2.0.0: failing to build in macOS Sierra

Reported by: andre.david@… Owned by: stromnov (Andrew Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: sierra Cc: chrisminett (Chris Minett), inkydaddy0923, ryandesign (Ryan Schmidt)
Port: phantomjs

Description (last modified by larryv (Lawrence Velázquez))

phantomjs @2.0.0_1 is failing to build with Mac OSX Sierra (10.12):

:info:build System architecture... (Darwin 16.0.0 x86_64)
:info:build    Xcode not set up properly. You may need to confirm the license
:info:build    agreement by running /usr/bin/xcodebuild without arguments.

Of course this is not the source of the problem, since the build system is working for all other ports.

Attachments (1)

main.log (7.4 KB) - added by andre.david@… 4 years ago.

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by andre.david@…

Attachment: main.log added

comment:1 Changed 4 years ago by andre.david@…

Sorry for the bad formatting in the description as well as the missing port information.

comment:2 Changed 4 years ago by larryv (Lawrence Velázquez)

Cc: stromnov@… removed
Description: modified (diff)
Owner: changed from macports-tickets@… to stromnov@…
Port: phantomjs added

comment:3 Changed 4 years ago by chrisminett (Chris Minett)

Cc: chrisminett added

comment:4 Changed 4 years ago by ioquatix (Samuel Williams)

I'm also having this problem.

comment:5 Changed 4 years ago by ioquatix (Samuel Williams)

It looks like because of this

    if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
        echo >&2
        echo "   Xcode not set up properly. You may need to confirm the license" >&2
        echo "   agreement by running /usr/bin/xcodebuild without arguments." >&2
        echo >&2
        exit 2
    fi

in src/qt/qtbase/configure

I could fix it by changing to

    if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
        echo >&2
        echo "   Xcode not set up properly. You may need to confirm the license" >&2
        echo "   agreement by running /usr/bin/xcodebuild without arguments." >&2
        echo >&2
        exit 2
    fi

and in src/qt/qtbase/mkspecs/features/mac/default_pre.prf

    # Make sure Xcode is set up properly
    isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
        error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")

comment:6 Changed 4 years ago by ioquatix (Samuel Williams)

I think the solution here is to simply update the Portfile to version 2.1 which doesn't appear to have this problem.

comment:7 Changed 4 years ago by ioquatix (Samuel Williams)

Actually, apparently 2.1.1 is the latest stable release, so that would be great!

comment:8 Changed 4 years ago by ioquatix (Samuel Williams)

Here is the correct release to use:

https://github.com/ariya/phantomjs/releases/tag/2.1.1

comment:9 Changed 4 years ago by ioquatix (Samuel Williams)

I tried my best to make an updated Portfile but ultimately couldn't get it to work

https://github.com/ariya/phantomjs/issues/14843

It would require a significant amount of fixing on our end which I don't think is the right approach.

comment:10 in reply to:  5 Changed 4 years ago by ryandesign (Ryan Schmidt)

Cc: inkydaddy0923 ryandesign added
Summary: phantomjs: failing to build in OSX Sierraphantomjs @2.0.0: failing to build in macOS Sierra

Has duplicate #53919.

Replying to ioquatix:

I think the solution here is to simply update the Portfile to version 2.1 which doesn't appear to have this problem.

This ticket is about the build failure on Sierra. Updating to 2.1.1 is tracked separately, in #51965.

Replying to ioquatix:

It looks like because of this

    if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
        echo >&2
        echo "   Xcode not set up properly. You may need to confirm the license" >&2
        echo "   agreement by running /usr/bin/xcodebuild without arguments." >&2
        echo >&2
        exit 2
    fi

in src/qt/qtbase/configure

I could fix it by changing to

    if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
        echo >&2
        echo "   Xcode not set up properly. You may need to confirm the license" >&2
        echo "   agreement by running /usr/bin/xcodebuild without arguments." >&2
        echo >&2
        exit 2
    fi

and in src/qt/qtbase/mkspecs/features/mac/default_pre.prf

    # Make sure Xcode is set up properly
    isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
        error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")

This is what the developers of Qt appear to have done in the current version of Qt, so I feel fine with making that change in phantomjs, to hold us over until we can figure out how to update to a newer version.

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

Resolution: fixed
Status: newclosed

In e7365db3a7b3164c64fa1e931a4d2945a1ed8693/macports-ports:

phantomjs: Fix build on Sierra

Closes: #52365

Note: See TracTickets for help on using tickets.