Tencent / puerts

PUER(普洱) Typescript. Let's write your game in UE or Unity with TypeScript.
Other
5.07k stars 705 forks source link

[Unity] Bug: [Puer001] DllNotFoundException detected. #1515

Closed journeytosilius closed 1 year ago

journeytosilius commented 1 year ago

前置阅读 | Pre-reading

Puer的版本 | Puer Version

latest

Unity的版本 | Unity Version

2022.3.9f1

发生在哪个平台 | Platform

linux

错误信息 | Error Message

Following install manual and installing with demo project and openupm add com.tencent.puerts.core

[Puer001] DllNotFoundException detected. You can solve this problem following the FAQ.
UnityEngine.Debug:LogError (object)
Puerts.PuertsDLL:GetApiLevel () (at ./Library/PackageCache/com.tencent.puerts.core@2.0.2/Runtime/Src/Default/Native/PuertsDLL.cs:88)
Puerts.JsEnv:.ctor (Puerts.ILoader,int,intptr,intptr) (at ./Library/PackageCache/com.tencent.puerts.core@2.0.2/Runtime/Src/Default/JsEnv.cs:99)
Puerts.JsEnv:.ctor () (at ./Library/PackageCache/com.tencent.puerts.core@2.0.2/Runtime/Src/Default/JsEnv.cs:82)
NewBehaviourScript:Start () (at Assets/NewBehaviourScript.cs:10)

问题重现 | Bug reproduce

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Puerts.JsEnv env = new Puerts.JsEnv();
        env.Eval(@"
        console.log('hello world');
    ");

    }

    // Update is called once per frame
    void Update()
    {

    }
}
zombieyang commented 1 year ago

could you try to solve it following #941 first? I don't have a linux PC now.


Or you can use the V8 version first. It can be download here.

journeytosilius commented 1 year ago
Does this help ? There are few symbols missing

xavier@localbcn:~/nvmemount/puerts_unity_demo/package/Plugins/x86_64$ ldd -r libpuerts.so
    linux-vdso.so.1 (0x00007ffe2bd38000)
    libnode.so.93 (0x00007eff1c400000)
    libc++.so.1 => /lib/x86_64-linux-gnu/libc++.so.1 (0x00007eff1c304000)
    libunwind.so.1 => /lib/x86_64-linux-gnu/libunwind.so.1 (0x00007eff21694000)
    libc++abi.so.1 => /lib/x86_64-linux-gnu/libc++abi.so.1 (0x00007eff2165c000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007eff1c21b000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007eff21636000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007eff1c000000)
    /lib64/ld-linux-x86-64.so.2 (0x00007eff21790000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007eff21631000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007eff1bc00000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007eff2162c000)
undefined symbol: _ZN4node22InitializeNodeWithArgsEPNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEESA_SA_  (./libpuerts.so)
undefined symbol: _ZN4node17CreateEnvironmentEPNS_11IsolateDataEN2v85LocalINS2_7ContextEEERKNSt3__16vectorINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENSB_ISD_EEEESH_NS_16EnvironmentFlags5FlagsENS_8ThreadIdENS6_10unique_ptrINS_21InspectorParentHandleENS6_14default_deleteISM_EEEE    (./libpuerts.so)

Or you can use the V8 version first. It can be download here.

I have tried to do this as well, but I get the same error. I also tried to install through package manager.

journeytosilius commented 1 year ago

Downloading again and

Or you can use the V8 version first. It can be download here.

Worked thanks