Opened 4 years ago

Closed 4 years ago

#60765 closed defect (fixed)

xeus, nlohmann-json: error: an attribute list cannot appear here

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: Lord-Kamina (Gregorio Litenstein), ra1nb0w
Port: xeus, nlohmann-json

Description

xeus does not build:

/opt/local/include/nlohmann/json.hpp:22424:5: error: an attribute list cannot appear here
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, parse(ptr, ptr + len))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/nlohmann/json.hpp:1066:110: note: expanded from macro 'JSON_HEDLEY_DEPRECATED_FOR'
    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]])
                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/nlohmann/json.hpp:819:5: note: expanded from macro 'JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_'
    xpr \
    ^

Change History (4)

comment:1 Changed 4 years ago by Schamschula (Marius Schamschula)

Yosemite? I have no way of testing any potential fixes for this, other than throwing things at the build bot.

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

Yes, Yosemite.

You can see from the xeus port page that it built fine on 10.7-10.9 using newer MacPorts clang.

It failed on 10.10 using Apple clang 7 and failed on 10.11 using Apple clang 8.

It built fine on 10.13 using Apple clang 9.

10.12 is busy and hasn't built this yet.

But a good guess might be to blacklist {clang < 900}, if we want to solve it by blacklisting.

Although xeus is the port that failed to build, the file generating the error is from nlohmann-json. Maybe that indicates that the fix should be in nlohmann-json.

Maybe the problem should be reported to the upstream developers so that they have a chance to weigh in on a fix.

comment:3 Changed 4 years ago by Schamschula (Marius Schamschula)

In f7071707a9c1b6f3893abf5caf36c37f3cfdbc28/macports-ports (master):

xeus: attempt to fix error: an attribute list cannot appear here

See: #60765

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

Resolution: fixed
Status: assignedclosed

Thanks.

Note: See TracTickets for help on using tickets.