conda-forge / nodejs-feedstock

A conda-smithy repository for nodejs.
BSD 3-Clause "New" or "Revised" License
5 stars 37 forks source link

Fails to compile extensions locally #342

Open wolfv opened 8 months ago

wolfv commented 8 months ago

Solution to issue cannot be found in the documentation.

Issue

Unfortunately, because we don't perform prefix replacement, the embedded configuration points to the wrong (encoded) prefix. That in turn adds wrong prefix-variables to compilation commands when you locally need to install a compiled extension.

I think it would be awesome if we could patch nodejs in such a way that it injects (at runtime,r or as env var) the correct prefix.

Installed packages

nodejs

Environment info

nodejs
minrk commented 8 months ago

We could try removing the flag disabling the prefix rewrite. There's a chance the bug it avoided has cured itself in the intervening period 🤞 .

Adding a test that exercises the failing case would be useful, too.

wolfv commented 8 months ago

I'm not sure that works because I think they embed JSON in a binary if I understood correctly. But I'll see if I can have a look this weekend

minrk commented 8 months ago

nodejs ships their own binaries which appear to be prefix-independent, so maybe there's just option or two we are missing.

If it's things like compiler paths, then perhaps some calls to e.g. export CC=$(basename $CC) might be enough.