weixin_39628186 2020-11-30 00:30
浏览 0

Manual build .node latest version

Hi

in older versions (i see < 0.2.1) i did like this, and it worked


mkdir -p third_party/webrtc
cp -r <output webrtc build>/lib third_party/webrtc
cp -r <output webrtc build>/include third_party/webrtc
SKIP_DOWNLOAD=true npm install
</output></output>

now I don't understand how to do the same: 1. run the build script 2. skip download and build libwebrtc 3. set custom path libwebrtc - output build directory 4. complete build .node

node-webrtc builder does not support androind-arm64 (aarch64), i try and have many errors, which is not surprising because it was written about it officially. Ok I tried to download and compile manually from openwebrtc documentation and I got it


drwx------ 25 ubuntu ubuntu      4096 Nov 13 20:16 api
drwx------  4 ubuntu ubuntu      4096 Nov 13 20:00 audio
drwx------ 11 ubuntu ubuntu      4096 Nov 13 20:32 base
drwx------  4 ubuntu ubuntu      4096 Nov 13 19:48 build
drwx------  3 ubuntu ubuntu      4096 Nov 13 19:34 buildtools
drwx------ 13 ubuntu ubuntu      4096 Nov 13 20:01 call
drwx------  9 ubuntu ubuntu      4096 Nov 13 19:58 common_audio
drwx------  4 ubuntu ubuntu      4096 Nov 13 19:59 common_video
-rw-rw-r--  1 ubuntu ubuntu         0 Nov 13 20:33 default.stamp
drwx------ 13 ubuntu ubuntu     12288 Nov 13 20:33 examples
drwxrwxr-x  3 ubuntu ubuntu      4096 Nov 13 23:31 inc
-rw-rw-r--  1 ubuntu ubuntu  37199569 Nov 14 10:34 inc.tar.gz
-rw-rw-r--  1 ubuntu ubuntu 114067220 Nov 13 20:29 libwebrtc.a
drwx------ 14 ubuntu ubuntu      4096 Nov 13 20:16 logging
drwx------ 11 ubuntu ubuntu      4096 Nov 13 20:16 media
drwx------ 16 ubuntu ubuntu      4096 Nov 13 20:00 modules
drwx------  4 ubuntu ubuntu      4096 Nov 13 20:00 p2p
drwx------  5 ubuntu ubuntu      4096 Nov 13 20:16 pc
-rw-rw-r--  1 ubuntu ubuntu         0 Nov 13 19:35 poison_audio_codecs.stamp
-rw-rw-r--  1 ubuntu ubuntu         0 Nov 13 19:35 poison_software_video_codecs.stamp
drwx------ 29 ubuntu ubuntu      4096 Nov 13 20:19 rtc_base
drwx------  9 ubuntu ubuntu      4096 Nov 13 20:16 rtc_tools
drwx------  4 ubuntu ubuntu      4096 Nov 13 20:29 sdk
drwx------  3 ubuntu ubuntu      4096 Nov 13 19:58 stats
drwx------  6 ubuntu ubuntu      4096 Nov 13 19:58 system_wrappers
drwx------ 11 ubuntu ubuntu      4096 Nov 13 20:00 test
drwx------  6 ubuntu ubuntu      4096 Nov 13 19:34 testing
drwx------ 37 ubuntu ubuntu      4096 Nov 13 20:00 third_party
drwx------  3 ubuntu ubuntu      4096 Nov 13 19:34 tools
drwx------  5 ubuntu ubuntu      4096 Nov 13 20:01 video
-rw-rw-r--  1 ubuntu ubuntu    120492 Nov 13 19:34 webrtc.ninja
-rw-rw-r--  1 ubuntu ubuntu       882 Nov 13 19:34 webrtc_common.ninja
-rw-rw-r--  1 ubuntu ubuntu         0 Nov 13 19:35 webrtc_common.stamp

i have *.a, *.so,*.h files to dependencies cmake file How do i set custom build libwertc and skip download and build, offical script node-wrtc? Thanks!

该提问来源于开源项目:node-webrtc/node-webrtc

  • 写回答

5条回答 默认 最新

  • weixin_39628186 2020-11-30 00:30
    关注

    Ok, i comment operation in three files: 1. download-webrtc.sh 2. configure-webrtc.sh 3. build-webrtc.sh

    create files and folder next path <node-wrtc dir>/build/external/libwebrtc/build/Release

    
    drwx------ 5 u0_a214 u0_a214 4096 Nov 14 15:13 obj
    

    in obj

    
    drwx------ 3 u0_a214 u0_a214      4096 Nov 13 19:34 buildtools
    drwxrwxr-x 3 u0_a214 u0_a214      4096 Nov 14 02:31 inc
    -rw------- 1 u0_a214 u0_a214 114067220 Nov 14 13:42 libwebrtc.a
    drwx------ 5 u0_a214 u0_a214      4096 Nov 13 20:16 pc
    

    try build and have next log:

    
    $ SKIP_DOWNLOAD=true npm install
    npm WARN deprecated fsevents.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
    
    > wrtc.4.7-dev install /data/data/com.termux/files/home/node-webrtc
    > node scripts/download-prebuilt-or-build-from-source.js
    
    Running ncmake configure
    CMake Warning (dev) in CMakeLists.txt:
      No project() command is present.  The top-level CMakeLists.txt file must
      contain a literal, direct call to the project() command.  Add a line of
      code such as
    
        project(ProjectName)
    
      near the top of the file, but after cmake_minimum_required().
    
      CMake is pretending there is a "project(Project)" command on the first
      line.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- NodeJS: Using node, version v14.14.0
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /data/data/com.termux/files/home/node-webrtc/build
    Running ncmake build
    [  1%] Performing update step for 'project_depot_tools'
    [  1%] No patch step for 'project_depot_tools'
    [  2%] No configure step for 'project_depot_tools'
    [  3%] No build step for 'project_depot_tools'
    [  4%] No install step for 'project_depot_tools'
    [  5%] Completed 'project_depot_tools'
    [  7%] Built target project_depot_tools
    [ 14%] Built target project_libwebrtc
    [ 15%] Building CXX object CMakeFiles/wrtc.dir/src/binding.cc.o
    /data/data/com.termux/files/home/node-webrtc/node_modules/node-addon-api/../node-addon-api/napi.h:5:10: error: 'functional' file not found [clang-diagnostic-error]
    #include <functional>
    </functional>
    评论

报告相同问题?