Skip to content

OpenBSD bad node executable. #22629

Closed
Closed
@sylkat

Description

@sylkat
  • Version:8.11.4(LTS)
  • Platform:OpenBSD 6.3 GENERIC#100 amd64
  • Subsystem:lib/internal/bootstrap_node.js

The node executable generated by gmake gives this error:

bootstrap_node.js:78
      process.execPath = realpathSync.native(process.execPath);                                    
TypeError: realpathSync.native is not a function
    at startup (bootstrap_node.js:78:39)
    at bootstrap_node.js:612:3

The error is in bootstrap_node.js line 78:

// On OpenBSD process.execPath will be relative unless we
// get the full path before process.execPath is used.
   if (process.platform === 'openbsd') {
     const { realpathSync } = NativeModule.require('fs');
     **process.execPath = realpathSync.native(process.execPath);**
   }

This code is executed only for OpenBSD and commenting it will generate a correct node executable.
So the patch is comment those lines, maybe for older versions were need is not the case and the FS module seems that has not the native method anymore.

Regards,
Sylkat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions