Skip to content

LIEF deps fails to build on PPC64 #62445

@tjuhaszrh

Description

@tjuhaszrh

Version

25.8.2

Platform

fc45.ppc64le ppc64le GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Standard build

How often does it reproduce? Is there a required condition?

Always when default setup in node.gyp if LIEF settings remain set:

[ 'node_use_lief=="true" and node_shared_lief=="false"', {
          'defines': [ 'HAVE_LIEF=1' ],
          'dependencies': [ 'deps/LIEF/lief.gyp:liblief' ],
}],
[ 'node_use_lief=="true" and node_shared_lief=="true"', {
          'defines': [ 'HAVE_LIEF=1' ],
}],

What is the expected behavior? Why is that the expected behavior?

Build succeeds.

What do you see instead?

[2872/3398] g++ -MMD -MF obj/deps/LIEF/src/PE/liblief.utils.o.d -D_GLIBCXX_USE_CXX11_ABI=1 -D_FILE_OFFSET_BITS=64 -DNODE_OPENSSL_CONF_NAME=openssl_conf -DNODE_OPENSSL_CERT_STORE -DOPENSSL_FIPS -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DLIEF_STATIC '-DtestttttMBEDTLS_CONFIG_FILE="config/mbedtls/config.h"' -DMBEDTLS_NO_PLATFORM_ENTROPY -DSPDLOG_DISABLE_DEFAULT_LOGGER -DSPDLOG_NO_EXCEPTIONS '-DSPDLOG_FUNCTION=""' -DNDEBUG -I../../deps/LIEF -I../../deps/LIEF/include -I../../deps/LIEF/src -I../../deps/LIEF/third-party/mbedtls/include -I../../deps/LIEF/third-party/mbedtls/library -I../../deps/LIEF/third-party/spdlog/include -I../../deps/LIEF/third-party/frozen/include -I../../deps/LIEF/include/LIEF/third-party -I../../deps/LIEF/include/LIEF/third-party/internal -pthread -Wall -Wextra -Wno-unused-parameter -fPIC -fPIC -m64 -mminimal-toc -O3 -flto=4 -fuse-linker-plugin -ffat-lto-objects -fno-omit-frame-pointer -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -g1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DOPENSSL_NO_ENGINE -O3 -fno-ipa-icf -fno-rtti -fno-exceptions -fno-strict-aliasing -std=gnu++20 -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wpedantic -Wno-expansion-to-defined -Werror=return-type -fno-exceptions -c ../../deps/LIEF/src/PE/utils.cpp -o obj/deps/LIEF/src/PE/liblief.utils.o FAILED: [code=1] obj/deps/LIEF/src/PE/liblief.utils.o

g++ -MMD -MF obj/deps/LIEF/src/PE/liblief.utils.o.d -D_GLIBCXX_USE_CXX11_ABI=1 -D_FILE_OFFSET_BITS=64 -DNODE_OPENSSL_CONF_NAME=openssl_conf -DNODE_OPENSSL_CERT_STORE -DOPENSSL_FIPS -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DLIEF_STATIC '-DtestttttMBEDTLS_CONFIG_FILE="config/mbedtls/config.h"' -DMBEDTLS_NO_PLATFORM_ENTROPY -DSPDLOG_DISABLE_DEFAULT_LOGGER -DSPDLOG_NO_EXCEPTIONS '-DSPDLOG_FUNCTION=""' -DNDEBUG -I../../deps/LIEF -I../../deps/LIEF/include -I../../deps/LIEF/src -I../../deps/LIEF/third-party/mbedtls/include -I../../deps/LIEF/third-party/mbedtls/library -I../../deps/LIEF/third-party/spdlog/include -I../../deps/LIEF/third-party/frozen/include -I../../deps/LIEF/include/LIEF/third-party -I../../deps/LIEF/include/LIEF/third-party/internal -pthread -Wall -Wextra -Wno-unused-parameter -fPIC -fPIC -m64 -mminimal-toc -O3 -flto=4 -fuse-linker-plugin -ffat-lto-objects -fno-omit-frame-pointer -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -g1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DOPENSSL_NO_ENGINE -O3 -fno-ipa-icf -fno-rtti -fno-exceptions -fno-strict-aliasing -std=gnu++20 -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wpedantic -Wno-expansion-to-defined -Werror=return-type -fno-exceptions -c ../../deps/LIEF/src/PE/utils.cpp -o obj/deps/LIEF/src/PE/liblief.utils.o

Assembler messages: {standard input}:177668: Error: operand out of range (0x9208 is not between 0xffffffffffff8000 and 0x7ffc)

Additional information

This issue has been present since version 25.5.0 since LEIF was added.
Build succeeds on any other platform and succeeds if the LEIF is disabled in node.gyp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ppcIssues and PRs related to the Power architecture.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions