Skip to content

FeeBSD Support #639

Open
Open
@tuaris

Description

@tuaris

Tested on

  • OS: FreeBSD (any version)
  • ZeroMQ.js version: 6.0.0-beta.19
  • npm: 10.5.1
  • node: v18.20.2

If I run npm install zeromq, in an empty directory It completes without any trouble:

$ mkdir clean
$ cd clean/
$ ls
$ npm install zeromq
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported

added 32 packages, and audited 33 packages in 2m

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
$ npm list
stratum@ /home/stratum
└── [email protected]

However, if I run it within the project's directory of https://github.com/benjamin-wilson/public-pool, it fails:

$ git clone https://github.com/benjamin-wilson/public-pool.git /home/stratum/service
$ cd /home/stratum/service
$ npm install zeromq
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /home/stratum/service/node_modules/zeromq
npm ERR! command failed
npm ERR! command sh -c (shx test -f ./script/build.js || run-s build.js) && cross-env npm_config_build_from_source=true aminya-node-gyp-build
npm ERR! gmake: Entering directory '/home/stratum/service/node_modules/zeromq/build'
npm ERR!   TOUCH Release/obj.target/libzmq.stamp
npm ERR!   CXX(target) Release/obj.target/zeromq/src/context.o
npm ERR! gmake: Leaving directory '/home/stratum/service/node_modules/zeromq/build'
npm ERR! No native build was found for platform=freebsd arch=x64 runtime=node abi=108 uv=1 libc=glibc node=18.20.2
npm ERR!     loaded from: /home/stratum/service/node_modules/zeromq
npm ERR!
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | freebsd | x64
npm ERR! gyp info find Python using Python version 3.9.18 found at "/usr/local/bin/python3.9"
npm ERR! gyp info spawn /usr/local/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/stratum/service/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/stratum/service/node_modules/zeromq/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/stratum/service/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/stratum/.cache/node-gyp/18.20.2/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/stratum/.cache/node-gyp/18.20.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/stratum/service/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/stratum/.cache/node-gyp/18.20.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/stratum/service/node_modules/zeromq',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn gmake
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/context.cc:2:
npm ERR! In file included from ../src/context.h:4:
npm ERR! In file included from ../src/prefix.h:5:
npm ERR! /home/stratum/.cache/node-gyp/18.20.2/include/node/node_version.h:96:9: warning: 'NAPI_VERSION' macro redefined [-Wmacro-redefined]
npm ERR! #define NAPI_VERSION 9
npm ERR!         ^
npm ERR! /home/stratum/.cache/node-gyp/18.20.2/include/node/js_native_api.h:20:9: note: previous definition is here
npm ERR! #define NAPI_VERSION 8
npm ERR!         ^
npm ERR! In file included from ../src/context.cc:2:
npm ERR! In file included from ../src/context.h:4:
npm ERR! ../src/prefix.h:8:10: fatal error: 'zmq.h' file not found
npm ERR! #include <zmq.h>
npm ERR!          ^~~~~~~
npm ERR! 1 warning and 1 error generated.
npm ERR! gmake: *** [zeromq.target.mk:128: Release/obj.target/zeromq/src/context.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `gmake` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/stratum/service/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm ERR! gyp ERR! System FreeBSD 14.0-RELEASE-p6
npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/stratum/service/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/stratum/service/node_modules/zeromq
npm ERR! gyp ERR! node -v v18.20.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/stratum/.npm/_logs/2024-07-04T10_42_09_843Z-debug-0.log

Even more bizarre is that is seems to all work fine on a system using:

npm -v
10.7.0
node -v
v18.20.3
git clone https://github.com/benjamin-wilson/public-pool.git public-pool2
Cloning into 'public-pool2'...
remote: Enumerating objects: 2425, done.
remote: Counting objects: 100% (1095/1095), done.
remote: Compressing objects: 100% (143/143), done.
remote: Total 2425 (delta 1040), reused 952 (delta 952), pack-reused 1330
Receiving objects: 100% (2425/2425), 554.08 KiB | 2.06 MiB/s, done.
Resolving deltas: 100% (1827/1827), done.

$ cd public-pool2/
$ npm install
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm warn deprecated [email protected]: this library is no longer supported
npm warn deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm warn deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

added 967 packages, and audited 968 packages in 39s

147 packages are looking for funding
  run `npm fund` for details

19 vulnerabilities (1 low, 13 moderate, 4 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

This makes no sense to me?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions