Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu x86 build fails from Heap-Layers Alignment Mismatch #9

Open
distantcam opened this issue Oct 13, 2018 · 0 comments
Open

Ubuntu x86 build fails from Heap-Layers Alignment Mismatch #9

distantcam opened this issue Oct 13, 2018 · 0 comments
Assignees

Comments

@distantcam
Copy link

I'm trying to build DieHard in a docker container so I can transfer the binary to another container for use.

The build container is just the following DockerFile.

FROM i386/ubuntu:bionic

RUN apt-get update

RUN mkdir -p /build/
WORKDIR /build/

RUN apt-get install -y --no-install-recommends ca-certificates git build-essential \
    && git clone --recurse-submodules https://github.com/emeryberger/DieHard.git \
    && cd DieHard/src \
    && make linux-gcc-x86 TARGET=libdiehard

When I run this I get the following error.

g++ -std=c++14 -m32 -finline-functions -malign-double -pipe -march=pentium4 -O3 -DNDEBUG  -I. -Iinclude -Iinclude/layers -Iinclude/util -Iinclude/math -Iinclude/static -Iinclude/rng -Iinclude/hoard -Iinclude/superblocks -IHeap-Layers -DDIEHARD_DIEHARDER=0 -D_REENTRANT=1 -DDIEHARD_MULTITHREADED=1 -shared Heap-Layers/wrappers/gnuwrapper.cpp source/libdieharder.cpp -Bsymbolic -o libdiehard.so -ldl -lpthread
In file included from Heap-Layers/wrappers/all.h:1:0,
                 from Heap-Layers/heaplayers.h:109,
                 from source/libdieharder.cpp:29:
Heap-Layers/wrappers/ansiwrapper.h: In instantiation of 'HL::ANSIWrapper<SuperHeap>::ANSIWrapper() [with SuperHeap = HL::LockedHeap<HL::PosixLockType, CombineHeap<DieHardHeap<8, 7, 65536, false, false>, TheLargeHeap> >]':
source/libdieharder.cpp:54:7:   required from here
Heap-Layers/wrappers/ansiwrapper.h:36:7: error: static assertion failed: Alignment mismatch
       static_assert(gcd(SuperHeap::Alignment, alignof(max_align_t)) == alignof(max_align_t), "Alignment mismatch");
       ^~~~~~~~~~~~~
Makefile:92: recipe for target 'linux-gcc-x86' failed
make: *** [linux-gcc-x86] Error 1

Any ideas how to fix this? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants