Skip to content

FEX Emu fails to build on Alpine Linux aarch64 #5106

@merll002

Description

@merll002

Upon following the official build instructions and building with ninja, I am met with the following errors:

localhost:~/FEX/Build# ninja
[1/2] Re-checking globbed directories...
[1/393] Building CXX object FEXCore/Source/CMakeFiles/JemallocDummy.dir/Utils/AllocatorHooks.cpp.o
[2/393] Building CXX object FEXCore/Source/CMakeFiles/JemallocLibs.dir/Utils/AllocatorHooks.cpp.o
[3/393] Generating ../../IR.md
[4/393] Generating ../../include/FEXCore/IR/IRDefines.inc, ../../include/FEXCore/IR/IRDefines_Dispatch.inc
[5/393] Generating ../../include/FEXCore/Config/ConfigValues.inl, ../../include/FEXCore/Config/ConfigOptions.inl, ../../generated/FEX.1
[6/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/tanll.c.o
[7/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/sinll.c.o
[8/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/polevll.c.o
[9/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/mtherr.c.o
[10/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/log2ll.c.o
[11/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/floorll.c.o
[12/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/exp2ll.c.o
[13/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/constll.c.o
[14/393] Building C object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/atanll.c.o
[15/393] Building CXX object External/cephes/CMakeFiles/cephes_128bit.dir/src/128bit/Impl.cpp.o
[16/393] Generating ../../generated/FEX.1.gz
[17/393] Building C object External/SoftFloat-3e/CMakeFiles/softfloat_3e.dir/src/s_f32UIToCommonNaN.c.o
ninja: job failed: /usr/bin/clang++ -DFEX_HAS_PRESERVE_ALL_ATTR=1 -DFEX_PRESERVE_ALL_ATTR="__attribute__((preserve_all))" -DGLOBAL_DATA_DIRECTORY=\"/usr/share/fex-emu/\" -D_M_ARM_64=1 -I/root/FEX/Build/FEXCore/Source -I/root/FEX/FEXCore/Source -I/root/FEX/External/robin-map/include -I/root/FEX/External/tiny-json -I/root/FEX/Source -I/root/FEX/Build/Source -I/root/FEX/Build/generated -I/root/FEX/FEXCore/include -O3 -DNDEBUG -fomit-frame-pointer -std=gnu++20 -flto=thin -fPIC   -Wno-trigraphs -fdiagnostics-color=always -fcolor-diagnostics -Wno-deprecated-enum-enum-conversion -Wall -fno-strict-aliasing -fno-exceptions -MD -MT FEXCore/Source/CMakeFiles/JemallocDummy.dir/Utils/AllocatorHooks.cpp.o -MF FEXCore/Source/CMakeFiles/JemallocDummy.dir/Utils/AllocatorHooks.cpp.o.d -o FEXCore/Source/CMakeFiles/JemallocDummy.dir/Utils/AllocatorHooks.cpp.o -c /root/FEX/FEXCore/Source/Utils/AllocatorHooks.cpp
/root/FEX/FEXCore/Source/Utils/AllocatorHooks.cpp:12:90: error: unknown type name 'off_t'
   12 | using mmap_hook_type = void* (*)(void* addr, size_t length, int prot, int flags, int fd, off_t offset);
      |                                                                                          ^
1 error generated.
ninja: job failed: /usr/bin/clang++ -DENABLE_JEMALLOC=1 -DFEX_HAS_PRESERVE_ALL_ATTR=1 -DFEX_PRESERVE_ALL_ATTR="__attribute__((preserve_all))" -DGLOBAL_DATA_DIRECTORY=\"/usr/share/fex-emu/\" -DJEMALLOC_NO_RENAME=1 -D_M_ARM_64=1 -I/root/FEX/Build/FEXCore/Source -I/root/FEX/FEXCore/Source -I/root/FEX/External/robin-map/include -I/root/FEX/External/tiny-json -I/root/FEX/Source -I/root/FEX/Build/Source -I/root/FEX/Build/generated -I/root/FEX/External/jemalloc/include -I/root/FEX/External/jemalloc/pregen/include -I/root/FEX/Build/External/jemalloc/include -O3 -DNDEBUG -fomit-frame-pointer -std=gnu++20 -flto=thin -fPIC   -Wno-trigraphs -fdiagnostics-color=always -fcolor-diagnostics -Wno-deprecated-enum-enum-conversion -Wall -fno-strict-aliasing -fno-exceptions -MD -MT FEXCore/Source/CMakeFiles/JemallocLibs.dir/Utils/AllocatorHooks.cpp.o -MF FEXCore/Source/CMakeFiles/JemallocLibs.dir/Utils/AllocatorHooks.cpp.o.d -o FEXCore/Source/CMakeFiles/JemallocLibs.dir/Utils/AllocatorHooks.cpp.o -c /root/FEX/FEXCore/Source/Utils/AllocatorHooks.cpp
/root/FEX/FEXCore/Source/Utils/AllocatorHooks.cpp:12:90: error: unknown type name 'off_t'
   12 | using mmap_hook_type = void* (*)(void* addr, size_t length, int prot, int flags, int fd, off_t offset);
      |                                                                                          ^
1 error generated.
ninja: subcommands failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions