#66239 closed defect (fixed)

qt5*, qt6, phantomjs-qt: fail to parse on non-Darwin

Reported by: harens (Haren S) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: phantomjs-qt, qt6, qt59, qt513, qt511, qt55, qt57, qt56, qt58, qt53

Description

On non-Darwin, various qt ports fail to parse.

> uname -a
Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
> sudo port -v sync
...
Adding port aqua/phantomjs-qt
Adding port aqua/phoenix
Error: phantomjs-qt-qtbase: no usable SDK can be found
Failed to parse file aqua/phantomjs-qt/Portfile with subport 'phantomjs-qt-qtbase': no usable SDK can be found
no key output(103)
    while executing
"tsv::unset output $jobnum"
    (procedure "handle_completed_jobs" line 41)
    invoked from within
"handle_completed_jobs"
    (procedure "pindex_queue" line 4)
    invoked from within
"$func [file join $category $port]"
    (procedure "mporttraverse" line 21)
    invoked from within
"mporttraverse pindex_queue $directory"
    ("try" body line 4)
    (file "/opt/local/bin/portindex" line 4)
Adding subport phantomjs-qt-qtwebkit
Adding subport phantomjs-qt-sqlite-plugin
Command failed: /opt/local/bin/portindex /opt/local/var/macports/sources/github.com/macports/macports-ports

The issue arises from the following, probably since xcrun is a macOS-only command:

if {[catch {exec -ignorestderr /usr/bin/xcrun --sdk macosx${configure.sdk_version} --find ld  > /dev/null 2>@1}]} {

    # if no specific sdk can be found, check for a generic macosx sdk
    if {[catch {exec -ignorestderr /usr/bin/xcrun --sdk macosx --find ld > /dev/null 2>@1}]} {
        ui_error "${subport}: no usable SDK can be found"
        return -code error "no usable SDK can be found"
    } else {
        ui_debug "${subport}: using generic macosx SDK as macosx${configure.sdk_version} does not exist"
        configure.sdk_version
    }
}

To fix this, the above code block just needs to be wrapped in a platform darwin if statement. The qt5 port already does this and parses fine.

Change History (14)

comment:1 Changed 18 months ago by kencu (Ken)

Yeah, I have been waiting to see if my last fix worked for this.

https://github.com/macports/macports-ports/commit/8064a6215bc75fd5daaa974ba0d7f6225ba201bb

Last time I checked, the qt5 ports were still not in the ports.macports.org database, though, two days after I pushed it!

I checked just now again, and qt5-qttools still does not show up. So something is not working right.

So I tried to install macports on Ubuntu again to see what was going on with this, but macports no longer builds on Ubuntu for me.

Any ideas ?

comment:2 Changed 18 months ago by kencu (Ken)

perhaps I’ll just push the fix everywhere and let the dust settle.Someday they will re-emerge in the database, presumably.

comment:3 Changed 18 months ago by harens (Haren S)

Yeah, I have been waiting to see if my last fix worked for this. https://github.com/macports/macports-ports/commit/8064a6215bc75fd5daaa974ba0d7f6225ba201bb

It worked for me, so thanks for that :)

I saw your comments on my PR, I'll make those changes shortly. We can then decide what to do about the ports.macports.org issue.

So I tried to install macports on Ubuntu again to see what was going on with this, but macports no longer builds on Ubuntu for me.

The latest master builds fine for me on my raspberry pi. I'm curious to see what your error message is though, maybe in a separate ticket or something.

comment:4 Changed 18 months ago by harens <12570877+harens@…>

In 63c5957a4aace1c19fde10907c5207727cc4a8d5/macports-ports (master):

qt6: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:5 Changed 18 months ago by harens <12570877+harens@…>

In 2c46664c48485e83556ca81d11213e24fb2954f0/macports-ports (master):

qt59: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:6 Changed 18 months ago by harens <12570877+harens@…>

In 31bdeb0a3a84937ac336848327aa3b5836b49e51/macports-ports (master):

qt58: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:7 Changed 18 months ago by harens <12570877+harens@…>

In b524d5d8110bc132fd7cdc06d34004948cc8c81a/macports-ports (master):

qt57: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:8 Changed 18 months ago by harens <12570877+harens@…>

In 7f463a30edb5d058b7ff15f99b9948c1c65ab0ae/macports-ports (master):

qt56: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:9 Changed 18 months ago by harens <12570877+harens@…>

In a8b2a4a53f36543bed95bf4e7ddc9e7cbf673cc0/macports-ports (master):

qt55: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:10 Changed 18 months ago by harens <12570877+harens@…>

In d239680ce7b24fe3539844a607bf31e5d082bec9/macports-ports (master):

qt53: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:11 Changed 18 months ago by harens <12570877+harens@…>

In 042aab19ccb24c77916540d0afcdf957eacf731b/macports-ports (master):

qt513: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:12 Changed 18 months ago by harens <12570877+harens@…>

In 445dae2863c27d81880f33f5866ab4dc955f6295/macports-ports (master):

qt511: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:13 Changed 18 months ago by harens <12570877+harens@…>

In e66cfe0579ab59eb85ed71af40ae60123881fbe9/macports-ports (master):

phantomjs-qt: fix parse error on non-Darwin

See: #66239 [skip ci]

comment:14 Changed 18 months ago by harens <12570877+harens@…>

Resolution: fixed
Status: assignedclosed

In 7cd94e559fa80b6eb6927c2e577243557eb9f5f1/macports-ports (master):

qmake5 PG: fix parse error on non-Darwin

Closes: #66239 [skip ci]

Note: See TracTickets for help on using tickets.