Coder Social home page Coder Social logo

Native build fails on Linux about cead HOT 11 CLOSED

Phantop avatar Phantop commented on July 26, 2024
Native build fails on Linux

from cead.

Comments (11)

ArchLeaders avatar ArchLeaders commented on July 26, 2024

What's your gcc version? Abseil only builds on the later versions of gcc, so make sure that's updated.

Also I should mention that this library is now depreciated in favor of cs-oead

from cead.

Phantop avatar Phantop commented on July 26, 2024

I'm on GCC 13.1.1, Clang 15.0.7. Neither works.

I am aware it's deprecated, though I'm currently working on porting the TotkRandomizer to Linux, which uses this library, and Cead seems to be a major blocker in doing so.

I have managed to compile it sucessfully by pulling all the submodules to their latest commits (no doubt breaking stuff in the process but... it built?) and actual use of the library seems hampered.

A line like:

Byml byaml = Byml.FromBinary(myByteArray);

terminates the entire program:

terminate called after throwing an instance of 'oead::InvalidDataError'
  what():  Unexpected version

Considering I'm mostly just buggering around with this, I have no clue what I'm doing and how to even begin to approach getting this working 😅. Help is appreciated, though understandable if you don't want to for a deprecated library.

from cead.

ArchLeaders avatar ArchLeaders commented on July 26, 2024

That error usually indicates the byml you're opening is invalid. Is it by chance compressed with zstd still?

from cead.

Phantop avatar Phantop commented on July 26, 2024

That is... possible? But unlikely. I can confirm that the code I'm using works with the compiled Windows Cead.dll found here in Wine. I'm using a modified version of that repo, and I haven't touched any of the compression or HashTable code used, so I don't really know where the discrepency would be.

from cead.

ArchLeaders avatar ArchLeaders commented on July 26, 2024

Might not be what you're looking for as far as maintainability, but have you tried using the linux build from the workflows?

I know that build works on linux, so if that doesn't work then it's likely an issue with your byml file somewhere/somehow.

from cead.

Phantop avatar Phantop commented on July 26, 2024

Using the existing dll file gives me this error. My own dll gives me the error I've said above, as does including Cead as a ProjectReference.

Unhandled exception. System.DllNotFoundException: Unable to load shared library '/tmp/Cead-1.0.0.0/Cead.lib' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/tmp/Cead-1.0.0.0/Cead.lib: invalid ELF header

   at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath)
   at Cead.Interop.DllManager.LoadCead() in D:\a\Cead\Cead\src\Interop\DllManager.cs:line 48
   at TotkRandomizer.Program.Main(String[] args) in /home/glados/Downloads/TotkRandomizer/Program.cs:line 16
fish: Job 1, 'bin/Debug/net7.0/TotkRandomizer…' terminated by signal SIGABRT (Abort)

from cead.

ArchLeaders avatar ArchLeaders commented on July 26, 2024

Yeah the included dll contains a windows native assembly, so it won't work on linux. But the Cead.so in the workflows should work fine (assuming it's not the byml file, which I suspect).

from cead.

Phantop avatar Phantop commented on July 26, 2024

Hmm yeah it's still happening with that one... I really don't know what's up with this. This code does work through Wine with the same files, so I suppose it could be something else within it that doesn't work on Linux. I suppose I could take some time to do some additional testing on this elsewhere, then.

from cead.

Phantop avatar Phantop commented on July 26, 2024

Some additional testing does appear to indicate that Byml reading just doesn't work for me.

using Cead;
using Cead.Interop;

DllManager.LoadCead();
Span<byte> data = File.ReadAllBytes(@"A-7_Dynamic.bcett.byml");
Byml byaml = Byml.FromBinary(data);

gives the same error. The byml file is valid and opens in NX-Editor.

from cead.

Phantop avatar Phantop commented on July 26, 2024

...I just noticed that there's another repo for this on TotkMods, which doesn't have this issue...

Really sorry for wasting your time my god. Thanks for your assistance either way!

from cead.

ArchLeaders avatar ArchLeaders commented on July 26, 2024

No worries, glad you found the issue 👍

from cead.

Related Issues (2)

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.