Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

build fails with external lief at version 1.0.0

Aberta
#66,238 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
cpp, node.js
Domínio
build-system

Direção de pesquisa

The error occurs in src/node_sea_bin.cc at lines 178 and 194, where a LIEF::MachO::Section constructor is called with two arguments. Check the LIEF library's API changes between versions; look for how to create a Section with name and data in LIEF 1.0.0. Start by examining the LIEF header files or documentation to find the correct constructor signature, then update the calls accordingly. Verify the fix by building Node.js with the shared-lief flag.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Currently, attempting to build node 26.10.0 with lief 1.0.0 and the configure flag "--shared-lief" results in:

../src/node_sea_bin.cc:178:54: error: no matching function for call to ‘LIEF::MachO::Section::Section(const std::string&, const std::vector<unsigned char>&)’
  178 |       LIEF::MachO::Section section(section_name, data);
      |                                                      ^
In file included from /gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO.hpp:69,
                 from /gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/LIEF.hpp:30,
                 from ../src/node_sea_bin.cc:12:
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:356:3: note: candidate: ‘LIEF::MachO::Section::Section(const LIEF::MachO::Section&)’
  356 |   Section(const Section& copy);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:356:3: note:   candidate expects 1 argument, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:353:3: note: candidate: ‘LIEF::MachO::Section::Section()’
  353 |   Section();
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:353:3: note:   candidate expects 0 arguments, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:161:3: note: candidate: ‘LIEF::MachO::Section::Section(LIEF::MachO::Section&&)’
  161 |   Section(Section&&);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:161:3: note:   candidate expects 1 argument, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:159:3: note: candidate: ‘LIEF::MachO::Section::Section(const LIEF::MachO::details::section_64&)’
  159 |   Section(const details::section_64& sec);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:159:3: note:   candidate expects 1 argument, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:158:3: note: candidate: ‘LIEF::MachO::Section::Section(const LIEF::MachO::details::section_32&)’
  158 |   Section(const details::section_32& sec);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:158:3: note:   candidate expects 1 argument, 2 provided
../src/node_sea_bin.cc:194:54: error: no matching function for call to ‘LIEF::MachO::Section::Section(const std::string&, const std::vector<unsigned char>&)’
  194 |       LIEF::MachO::Section section(section_name, data);
      |                                                      ^
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:356:3: note: candidate: ‘LIEF::MachO::Section::Section(const LIEF::MachO::Section&)’
  356 |   Section(const Section& copy);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:356:3: note:   candidate expects 1 argument, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:353:3: note: candidate: ‘LIEF::MachO::Section::Section()’
  353 |   Section();
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:353:3: note:   candidate expects 0 arguments, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:161:3: note: candidate: ‘LIEF::MachO::Section::Section(LIEF::MachO::Section&&)’
  161 |   Section(Section&&);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:161:3: note:   candidate expects 1 argument, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:159:3: note: candidate: ‘LIEF::MachO::Section::Section(const LIEF::MachO::details::section_64&)’
  159 |   Section(const details::section_64& sec);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:159:3: note:   candidate expects 1 argument, 2 provided
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:158:3: note: candidate: ‘LIEF::MachO::Section::Section(const LIEF::MachO::details::section_32&)’
  158 |   Section(const details::section_32& sec);
      |   ^~~~~~~
/gnu/store/i96k345l9bb7vabb9645wh9q6mqkxgh7-lief-1.0.0/include/LIEF/MachO/Section.hpp:158:3: note:   candidate expects 1 argument, 2 provided
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/process_wrap.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/signal_wrap.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/spawn_sync.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/stream_base.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/stream_pipe.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/stream_wrap.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/string_bytes.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/string_decoder.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/tcp_wrap.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/timers.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/timer_wrap.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/tracing/agent.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/tracing/trace_event_helper.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/tracing/traced_value.o
  CXX(target) /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/tty_wrap.o
make[1]: *** [node_base.target.mk:439: /tmp/guix-build-node-26.10.0.drv-0/node-v26.10.0/out/Release/obj.target/node_base/src/node_sea_bin.o] Error 1
make[1]: *** Waiting for unfinished jobs....
rm b28e06f7e674ef0f144c3ad95370a3c81f72fc026df121ee0dd4234f6acff89b.intermediate ffcd52f1767996a9dbb727f658cd560795e68d559a0d11df2b91666f8908c451.intermediate 7b7d1792cf4ba17e8ac3912d529efdf8d18988968a082367fb99f27af89cfac7.intermediate
make: *** [Makefile:145: node] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "32" "--max-load=32") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 33.7 seconds
command "make" "-j" "32" "--max-load=32" failed with status 2
build process 18 exited with status 256
builder for `/gnu/store/3vyn8lbdl0salanlfc0j38226jxz99qx-node-26.10.0.drv' failed with exit code 1

It'd be nice if it could be built using lief 1.0.0.

Linguagem predominante
JavaScript
Estrelas
122k
Forks
37.4k
Merge médio
4d 2h
PRs com merge (30d)
277

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de nodejs/node

Todas as issues de nodejs/node

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.