Opened 2 months ago

Closed 2 months ago

#70348 closed defect (fixed)

ruby33 @3.3.4: error: use of undeclared identifier 'memory_order_seq_cst' on macOS 10.7-10.9

Reported by: aeiouaeiouaeiouaeiouaeiouaeiou Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version:
Keywords: lion, mountainlion, mavericks Cc: fhgwright (Fred Wright)
Port: ruby33

Description

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

In file included from vm.c:514:
./vm_insnhelper.c:400:5: warning: implicit declaration of function 'atomic_signal_fence' is invalid in C99 [-Wimplicit-function-declaration]
    atomic_signal_fence(memory_order_seq_cst);
    ^
./vm_insnhelper.c:400:25: error: use of undeclared identifier 'memory_order_seq_cst'
    atomic_signal_fence(memory_order_seq_cst);
                        ^

Old Clang doesn't understand why C++11 chunks are used in C code. Since these chunks are part of stdatomic.h, every Clang version below 700 should be blacklisted.

Change History (3)

comment:1 Changed 2 months ago by jmroot (Joshua Root)

Cc: fhgwright added
Owner: set to kimuraw
Status: newassigned

That's of course a C11 feature, so to start with the port should set compiler.c_standard 2011? It's also adding an explicit -std=c99 for older platforms, which seems like it would be a problem (but if it's not, maybe it's an alternate workaround for this).

comment:2 in reply to:  1 Changed 2 months ago by aeiouaeiouaeiouaeiouaeiouaeiou

Replying to jmroot:

It's also adding an explicit -std=c99 for older platforms, which seems like it would be a problem

https://github.com/macports/macports-ports/pull/24869

Note that Xcode Clang 9 is already blacklisted due to a compilation bug, so it may even be easier to mark removing everything below the number 901.

comment:3 Changed 2 months ago by aeiouaeiouaeiouaeiouaeiouaeiou

Resolution: fixed
Status: assignedclosed

In 7e436691694545b636c0db91de76df2e71a365fe/macports-ports (master):

ruby33: refactor failing patch

Closes: #70348 (reported upstream)
Closes: #70369

Note: See TracTickets for help on using tickets.