[MacPorts] #62490: ruby27: universal build is incorrect
MacPorts
noreply at macports.org
Fri Mar 19 11:03:46 UTC 2021
#62490: ruby27: universal build is incorrect
------------------------+----------------------
Reporter: ryandesign | Owner: kimuraw
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.99
Keywords: | Port: ruby27
------------------------+----------------------
ruby27 installs with the universal variant, but what is installed is
wrong, which causes other ports that use ruby27 to fail to build.
This is a regression; ruby26 universal is fine.
In ruby26, the file /opt/local/include/ruby-2.6.0/universal-
darwin17/ruby/config.h contains for example:
{{{
#if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32) ||
defined(ILP32)
#define SIZEOF_LONG 4
#elif defined(__LP64__) || defined(__LP64) || defined(_LP64) ||
defined(LP64)
#define SIZEOF_LONG 8
#endif
}}}
This is correct (or at least it allows other ports using ruby26 to build
and it looks plausible although I don't know where `__ILP32__` or
`__ILP32` or `_ILP32` or `ILP32` would be defined -- they are not standard
defines that I'm aware of, whereas `__LP64__` and `_LP64` are both
standard defines defined by clang in 64-bit mode). But in ruby27 the file
/opt/local/include/ruby-2.7.0/x86_64-darwin17/ruby/config.h contains only:
{{{
#define SIZEOF_LONG 8
}}}
This is right for x86_64 but wrong for i386, hence when I try to build
something that requires ruby27 (and I am building it universal) the build
fails with:
{{{
In file included from /opt/local/include/ruby-2.7.0/ruby.h:33:
/opt/local/include/ruby-2.7.0/ruby/ruby.h:119:37: error:
'ruby_check_sizeof_long' declared as an array with a negative size
typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/ruby-2.7.0/x86_64-darwin17/ruby/config.h:61:21: note:
expanded from macro 'SIZEOF_LONG'
#define SIZEOF_LONG 8
^
}}}
--
Ticket URL: <https://trac.macports.org/ticket/62490>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list