murat-dogan / node-datachannel

WebRTC For Node.js and Electron. libdatachannel node bindings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in compiling on Debian 12

mghadam opened this issue · comments

Compilation of node-datachannel with libnice on Debian 12 fails with the following error:

[ 39%] Building CXX object _deps/libdatachannel-build/CMakeFiles/datachannel-static.dir/src/candidate.cpp.o
[ 41%] Building CXX object _deps/libdatachannel-build/CMakeFiles/datachannel-static.dir/src/channel.cpp.o
[ 41%] Building CXX object _deps/libdatachannel-build/CMakeFiles/datachannel-static.dir/src/configuration.cpp.o
[ 43%] Building CXX object _deps/libdatachannel-build/CMakeFiles/datachannel-static.dir/src/datachannel.cpp.o
In file included from /root/.cmake-js/node-x64/v18.13.0/include/node/openssl/././archs/linux-x86_64/asm/include/openssl/ssl.h:31,
                 from /root/.cmake-js/node-x64/v18.13.0/include/node/openssl/./ssl_asm.h:11,
                 from /root/.cmake-js/node-x64/v18.13.0/include/node/openssl/ssl.h:4,
                 from /usr/src/node-datachannel/build/_deps/libdatachannel-src/src/impl/tls.hpp:50,
                 from /usr/src/node-datachannel/build/_deps/libdatachannel-src/src/impl/certificate.hpp:15,
                 from /usr/src/node-datachannel/build/_deps/libdatachannel-src/src/impl/dtlstransport.hpp:12,
                 from /usr/src/node-datachannel/build/_deps/libdatachannel-src/src/impl/peerconnection.hpp:14,
                 from /usr/src/node-datachannel/build/_deps/libdatachannel-src/src/impl/datachannel.hpp:15,
                 from /usr/src/node-datachannel/build/_deps/libdatachannel-src/src/datachannel.cpp:13:
/root/.cmake-js/node-x64/v18.13.0/include/node/openssl/x509.h:4:11: fatal error: ./x509_asm.h: No such file or directory
    4 | # include "./x509_asm.h"
      |           ^~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [_deps/libdatachannel-build/CMakeFiles/datachannel-static.dir/build.make:118: _deps/libdatachannel-build/CMakeFiles/datachannel-static.dir/src/datachannel.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:350: _deps/libdatachannel-build/CMakeFiles/datachannel-static.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Is this related to the version of openssl? Debian 12 includes libssl-dev and openssl v3 compared to debian 11 which includes v1.1 .
The library compiles fine with gnutls on Debian 12.

I am not sure. I can see the file /home/murat/.cmake-js/node-x64/v18.15.0/include/node/openssl/x509_asm.h on my PC.
Can you also check the file existence?

Here are the x509* files there:

mos@sv2:~/.cmake-js/node-x64/v18.13.0/include/node/openssl# ls -l | grep x509
-rw-r--r--  1 mos  mos    3257 May 16  2022 x509err.h
-rw-r--r--  1 mos  mos      94 May 16  2022 x509.h
-rw-r--r--  1 mos  mos    2631 May 16  2022 x509_no-asm.h
-rw-r--r--  1 mos  mos    2506 May 16  2022 x509v3_asm.h
-rw-r--r--  1 mos  mos      98 May 16  2022 x509v3.h
-rw-r--r--  1 mos  mos    2671 May 16  2022 x509v3_no-asm.h
-rw-r--r--  1 mos  mos    2544 May 16  2022 x509_vfy_asm.h
-rw-r--r--  1 mos  mos     102 May 16  2022 x509_vfy.h
mos@sv2:~/.cmake-js/node-x64/v18.13.0/include/node/openssl#

The file name is x509v3_asm.h, so it is indeed related to openssl v3

But I didnt get the point. Why we have different versions. You are also using node v18.X

But I didnt get the point. Why we have different versions. You are also using node v18.X

is it perhaps cmake-js that finds openssl v3 is installed on the host OS so it chooses an appropriate version of node.js with a compatible library?