Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

build fails with external lief at version 1.0.0

Aperta
#66,238 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp, node.js
Ambito
build-system

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
122k
Fork
37.4k
Merge medio
4g 2h
PR unite (30g)
277

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodejs/node

Tutte le issue di nodejs/node

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.