Opened 9 months ago

Closed 9 months ago

#62185 closed defect (fixed)

libgcrypt: @1.9.1 build failures on macOS 10.8 and 10.9: cannot compile this unexpected cast lvalue yet

Reported by: mascguy (Christopher Nielsen) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libgcrypt

Description

Just encountered this in my macOS 10.9 VM. Looks like it's also failing for the 10.8 and 10.9 buildbots, as well:

cipher-gcm-intel-pclmul.c:400:33: error: cannot compile this unexpected cast lvalue yet
                : [pconst] "m" (pconst),

Full logs for builders:

https://build.macports.org/builders/ports-10.8_x86_64-builder/builds/37049/steps/install-port/logs/stdio

https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/137865/steps/install-port/logs/stdio

Change History (17)

comment:1 Changed 9 months ago by Schamschula (Marius Schamschula)

I was afraid this might happen with an old OS version.

However, --disable-asm was a blocker on all modern OS versions.

comment:2 Changed 9 months ago by mascguy (Christopher Nielsen)

Can we simply make the compiler blacklist more restrictive?

comment:3 Changed 9 months ago by Schamschula (Marius Schamschula)

Try adding

if {${os.platform} eq "darwin" && ${os.major} < 14} {
    configure.args  --disable-asm
}

comment:4 Changed 9 months ago by mascguy (Christopher Nielsen)

After including the compiler blacklist PG, our usual go-to worked: clang < 900.

Do we really want to disable assembly code...?

comment:5 Changed 9 months ago by Schamschula (Marius Schamschula)

The error

error: cannot compile this unexpected cast lvalue yet

is a clang issue, so it has nothing to do with --disable-asm

See: https://lists.llvm.org/pipermail/llvm-bugs/2014-July/034921.html

Last edited 9 months ago by Schamschula (Marius Schamschula) (previous) (diff)

comment:6 Changed 9 months ago by Schamschula (Marius Schamschula)

Looking at the Portfile notes:

    # libgcrypt-1.5.0 does some ugly stuff with their udiv_qrnnd macro in mpih-div.c
    # error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast
    configure.cflags-append "-fheinous-gnu-extensions"

no longer seems to work.

comment:7 Changed 9 months ago by Schamschula (Marius Schamschula)

Adding

    compiler.blacklist-append {clang < 900}

to the if {[string match "*clang*" ${configure.compiler}]} { block might do the trick.

comment:8 in reply to:  5 Changed 9 months ago by mascguy (Christopher Nielsen)

Please see comment:4. ;-)

comment:9 Changed 9 months ago by mascguy (Christopher Nielsen)

p.s. Great minds think alike!

comment:10 Changed 9 months ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed

In dd7c2343224a889551b7c7b4163ab3478ce01c1a/macports-ports (master):

libgcrypt: fix build on Mavericks and below

Closes: #62185

comment:11 Changed 9 months ago by mascguy (Christopher Nielsen)

Marius, don't you need to add the compiler_blacklist_versions portgroup...?

comment:12 Changed 9 months ago by mascguy (Christopher Nielsen)

Fix requires addition of said portgroup, reopening ticket.

comment:13 Changed 9 months ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: closedreopened

comment:14 Changed 9 months ago by Schamschula (Marius Schamschula)

True enough. I lifted the fix from another of my Portfiles and forgot to add the PG.

comment:15 Changed 9 months ago by Schamschula (Marius Schamschula)

In 8bedb2191285a8f03c853c6a97a3618dde5525ee/macports-ports (master):

libgcrypt: add missing PortGroup

See: #62185

comment:16 Changed 9 months ago by mascguy (Christopher Nielsen)

Marius, looks good, and binaries are now published for 10.9 and 10.8. Thanks for the quick response/fix!

This ticket can be closed.

comment:17 Changed 9 months ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.