Coder Social home page Coder Social logo

Error: Dynamic Loading Error: build/src/libtdjson.so.1.8.6: cannot open shared object file: No such file or directory at new TDLib about tdl HOT 3 CLOSED

0xYYY avatar 0xYYY commented on June 13, 2024
Error: Dynamic Loading Error: build/src/libtdjson.so.1.8.6: cannot open shared object file: No such file or directory at new TDLib

from tdl.

Comments (3)

0xYYY avatar 0xYYY commented on June 13, 2024 2

Thanks for the quick response and the suggestion. The output of that is

Error: Command failed: ldd libtdjson.so
at ChildProcess.exithandler (node:child_process:400:12)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:552:15)
at maybeClose (node:internal/child_process:1093:16)
at Socket.<anonymous> (node:internal/child_process:451:11)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:552:15)
at Pipe.<anonymous> (node:net:757:14)
at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) {
 code: 1,
 killed: false,
 signal: null,
 cmd: 'ldd libtdjson.so'
} not a dynamic executable

After seeing this message, I was able to identify and fix the issue. Documenting the details here for others' reference.

Google Cloud Functions execution environment for nodejs16 runtime is Ubuntu 18.04, but prebuilt-tdlib is built against Ubuntu 20.04. So I spinned up a Ubuntu 18.04 docker to build tdlib myself. The problem is that I'm using an M2 Mac (Apple Silicon), so the object is actually built with ARM aarch64 architecture.

$ file libtdjson.so
libtdjson.so: ELF 64-bit LSB shared object, **ARM aarch64**, version 1 (SYSV), dynamically linked, not stripped

I ended up creating a repo and built the tdlibjson.so object with Github Workflow with steps borrowed from here. And the shared object built from this process can be successfully used to create a TDLib instance on Google Cloud Functions.

from tdl.

Bannerets avatar Bannerets commented on June 13, 2024

Hi! Try to execute ldd ./build/src/libtdjson.so.1.8.6, for example: require('child_process').exec('ldd ./build/src/libtdjson.so.1.8.6', (err, stdout, stderr) => console.log(err, stdout, stderr))

from tdl.

smff avatar smff commented on June 13, 2024

bew install tdlib - fixed all my problems with it

from tdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.