Skip to content

support for 32-bit devices #342

@robertkirkman

Description

@robertkirkman

Describe the bug
I understand that 32-bit devices are officially not supported currently. It does not need to be supported soon and I understand this may be low-priority. This issue is just to track the status of support for 32-bit devices.

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to compile on a 32-bit device

Expected behavior
Hopefully one day in the future there can be 32-bit support

Screenshots and charts

error: static assertion failed due to requirement 'sizeof(HeapMeta) == 16':
sizeof(HeapMeta) must be 16 to guarantee alignment
  169 |             sizeof(HeapMeta) == 16,
      |             ^~~~~~~~~~~~~~~~~~~~~~

Desktop (please complete the following information):

  • OS: GNU/Linux 32-bit x86
  • Version: 0.1.0
  • Compiler: gcc
  • Flags: None
  • Other relevant hardware specs: 32-bit x86 CPU
  • Build system: CMake

Additional context

I tried to edit the code and compile it anyway by doing this,

--- a/src/openzl/common/allocation.c
+++ b/src/openzl/common/allocation.c
@@ -134,6 +134,9 @@ size_t ALLOC_Arena_memUsed(const Arena* arena)
 typedef struct {
     size_t index;
     size_t size;
+#ifndef __LP64__
+    uint64_t _pad;
+#endif
 } HeapMeta;
 
 DECLARE_VECTOR_POINTERS_TYPE(HeapMeta)

and I also tried to compile it on a 32-bit ARM device in addition to a 32-bit x86 device, while trying to compile the tests using -DOPENZL_BUILD_TESTS=ON, but unfortunately this other error also happened:

ld.lld: error: relocation R_ARM_REL32 cannot be used against symbol 'typeinfo for openzl::tools::io::InputSetStatic::IteratorStateStatic'; recompile with -fPIC

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions