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

Debug builds fail on Windows/MinGW #186

Open
JesseTG opened this issue Jan 26, 2023 · 1 comment
Open

Debug builds fail on Windows/MinGW #186

JesseTG opened this issue Jan 26, 2023 · 1 comment

Comments

@JesseTG
Copy link

JesseTG commented Jan 26, 2023

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.

@JesseTG
Copy link
Author

JesseTG commented Jan 31, 2023

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant