Skip to content

Debug builds fail on Windows/MinGW #186

Open

Description

@JesseTG

When building this repo on Windows using the provided Makefile, it fails with a series of errors that look like the following:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ./src/teakra/src/processor.o:processor.cpp:(.rdata$_ZTIN14MatcherCreatorIN6Teakra11InterpreterELt40960EJ2AtI11EnumOperandI5AlmOpJLS4_0ELS4_1ELS4_2ELS4_3ELS4_4ELS4_5ELS4_6ELS4_7ELS4_8ELS4_9ELS4_10ELS4_11ELS4_12ELS4_13ELS4_14ELS4_15EEELj9EES2_I7MemImm8Lj0EES2_I2AxLj8EEEE5ProxyI11OperandListIJS6_S8_SA_EEEE+0x8): undefined reference to `typeinfo name for MatcherCreator<Teakra::Interpreter, (unsigned short)40960, At<EnumOperand<AlmOp, (AlmOp)0, (AlmOp)1, (AlmOp)2, (AlmOp)3, (AlmOp)4, (AlmOp)5, (AlmOp)6, (AlmOp)7, (AlmOp)8, (AlmOp)9, (AlmOp)10, (AlmOp)11, (AlmOp)12, (AlmOp)13, (AlmOp)14, (AlmOp)15>, 9u>, At<MemImm8, 0u>, At<Ax, 8u> >::Proxy<OperandList<At<EnumOperand<AlmOp, (AlmOp)0, (AlmOp)1, (AlmOp)2, (AlmOp)3, (AlmOp)4, (AlmOp)5, (AlmOp)6, (AlmOp)7, (AlmOp)8, (AlmOp)9, (AlmOp)10, (AlmOp)11, (AlmOp)12, (AlmOp)13, (AlmOp)14, (AlmOp)15>, 9u>, At<MemImm8, 0u>, At<Ax, 8u> > >'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ./src/teakra/src/processor.o:processor.cpp:(.rdata$_ZTIN14MatcherCreatorIN6Teakra11InterpreterELt32EJEE5ProxyI11OperandListIJEEEE+0x8): undefined reference to `typeinfo name for MatcherCreator<Teakra::Interpreter, (unsigned short)32>::Proxy<OperandList<> >'

(There are a lot of templates here.)

The full error log is available here.

This occurred on Windows 10, with MinGW. The build command is make DEBUG=1 -j. Linux builds (with or without debug symbols) work fine, as do non-debugging builds on Windows.

Activity

  1. JesseTG commented on Jan 31, 2023

    @JesseTG
    Author

    Ah! It seems that replacing this use of -O0 with -Og solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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