udevbe / greenfield

HTML5 Wayland compositor :seedling:
GNU Affero General Public License v3.0
918 stars 28 forks source link

westfield-endpoint-generator: not found #10

Closed Zubnix closed 5 years ago

Zubnix commented 5 years ago

It's a fresh install of Debian 9. Having problems on install now...

Looks like westfield isn't found or something:

frink@dev:~/Work/greenfield/app-endpoint-server$ npm install app-endpointd@1.0.0 prepare /home/rg/Work/greenfield/app-endpoint-server mkdir -p src/protocol/ && npm run prepare:generate:wayland && npm run prepare:generate:xdgshell app-endpointd@1.0.0 prepare:generate:wayland /home/rg/Work/greenfield/app-endpoint-server westfield-endpoint-generator ../protocol/wayland.xml -o src/protocol sh: 1: westfield-endpoint-generator: not found

Originally posted by @frink in https://github.com/udevbe/greenfield/issues/8#issuecomment-496034336

Zubnix commented 5 years ago

Normally dev dependency exectuables are automatically picked up by npm. You should see the executable in app-endpoint-server/node-modules/.bin. If you do and they're not picked up by npm itself, I assume there is an issue with your node.js installation(?).

The quickfix for now is use something like nvm which works without issues here. I believe it even supports global npm install (npm -g) without sudo. I'll see if I can reproduce your problem.

Ideally the long term solution is to completely drop node.js for something that outputs a single static binary (Rust, Go, ...).

frink commented 5 years ago

not present for westfield-endpoint-generator in app-endpoint-server/node-modules/.bin

npm is telling the truth...

Zubnix commented 5 years ago

Strange stuff. https://docs.npmjs.com/files/folders#executables

I managed to reproduce it briefly as I had the westfield-endpoint-generator globally installed. After uninstalling it, I had the same error. However by removing the node_modules directory and running npm install again, it all worked. :disappointed:

frink commented 5 years ago

will try that

frink commented 5 years ago

Okay that got me over the hump. Not it's complaining about cmake version. Let me see if I can pull from Debian unstable.

Zubnix commented 5 years ago

The cmake version is pretty arbitrary, we can probably lower it and it will probably still work.

frink commented 5 years ago

Having problems with cmake. Can't upgrade without making system unstable. Why do we need CMake > 3.10?

frink commented 5 years ago

I'm on stretch and really need to stay there because the kernel is specialized provided by VPS host. Upgrading cmake fources an upgrade of libc6 which forces everything else to upgrade. Highly unstable option. Both buster and sid have this problem so I'm kinda stuck...

Zubnix commented 5 years ago

Try downgrading the cmake version as specified in the build file, we can probably do with a lower version. you can use npm link to point to your local (working) version. Btw what's the highest version you have?

frink commented 5 years ago

specified in build file?

My cmake is 3.7.2 your build wants 3.10

frink commented 5 years ago

Don't see where to change the version requirement...

Zubnix commented 5 years ago

https://github.com/udevbe/westfield/blob/master/server/node/endpoint-native/CMakeLists.txt#L1

Zubnix commented 5 years ago

Maybe I'll see if I can release a new Westfield version in the next few days. Some things in Westfield need fixing and changed to make copy-paste work anyway.

frink commented 5 years ago

Gotcha. I'll try downgrading the CMake...

frink commented 5 years ago

How do I reference my changed westfield from greenfield?

Zubnix commented 5 years ago

@frink you can use npm link <path-to-westfield-native> inside the application-endpoint-server directory. However it's a transitive dependency so I'm not quite sure how well it'll work.

frink commented 5 years ago

transitive?

Zubnix commented 5 years ago

@frink I've pushed an update to master, the cmake requirement has now been lowered

frink commented 5 years ago

will try it :-D

Zubnix commented 5 years ago

@frink did you manage to get it working?