Mediasoup v2: Compile error "unrecognised cmd line option -m64"

I’m using Mediasoup v2 on Armbian based on debian buster release. While trying to build (npm install), failed with an error:

/home/ngz/ngaze/server/node_modules/mediasoup/worker/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o
cc: error: unrecognized command line option ‘-m64’

After this the directory “node_modules/mediasoup” is removed.

I really appreciate of any help in this error.

Note: I was able to successfully build on MacOS, Raspbian (Stretch and Buster) earlier.


make: Entering directory ‘/home/ngz/ngaze/server/node_modules/mediasoup/worker’
/usr/bin/python2 ./scripts/configure.py -R mediasoup-worker
[’-R’, ‘mediasoup-worker’, ‘/home/ngz/ngaze/server/node_modules/mediasoup/worker/mediasoup-worker.gyp’, ‘-I’, ‘/home/ngz/ngaze/server/node_modules/mediasoup/worker/common.gypi’, ‘–depth=.’, ‘-f’, ‘make’, ‘-Goutput_dir=/home/ngz/ngaze/server/node_modules/mediasoup/worker/out’, ‘–generator-output’, ‘/home/ngz/ngaze/server/node_modules/mediasoup/worker/out’, ‘-Dgcc_version=83’, ‘-Dclang=0’, ‘-Dhost_arch=aarch64’, ‘-Dtarget_arch=aarch64’, ‘-Dopenssl_fips=’, ‘-Dmediasoup_asan=false’, ‘-Dnode_byteorder=little’]
make BUILDTYPE=Release -C out
make[1]: Entering directory ‘/home/ngz/ngaze/server/node_modules/mediasoup/worker/out’


CC(target) /home/ngz/ngaze/server/node_modules/mediasoup/worker/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o
cc: error: unrecognized command line option ‘-m64’
make[1]: *** [deps/openssl/openssl.target.mk:743: /home/ngz/ngaze/server/node_modules/mediasoup/worker/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o] Error 1
make[1]: Leaving directory ‘/home/ngz/ngaze/server/node_modules/mediasoup/worker/out’
make: *** [Makefile:22: Release] Error 2
make: Leaving directory ‘/home/ngz/ngaze/server/node_modules/mediasoup/worker’
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! mediasoup@2.6.12 postinstall: make Release -C worker
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the mediasoup@2.6.12 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ngz/.npm/_logs/2019-07-10T19_56_08_187Z-debug.log

Assuming this also happens if you run npm install mediasoup@3 (does it?), this is a generic issue due to GYP stuff.

I’ve created an issue in GitHub. Please, follow it and comment on it:

Hi @krish. Will you able to help up by testing changes related to this compilation issue? I’m afraid we do not have “Armbian based on debian buster”. Which platform/hardware/device are you using?

BTW: please answer in the corresponding GitHub issue: https://github.com/versatica/mediasoup/issues/321

Definitely, I can test the changes.
Is the fix available in V2 branch?

I’ll update the bug with the details asked.

No, it’s in v3, but this is just about compilation process so if fixed in v3 we’ll also change it in v2.

Please, do this in your host:

$ git clone https://github.com/versatica/mediasoup.git
$ cd mediasoup
$ git checkout v3
$ cd worker
$ make

and let’s know.

Anyway, please, let’s go to the GitHub issue :slight_smile:

So fixed in v2.6.13 and v3.2.1. Thanks!