Skip to content

If built in linux x64, sfarkxtc can't correctly extract files #15

@moltenform

Description

@moltenform

I think the issue stems from the code assuming that sizeof unsigned long is 4, but when building in a linux x64 environment, sizeof unsigned long is 8.

Currently, in linux x64, everything appears to build, but decoding any file, even valid files, gives the error Invalid length... Result: Invalid compressed data (file is corrupt) errorcode 7. The issue is also mentioned here: http://linux-audio.4202.n7.nabble.com/sfArk-for-Linux-git-repo-access-td93130.html#a93161

Possible approaches,

  • add a static assert+explanation so that it won't build if sizeof unsigned long != 4
  • alter the makefiles to make x86 builds. the following worked for me:
    • added a -m32 to the CXXFLAGS and LD sections of the makefiles
    • I needed to install the g++-multilibs and zlib1g-dev:i386 packages
  • fix the issue by using a known-length type like uint32_t. Possibly use the patch in the link above.

Which do we think is best? I know I can code at least the first 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions