Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsrt library link fails on some platforms due to assumed lib path from srt dependency #69

Open
yaruno opened this issue Jan 15, 2024 · 0 comments

Comments

@yaruno
Copy link
Contributor

yaruno commented Jan 15, 2024

Related to #12 .

Tested on Amazon Linux 2023.

Gyp expects libsrt.a file to be located under build/lib folder but the file is located under build/lib64 folder leading to failure of installing the library with npm under Amazon Linux 2023 (Centos variant linux).

[ec2-user@ip-srt]$ npm install
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Use your platform's native DOMException instead
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added

> @eyevinn/[email protected] install
> npm run build-srt && npm run rebuild


> @eyevinn/[email protected] build-srt
> node scripts/build-srt-sdk.js

Creating dir: /home/ec2-user/network/node_modules/@eyevinn/srt/deps
Cloning https://github.com/Haivision/srt.git#v1.5.2
Patch build script
Building SRT SDK and prerequisites for current platform: linux
Running ./configure
Running: cmake . -DCMAKE_INSTALL_PREFIX=/home/ec2-user/network/node_modules/@eyevinn/srt/deps/build

........



make: Entering directory '/home/ec2-user/network/node_modules/@eyevinn/srt/build'
  CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
rm -f Release/obj.target/node_modules/node-addon-api/nothing.a Release/obj.target/node_modules/node-addon-api/nothing.a.ar-file-list; mkdir -p `dirname Release/obj.target/node_modules/node-addon-api/nothing.a`
ar crs Release/obj.target/node_modules/node-addon-api/nothing.a @Release/obj.target/node_modules/node-addon-api/nothing.a.ar-file-list
  COPY Release/nothing.a
  CXX(target) Release/obj.target/node_srt/src/binding.o
  CXX(target) Release/obj.target/node_srt/src/node-srt.o
  SOLINK_MODULE(target) Release/obj.target/node_srt.node
/usr/bin/ld: cannot find /home/ec2-user/network/node_modules/@eyevinn/srt/deps/build/lib/libsrt.a: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [node_srt.target.mk:148: Release/obj.target/node_srt.node] Error 1
make: Leaving directory '/home/ec2-user/network/node_modules/@eyevinn/srt/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/ec2-user/network/node_modules/@eyevinn/srt/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
gyp ERR! System Linux 6.1.66-93.164.amzn2023.x86_64
gyp ERR! command "/home/ec2-user/.nvm/versions/node/v18.19.0/bin/node" "/home/ec2-user/network/node_modules/@eyevinn/srt/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ec2-user/network/node_modules/@eyevinn/srt
gyp ERR! node -v v18.19.0
gyp ERR! node-gyp -v v9.4.1
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /home/ec2-user/network/node_modules/@eyevinn/srt
npm ERR! command failed
npm ERR! command sh -c npm run build-srt && npm run rebuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant