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.
I think the issue stems from the code assuming that
sizeof unsigned longis4, but when building in a linux x64 environment,sizeof unsigned longis8.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#a93161Possible approaches,
sizeof unsigned long != 4-m32to theCXXFLAGSandLDsections of the makefilesg++-multilibsandzlib1g-dev:i386packagesWhich do we think is best? I know I can code at least the first 2.