Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  (Linux Editor) - undefined symbols in libOni.so?
#1
I'm running into problems using Obi Ropes / Obi Fluids in the Unity Linux Editor

At first, I was just getting errors about "DllNotFoundException: libOni". After some googling and troubleshooting, I tried a few things, one of which had an interesting effect. If I edit the definition of LIBNAME in Oni.cs so that it equals "Oni" instead of "libOni", matching the value used for other Linux platforms, then I first get warning about undefined symbols in libOni.so, followed by a bunch of similar DllNotFoundExceptions.

After some more troubleshooting, though, I'm nto having luck getting any further. Could I please get some help getting this to work in the Linux Unity editor?


OS: Ubuntu 16.04.4
Unity version: Tried with two versions: 2018.4.0f1 and 2018.3.0f2 with similar results
Obi assets: Obi Ropes and Obi Fluids, both downloaded today from the Asset Store (version 4.1)
Error messages when opening Unity (to the Electric Wires sample scene, though other sample scenes have similar result)

About 56 of the following warning, coming from various places:
Plugins: Couldn't open Assets/Obi/Plugins/x86_64/libOni.so, error: Assets/Obi/Plugins/x86_64/libOni.so: undefined symbol: _ZN3Oni23FrictionConstraintGroupC1EPNS_24CollisionConstraintGroupEPNS_6SolverE
Obi.ObiBatchedConstraints:Enable() (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:71)
Obi.ObiBatchedConstraints:OnEnable() (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:127)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr)

About 137 of the following error, coming from various places:
DllNotFoundException: Oni
Obi.ObiConstraintBatch.Enable () (at Assets/Obi/Scripts/Constraints/ConstraintBatches/ObiConstraintBatch.cs:132)
Obi.ObiBatchedConstraints.Enable () (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:71)
Obi.ObiBatchedConstraints.OnEnable () (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:127)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr)



Some things I've tried so far:
- Confirmed it works as expect on my Windows machine
- Tried using a fresh project with nothing but Obi Ropes imported, got same warning and errors
- Tried setting LIBNAME in Oni.cs to be "Oni" (#if UNITY_EDITOR_LINUX). Without this, LIBNAME was libOni, and I only got the DllNotFoundException errors; when set to "Oni", I get a combination of the warnings and errors.
- After seeing this thread: http://obi.virtualmethodstudio.com/forum...nux+editor
      I tried moving libOni.so to the folder described (changing only for my installed Unity Editor version), but that didn't seem to have an effect
- Tried editing my .bashrc to extend LD_LIBRARY_PATH with the path of my project/Assets/Obi/Plugins/x86_64, this may have been part of getting to the warnings above, not sure
Reply
#2
(13-05-2019, 05:23 AM)m000z0rz Wrote: I'm running into problems using Obi Ropes / Obi Fluids in the Unity Linux Editor

At first, I was just getting errors about "DllNotFoundException: libOni". After some googling and troubleshooting, I tried a few things, one of which had an interesting effect. If I edit the definition of LIBNAME in Oni.cs so that it equals "Oni" instead of "libOni", matching the value used for other Linux platforms, then I first get warning about undefined symbols in libOni.so, followed by a bunch of similar DllNotFoundExceptions.

After some more troubleshooting, though, I'm nto having luck getting any further. Could I please get some help getting this to work in the Linux Unity editor?


OS: Ubuntu 16.04.4
Unity version: Tried with two versions: 2018.4.0f1 and 2018.3.0f2 with similar results
Obi assets: Obi Ropes and Obi Fluids, both downloaded today from the Asset Store (version 4.1)
Error messages when opening Unity (to the Electric Wires sample scene, though other sample scenes have similar result)

About 56 of the following warning, coming from various places:
Plugins: Couldn't open Assets/Obi/Plugins/x86_64/libOni.so, error: Assets/Obi/Plugins/x86_64/libOni.so: undefined symbol: _ZN3Oni23FrictionConstraintGroupC1EPNS_24CollisionConstraintGroupEPNS_6SolverE
Obi.ObiBatchedConstraints:Enable() (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:71)
Obi.ObiBatchedConstraints:OnEnable() (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:127)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr)

About 137 of the following error, coming from various places:
DllNotFoundException: Oni
Obi.ObiConstraintBatch.Enable () (at Assets/Obi/Scripts/Constraints/ConstraintBatches/ObiConstraintBatch.cs:132)
Obi.ObiBatchedConstraints.Enable () (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:71)
Obi.ObiBatchedConstraints.OnEnable () (at Assets/Obi/Scripts/Constraints/ObiBatchedConstraints.cs:127)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr)



Some things I've tried so far:
- Confirmed it works as expect on my Windows machine
- Tried using a fresh project with nothing but Obi Ropes imported, got same warning and errors
- Tried setting LIBNAME in Oni.cs to be "Oni" (#if UNITY_EDITOR_LINUX). Without this, LIBNAME was libOni, and I only got the DllNotFoundException errors; when set to "Oni", I get a combination of the warnings and errors.
- After seeing this thread: http://obi.virtualmethodstudio.com/forum...nux+editor
      I tried moving libOni.so to the folder described (changing only for my installed Unity Editor version), but that didn't seem to have an effect
- Tried editing my .bashrc to extend LD_LIBRARY_PATH with the path of my project/Assets/Obi/Plugins/x86_64, this may have been part of getting to the warnings above, not sure

You don't need to change anything, not the library name or anything else. Simply restart unity after the first import. See the F.A.Q:
http://obi.virtualmethodstudio.com/tutorials/

Quote:Upon importing Obi into my project, I see a bunch of "DllNotFoundException: libOni" errors. How can I fix them?

Simply restart Unity. Sometimes, Unity fails to load new native libraries upon importing them. The only way to force a reload is to restart Unity.
Reply
#3
(13-05-2019, 06:39 AM)josemendez Wrote: You don't need to change anything, not the library name or anything else. Simply restart unity after the first import. See the F.A.Q:
http://obi.virtualmethodstudio.com/tutorials/

No luck; attached screenshot comes from after creating a new project, importing Obi Rope, restarting Unity, and then opening the Electrical Wires scene. Restarting after that results in the same t hing.

Sorry it's blurry... the full res screenshot was too big to attach.
Reply
#4
After some more troubleshooting, all I could come up with was the theory that there's some problem with the compiled libOni.so. But if that's true, I wouldn't expect Linux builds to work at all. So, I tried the following:

1) On a Windows machine, make a new project (in Unity 2018.3.0f2
2) Import the Obi Rope asset from the asset store
3) Build just the Electrical Wires scene with a target platform of Linux and an Architecture of x86_64 (with the Development Build box checked)
4) Transferred the result to my Linux machine
    - You can download it yourself here: https://www.dropbox.com/s/q1a0xtj7ve6b4d...d.zip?dl=0
5) Unzipped the build and changed permissions on obi_test.x86_64 so that it's executable
6) Ran obi_test.x86

And, I get the exact same errors! Lots of DllNotFound exceptions. And opening the log file reveals that it is also logging the undefined symbol warning for the FrictionConstraintGroup thing.

I looked over the FAQ to double check that Linux is supported as a platform, and didn't see anything special instructions for Linux Builds. But, this simple example doesn't seem to be working - are Linux builds broken in the current version, or am I doing something wrong?
Reply
#5
I have seen the following with Linux Player builds:


Code:
DllNotFoundException: Oni
  at (wrapper managed-to-native) Oni.DestroyHalfEdgeMesh(intptr)
  at Obi.ObiMeshTopology.OnDisable () [0x00001] in C:~\Assets\Externals\Obi\Scripts\DataStructures\ObiMeshTopology.cs:24


Perhaps this is related?
Reply
#6
Exclamación 
Could be related.

At this point, I'm definitely convinced that the libOni.so provided in the versions of Obi Rope, Obi Fluid, and Obi Cloth (not sure about Softbody, I don't have that) on the Asset Store are erroneous, and can't build anything will work on Linux. Seems like Oni::FrictionConstraintGroup::FrictionConstraintGroup(Oni::CollisionConstraintGroup*, Oni::Solver*) was missed in the linker?
Reply
#7
(15-05-2019, 01:49 AM)m000z0rz Wrote: Could be related.

At this point, I'm definitely convinced that the libOni.so provided in the versions of Obi Rope, Obi Fluid, and Obi Cloth (not sure about Softbody, I don't have that) on the Asset Store are erroneous, and can't build anything will work on Linux. Seems like Oni::FrictionConstraintGroup::FrictionConstraintGroup(Oni::CollisionConstraintGroup*, Oni::Solver*) was missed in the linker?

Hi,

We had no problems getting the store version to compile and run on linux (Linux Mint distro). We're investigating this issue and will get back to you guys asap.
Reply
#8
(15-05-2019, 08:43 AM)josemendez Wrote: Hi,

We had no problems getting the store version to compile and run on linux (Linux Mint distro). We're investigating this issue and will get back to you guys asap.

Out of curiosity, did you try the build I linked to, or a build you generated? I'm wondering if something is wrong with my build.

Also, I think verifying that we are getting the same libOni.so might be a good sanity check. md5sum on the x86_64/libOni.so gives me a079c7f16b5ad6763a72b991bf413754 - does your have the same hash?
Reply
#9
Are there any updates on this, or any answers to these questions?

- md5sum on x86X64/libOni.so ?
- Did you try the build I linked to, and does it work for you?

Also, can you provide the build you got to work on Mint?
Reply
#10
Any updates to this? Please remove "supports Linux" from your asset's description if this is no longer the case!!
Reply