nodejs / node-gyp

Node.js native addon build tool
MIT License
9.86k stars 1.79k forks source link

shared_library builds have moved location #2233

Open rvagg opened 3 years ago

rvagg commented 3 years ago

There's some urgency to this with the pending npm@7 release.

Ref: https://github.com/nodejs/node/pull/35474

node-gyp 5.1.0 (current npm version):

build/
build/binding.target.mk
build/ping.target.mk
build/config.gypi
build/binding.Makefile
build/Release
build/Release/.deps
build/Release/.deps/Release
build/Release/.deps/Release/ping.so.d
build/Release/.deps/Release/obj.target
build/Release/.deps/Release/obj.target/binding
build/Release/.deps/Release/obj.target/binding/binding.o.d
build/Release/.deps/Release/obj.target/ping.so.d
build/Release/.deps/Release/obj.target/binding.node.d
build/Release/.deps/Release/obj.target/ping
build/Release/.deps/Release/obj.target/ping/ping.o.d
build/Release/.deps/Release/binding.node.d
build/Release/ping.so
build/Release/obj.target
build/Release/obj.target/binding
build/Release/obj.target/binding/binding.o
build/Release/obj.target/ping.so
build/Release/obj.target/binding.node
build/Release/obj.target/ping
build/Release/obj.target/ping/ping.o
build/Release/binding.node
build/Makefile

current node-gyp master:

build/
build/binding.target.mk
build/ping.target.mk
build/config.gypi
build/binding.Makefile
build/Release
build/Release/.deps
build/Release/.deps/Release
build/Release/.deps/Release/lib.target
build/Release/.deps/Release/lib.target/ping.so.d
build/Release/.deps/Release/obj.target
build/Release/.deps/Release/obj.target/binding
build/Release/.deps/Release/obj.target/binding/binding.o.d
build/Release/.deps/Release/obj.target/ping.so.d
build/Release/.deps/Release/obj.target/binding.node.d
build/Release/.deps/Release/obj.target/ping
build/Release/.deps/Release/obj.target/ping/ping.o.d
build/Release/.deps/Release/binding.node.d
build/Release/lib.target
build/Release/lib.target/ping.so
build/Release/obj.target
build/Release/obj.target/binding
build/Release/obj.target/binding/binding.o
build/Release/obj.target/ping.so
build/Release/obj.target/binding.node
build/Release/obj.target/ping
build/Release/obj.target/ping/ping.o
build/Release/binding.node
build/Makefile

Note the difference in location of ping.so. The test is expecting it to be in build/${common.buildType}/ping.so.

binding.gyp is @ https://github.com/nodejs/node/blob/master/test/addons/dlopen-ping-pong/binding.gyp

@targos

About https://github.com/nodejs/node-gyp/pull/1975#pullrequestreview-320644497: Back in 2012, node-gyp made a local patch to gyp, changing where shared libraries would be written. When I reunited the gyp code between node-gyp and Node.js last year, this change was reverted as we didn't find why it was done in the first place, and keeping it was breaking the Node.js builds.

npm@7 is about to go out with our latest code and it's going to mean shared libraries are in a different location, arguably an internal build location that shouldn't be of concern to consumers (like obj.target). This is going to mean people using shared library builds need to add yet another location to search for their .so on top of the current list (see https://ghub.io/bindings for the full list so far).

IMO this is a bug and we should fix it. But we need to figure out how to get it addressed here for our needs but not break nodejs/node.

This is mostly a question for @nodejs/gyp people since I think the bulk of the work needs to be done there.

/cc @nodejs/node-gyp

ryzokuken commented 3 years ago

So, I have two thoughts. On one hand, I think I'd be really happy if we figured out what the more appropriate behavior was, and switch to that, atleast in the longer run. One another, I think we should really fix this behavior for node-gyp right now, handle it properly in node core (since that doesn't affect the ecosystem) and only change it if needed in a major release.

rvagg commented 3 years ago

I'm inclined to think that the appropriate behaviour is what it's always done, which is to place the final .so in the same place as standard target builds. Getting it baked into a major release of npm is going to be painful for us and the ecosystem—we're either going to have to adapt to it or quickly push out a "fix" for it because we were wrong.

Re https://github.com/nodejs/node-gyp/commit/a2ed0df84e294a197e3eb36b8213db6d8116028c

I can't really make sense of the original behaviour. And this comment prefixing it all just makes it even more confusing:

# Xcode puts shared_library results into PRODUCT_DIR, and some gyp files
# rely on this. Emulate this behavior for mac.

Combined with the self.flavor != 'mac' leaves me scratching my head. Why is it good enough for mac to put it in PRODUCT_DIR but ever other platform to go deeper into lib.X? There must be some original precedent that made that the appropriate choice but then when they added Xcode support it had a different behaviour and they decided to unify the make behaviour on mac with the Xcode version. But it was too baked in at the time to move every other platform?

But IMO Nate baked in the behaviour for node-gyp that it should be in the top of $(builddir), so changing it is our problem now.

Maybe it's simply that gyp wasn't originally designed to build exposed shared libraries and that shared libraries were just intermediate targets to build the final exposed targets, so shared libraries were somehow meant to be hidden behind all of the gyp cruft (kind of weird with shared libraries, but perhaps?). But with node-gyp we're allowing users to expose shared libraries so the use-case is different to gyp's original intent.

What are the implications of changing this for nodejs/node?

targos commented 3 years ago

I don't remember what the implications are. We need to try a new CI run to see the exact errors. My first thought is that it can be an issue for cross-compiled builds, because the output for target and host would overwrite themselves.

targos commented 3 years ago

@rvagg do you know any project / npm module that relies on shared libraries being output in a specific place and will be broken by npm 7? We haven't found one in CITGM.

rvagg commented 3 years ago

Yeah, good question. Here's some candidates (not exhaustive since there are projects that have sub-definitions in files not named binding.gyp): https://github.com/search?l=&q=%22shared_library%22+filename%3Abinding.gyp&type=code

appmetrics is in the list, I imagine that's quite popular and worth testing out.

rvagg commented 3 years ago

OK, here's why we need to fix this: https://github.com/MylesBorins/node/commit/73150f94d8edd595c6aff83db56ea883483c60e8#diff-0e3a10eceb23013e92432a2df0befd92

-module.exports.load(`${path.dirname(bindingPath)}/ping.so`);
+
+let pingSOPath = `${path.dirname(bindingPath)}/lib.target/ping.so`;
+
+if (common.isOSX) {
+  pingSOPath = `${path.dirname(bindingPath)}/ping.so`;
+}
+
+console.log('module.exports.load:', pingSOPath);
+module.exports.load(pingSOPath);

we have divergent behaviour between the Xcode generator and the make generator, as per the note in GYP about this. So not only would users need to adapt to a new location for shared libraries, they need to branch on platform.

Now I don't know who this would break for, there are plenty of projects out there using shared_library but I don't know if many are actually loading them from Node rather than simply using them for intermediates in their build. So maybe the impact is low. But the platform discrepancy is enough of a problem on its own that we should fix this.

targos commented 3 years ago

I agree that it is worth fixing, but I'm not certain it should be done in gyp itself. Would it be possible to move the files from node-gyp? How does it work with the .node binary now?

rvagg commented 3 years ago

It just defers entirely to gyp. node-gyp's role is to simply serve as a JS wrapper to setup the environment and invoke it with the right arguments.

richardlau commented 3 years ago

The .node binary is a loadable module: https://github.com/nodejs/node-gyp/blob/1e2e94d9851a1685d80d591262d0730681b5481d/addon.gypi#L7-L8 https://github.com/nodejs/node-gyp/blob/1e2e94d9851a1685d80d591262d0730681b5481d/addon.gypi#L41-L43

which means it doesn't get follow the same path as shared_libarary: https://github.com/nodejs/node-gyp/blob/3baa4e4172c47052ee7e942cef542c1a7dea75aa/gyp/pylib/gyp/generator/make.py#L2213-L2223

In practical terms perhaps we could add a switch the toggle the behavior in gyp and then pass/trigger that when calling gyp from node-gyp?

richardlau commented 3 years ago

Yeah, good question. Here's some candidates (not exhaustive since there are projects that have sub-definitions in files not named binding.gyp): https://github.com/search?l=&q=%22shared_library%22+filename%3Abinding.gyp&type=code

appmetrics is in the list, I imagine that's quite popular and worth testing out.

FWIW appmetrics is broken by this but it currently depends on node-gyp 5 so it isn't immediately obvious when testing with the current v15.0.0-proposal (with npm 7): https://github.com/RuntimeTools/appmetrics/blob/4862e6882e85b63ea22c55cb4b273f17ef4820cb/package.json#L10

Changing that to `7.x` gives: ``` make: *** No rule to make target `Release/libagentcore.so', needed by `../omr-agentcore/libagentcore.so'. Stop. ``` ``` -bash-4.2$ PATH=/home/riclau/sandbox/bin/testnode/bin/:$PATH npm_config_nodedir=/home/riclau/sandbox/bin/testnode npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 > appmetrics@5.1.1 install > node showBuildInfo.js && node-gyp rebuild Fri, 09 Oct 2020 11:20:45 GMT ******************************************************************************** You are installing the Node Application Metrics monitoring and profiling module. Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ******************************************************************************** ******************************************************************************** Appmetrics uses node-gyp to compile and build local binary libraries to enhance execution performance. If the following compilation and build logs contain errors, make sure you have the node-gyp pre-requisites installed (https://github.com/nodejs/node-gyp#installation). If you have them and the build still had errors, see if there are any related issues at https://github.com/RuntimeTools/appmetrics/issues). If there aren't, feel free to open a new issue to report the bug. ******************************************************************************** gyp info it worked if it ends with ok gyp info using node-gyp@7.1.0 gyp info using node@15.0.0 | linux | x64 gyp info find Python using Python version 2.7.5 found at "/usr/bin/python" gyp info spawn /usr/bin/python gyp info spawn args [ gyp info spawn args '/home/users/riclau/sandbox/github/appmetrics/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/users/riclau/sandbox/github/appmetrics/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/users/riclau/sandbox/github/appmetrics/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/riclau/sandbox/bin/testnode/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/riclau/sandbox/bin/testnode', gyp info spawn args '-Dnode_gyp_dir=/home/users/riclau/sandbox/github/appmetrics/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/riclau/sandbox/bin/testnode/$(Configuration)/node.lib', gyp info spawn args '-Dmodule_root_dir=/home/users/riclau/sandbox/github/appmetrics', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory `/home/users/riclau/sandbox/github/appmetrics/build' make: Warning: File `omr-agentcore/memoryplugin.target.mk' has modification time 28 s in the future ACTION binding_gyp_appmetrics_target_Set_appmetrics_reported_version_build_level Release/obj.target/appmetrics/geni/appmetrics.cpp infile: ./src/appmetrics.cpp outfile: /home/users/riclau/sandbox/github/appmetrics/build/Release/obj.target/appmetrics/geni/appmetrics.cpp Replacing '"99\.99\.99\.29991231"' with '"5.1.1.202010090720"' CXX(target) Release/obj.target/appmetrics/geni/appmetrics.o Release/obj.target/appmetrics/geni/appmetrics.cpp: In function ‘void emitMessage(uv_async_t*, int)’: Release/obj.target/appmetrics/geni/appmetrics.cpp:424:44: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local*) const’ is deprecated [-Wdeprecated-declarations] listener->callback->Call(argc, argv); ^ In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22:0: ../node_modules/nan/nan.h:1742:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ CXX(target) Release/obj.target/appmetrics/src/headlessutils.o ../src/headlessutils.cpp: In function ‘void headless::asyncfunc(uv_async_t*)’: ../src/headlessutils.cpp:51:39: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local*) const’ is deprecated [-Wdeprecated-declarations] headless::zipFunction->Call(1, argv); ^ In file included from ../src/headlessutils.h:21:0, from ../src/headlessutils.cpp:18: ../node_modules/nan/nan.h:1742:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ CXX(target) Release/obj.target/appmetrics/src/objecttracker.o SOLINK_MODULE(target) Release/obj.target/appmetrics.node COPY Release/appmetrics.node CXX(target) Release/obj.target/heapdump/src/heapdump/heapdump.o ../src/heapdump/heapdump.cc: In function ‘void {anonymous}::InvokeCallback(const char*)’: ../src/heapdump/heapdump.cc:143:32: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, v8::Local, int, v8::Local*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] argc, argv); ^ In file included from ../src/heapdump/heapdump.cc:15:0: /home/riclau/sandbox/bin/testnode/include/node/node.h:191:50: note: declared here NODE_EXTERN v8::Local MakeCallback( ^ /home/riclau/sandbox/bin/testnode/include/node/node.h:108:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ SOLINK_MODULE(target) Release/obj.target/heapdump.node COPY Release/heapdump.node ACTION omr_agentcore_binding_gyp_agentcore_target_Set_core_reported_version_build_level Release/obj.target/agentcore/geni/monitoring/agent/Agent.cpp infile: ./src/ibmras/monitoring/agent/Agent.cpp outfile: /home/users/riclau/sandbox/github/appmetrics/build/Release/obj.target/agentcore/geni/monitoring/agent/Agent.cpp Replacing '"99\.99\.99\.29991231"' with '"3.2.9.202010090720"' CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/Logger.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/LogManager.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/MemoryManager.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/util/FileUtils.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/util/LibraryUtils.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/port/linux/Thread.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/port/linux/Process.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/port/Lock.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/port/ThreadData.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/Properties.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/PropertiesFile.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/util/strUtils.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/common/util/sysUtils.o CXX(target) Release/obj.target/agentcore/geni/monitoring/agent/Agent.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/agent/threads/ThreadPool.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/agent/threads/WorkerThread.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/agent/SystemReceiver.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/connector/ConnectorManager.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/agent/Bucket.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/agent/BucketList.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/Plugin.o CXX(target) Release/obj.target/agentcore/omr-agentcore/src/ibmras/monitoring/connector/configuration/ConfigurationConnector.o SOLINK(target) Release/obj.target/omr-agentcore/libagentcore.so COPY Release/lib.target/libagentcore.so CXX(target) Release/obj.target/hcapiplugin/omr-agentcore/src/ibmras/monitoring/connector/api/APIConnector.o SOLINK(target) Release/obj.target/omr-agentcore/libhcapiplugin.so COPY Release/lib.target/libhcapiplugin.so CXX(target) Release/obj.target/envplugin/omr-agentcore/src/ibmras/monitoring/plugins/common/environment/envplugin.o SOLINK(target) Release/obj.target/omr-agentcore/libenvplugin.so COPY Release/lib.target/libenvplugin.so CXX(target) Release/obj.target/cpuplugin/omr-agentcore/src/ibmras/monitoring/plugins/common/cpu/cpuplugin.o SOLINK(target) Release/obj.target/omr-agentcore/libcpuplugin.so COPY Release/lib.target/libcpuplugin.so CXX(target) Release/obj.target/memoryplugin/omr-agentcore/src/ibmras/monitoring/plugins/common/memory/MemoryPlugin.o SOLINK(target) Release/obj.target/omr-agentcore/libmemoryplugin.so COPY Release/lib.target/libmemoryplugin.so CXX(target) Release/obj.target/headlessplugin/omr-agentcore/src/ibmras/monitoring/connector/headless/HLConnector.o SOLINK(target) Release/obj.target/omr-agentcore/libheadlessplugin.so COPY Release/lib.target/libheadlessplugin.so CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/Clients.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/Heap.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/LinkedList.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/Log.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/Messages.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTAsync.o ../omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTAsync.c: In function ‘MQTTAsync_cycle’: ../omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTAsync.c:2561:13: warning: variable ‘nosockets_count’ set but not used [-Wunused-but-set-variable] static int nosockets_count = 0; ^~~~~~~~~~~~~~~ CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTPacket.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTPacketOut.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTPersistence.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTPersistenceDefault.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTProtocolClient.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/MQTTProtocolOut.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/SocketBuffer.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/Socket.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/StackTrace.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/Thread.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/Tree.o CC(target) Release/obj.target/hcmqtt/omr-agentcore/org.eclipse.paho.mqtt.c/src/utf-8.o CXX(target) Release/obj.target/hcmqtt/omr-agentcore/src/ibmras/monitoring/connector/mqtt/MQTTConnector.o SOLINK(target) Release/obj.target/omr-agentcore/libhcmqtt.so COPY Release/lib.target/libhcmqtt.so make: *** No rule to make target `Release/libagentcore.so', needed by `../omr-agentcore/libagentcore.so'. Stop. make: Leaving directory `/home/users/riclau/sandbox/github/appmetrics/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/users/riclau/sandbox/github/appmetrics/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (node:events:327:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12) gyp ERR! System Linux 3.10.0-1062.12.1.el7.x86_64 gyp ERR! command "/home/users/riclau/sandbox/bin/testnode/bin/node" "/home/users/riclau/sandbox/github/appmetrics/node_modules/.bin/node-gyp" "rebuild" gyp ERR! cwd /home/users/riclau/sandbox/github/appmetrics gyp ERR! node -v v15.0.0 gyp ERR! node-gyp -v v7.1.0 gyp ERR! not ok npm ERR! code 1 npm ERR! path /home/users/riclau/sandbox/github/appmetrics npm ERR! command failed npm ERR! command sh -c node showBuildInfo.js && node-gyp rebuild npm ERR! A complete log of this run can be found in: npm ERR! /home/users/riclau/.npm/_logs/2020-10-09T11_20_54_148Z-debug.log -bash-4.2$ find . -type f -name '*.so' ./omr-agentcore/libagentcore.so ./omr-agentcore/plugins/libhcmqtt.so ./omr-agentcore/plugins/libcpuplugin.so ./omr-agentcore/plugins/libenvplugin.so ./omr-agentcore/plugins/libmemoryplugin.so ./omr-agentcore/plugins/libhcapiplugin.so ./omr-agentcore/plugins/libheadlessplugin.so ./build/Release/obj.target/omr-agentcore/libagentcore.so ./build/Release/obj.target/omr-agentcore/libhcapiplugin.so ./build/Release/obj.target/omr-agentcore/libenvplugin.so ./build/Release/obj.target/omr-agentcore/libcpuplugin.so ./build/Release/obj.target/omr-agentcore/libmemoryplugin.so ./build/Release/obj.target/omr-agentcore/libheadlessplugin.so ./build/Release/obj.target/omr-agentcore/libhcmqtt.so ./build/Release/lib.target/libagentcore.so ./build/Release/lib.target/libhcapiplugin.so ./build/Release/lib.target/libenvplugin.so ./build/Release/lib.target/libcpuplugin.so ./build/Release/lib.target/libmemoryplugin.so ./build/Release/lib.target/libheadlessplugin.so ./build/Release/lib.target/libhcmqtt.so -bash-4.2$ ```
rvagg commented 3 years ago

this seems to work for nodejs/node https://github.com/nodejs/node/compare/master...rvagg:rvagg/gyp-lib.target?expand=1

essentially winding back the use of lib.target for any top-level target & dependency for make.

good across the containered tests which include a shared library build https://ci.nodejs.org/job/node-test-commit-linux-containered/22729/

running a full suite @ https://ci.nodejs.org/job/node-test-commit/41218/, the ARM cross compiler might be a concern, but it seems that removing lib.target entirely for targets in gyp-next might be a practical and solve the problem here and still supporting nodejs/node.

I'm off for the day if someone else is inclined to pick this up. I'm not sure I want to be the one to push this through tbh, I have quite a bit on my plate at the moment so I'd appreciate whatever effort others can throw at this.

rvagg commented 3 years ago

had a problem with the Pi3s, I had to restart them all, clear out workspaces and have restarted the arm-fanned here https://ci.nodejs.org/job/node-test-commit-arm-fanned/16803/

(actually heading off now)