Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OpenBSD/adJ #5478

Open
vtamara opened this issue Apr 19, 2024 · 0 comments
Open

Support for OpenBSD/adJ #5478

vtamara opened this issue Apr 19, 2024 · 0 comments

Comments

@vtamara
Copy link

vtamara commented Apr 19, 2024

Feature Use Case

Being able to use rollup natively in OpenBSD/adJ

Feature Proposal

Trying to use rollup on OpenBSD/adJ 7.4 that includes node 18.18.0 and an updated npm 10.5.2 produces:

% doas npm -i rollup
% rollup
/usr/local/lib/node_modules/rollup/dist/native.js:84                                                                                                            
        throw new Error(                                                                                                                                        
        ^                                                                       
                                                                                                                                                                
Error: Your current platform "openbsd" and architecture "x64" combination is not yet supported by the native Rollup build. Please use the WASM build "@rollup/wa
sm-node" instead.                                                               
                                                                                                                                                                
The following platform-architecture combinations are supported:  
android-arm                                                                     
android-arm64                                                                   
darwin-arm64                                                                    
darwin-x64                                                                      
linux-arm                                                                       
linux-arm (musl)                                                                                                                                                
linux-arm64                                                                     
linux-arm64 (musl) 
linux-ppc64                                                                                                                                                     
linux-riscv64                                                                                                                                                   
linux-s390x                                                                                                                                                     
linux-x64                                                                      
linux-x64 (musl)                                                                
win32-arm64                                                                     
win32-ia32                                                                                                                                                      
win32-x64                                                                                                                                                       
                                                                                
If this is important to you, please consider supporting Rollup to make a native build for your platform and architecture available.                             
    at throwUnsupportedError (/usr/local/lib/node_modules/rollup/dist/native.js:84:8)                                                                           
    at getPackageBase (/usr/local/lib/node_modules/rollup/dist/native.js:75:3)  
    at Object.<anonymous> (/usr/local/lib/node_modules/rollup/dist/native.js:37:21)                                                                             
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)        
    at Module.load (node:internal/modules/cjs/loader:1119:32)                   
    at Module._load (node:internal/modules/cjs/loader:960:12)                   
    at Module.require (node:internal/modules/cjs/loader:1143:19)                
    at require (node:internal/modules/cjs/helpers:119:18)                       
    at Object.<anonymous> (/usr/local/lib/node_modules/rollup/dist/shared/parseAst.js:12:19)                                                                    
                                                                                
Node.js v18.18.0

Thanks to your implementation in WebAssembly it is possible to use rollup in projects with package.json by adding these lines to package.json:

    "overrides": {
      "rollup": "npm:@rollup/wasm-node"
    }

However it would be more direct and faster to have a native build that I can help to start.

Cloning the sources of rollup and trying to install the dependencies will produce:

% pnpm install
...
node_modules/.pnpm/wasm-pack@0.12.1/node_modules/wasm-pack: Running postinstall script, failed in 138ms                                                           
.../node_modules/wasm-pack postinstall$ node ./install.js                                                                                                       
│ /home/vtamara/comp/js/rollup/node_modules/.pnpm/wasm-pack@0.12.1/node_modu…                                                                                   
│   throw new Error(`Unsupported platform: ${type} ${arch}`);                                                                                                   
│   ^                                                                                                                                                           
│ Error: Unsupported platform: OpenBSD x64                                                                                                                      
│     at getPlatform (/home/vtamara/comp/js/rollup/node_modules/.pnpm/wasm-p…                                                                                   
│     at getBinary (/home/vtamara/comp/js/rollup/node_modules/.pnpm/wasm-pac…                                                                                   
│     at install (/home/vtamara/comp/js/rollup/node_modules/.pnpm/wasm-pack@…
│     at Object.<anonymous> (/home/vtamara/comp/js/rollup/node_modules/.pnpm…
│     at Module._compile (node:internal/modules/cjs/loader:1256:14)
│     at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
│     at Module.load (node:internal/modules/cjs/loader:1119:32)
│     at Module._load (node:internal/modules/cjs/loader:960:12)
│     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/…
│     at node:internal/main/run_main_module:23:47
│ Node.js v18.18.0                      
└─ Failed in 138ms at /home/vtamara/comp/js/rollup/node_modules/.pnpm/wasm-pack@0.12.1/node_modules/wasm-pack
node_modules/.pnpm/weak-napi@2.0.2/node_modules/weak-napi: Running install script...
 ELIFECYCLE  Command failed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant