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

MLGO Demo Problem #145

Closed
xc303919323 opened this issue Sep 22, 2022 · 4 comments
Closed

MLGO Demo Problem #145

xc303919323 opened this issue Sep 22, 2022 · 4 comments

Comments

@xc303919323
Copy link

xc303919323 commented Sep 22, 2022

I recently follow project for optimization. Is demo of this repository too old?I have compiled it and produce many errors. Do you have a docker or the latest build command?

@mtrofin
Copy link
Collaborator

mtrofin commented Sep 22, 2022

We should set up a docker image, #71 has provided one in the meantime, perhaps that helps?

What errors do you get, btw?

(Also related #131 )

@xc303919323
Copy link
Author

xc303919323 commented Sep 22, 2022

Thanks, I read this and think about my problem. I have many linker errors in build fuchsia project, just like the following errors. I use the newest LLVM project, but my fuchsia project use the jiri update -gc ~/ml-compiler-opt/docs/demo/fuchsia.xml command. I'm tring to get the newest fuchsia project to test.

ld.lld: error: undefined symbol: _Unwind_SetIP
>>> referenced by cxa_personality.cpp:560 (build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxxabi/src/cxa_personality.cpp:560)
>>>               cxa_personality.cpp.o:(__gxx_personality_v0) in archive ../../../llvm-install/usr/local/bin/../lib/x86_64-unknown-linux-gnu/libc++.a
>>> referenced by cxa_personality.cpp:560 (build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxxabi/src/cxa_personality.cpp:560)
>>>               cxa_personality.cpp.o:(__gxx_personality_v0) in archive ../../../llvm-install/usr/local/bin/../lib/x86_64-unknown-linux-gnu/libc++.a

ld.lld: error: undefined symbol: _Unwind_GetLanguageSpecificData
>>> referenced by cxa_personality.cpp:626 (build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxxabi/src/cxa_personality.cpp:626)
>>>               cxa_personality.cpp.o:(__gxx_personality_v0) in archive ../../../llvm-install/usr/local/bin/../lib/x86_64-unknown-linux-gnu/libc++.a

ld.lld: error: undefined symbol: _Unwind_GetIP
>>> referenced by cxa_personality.cpp:641 (build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxxabi/src/cxa_personality.cpp:641)
>>>               cxa_personality.cpp.o:(__gxx_personality_v0) in archive ../../../llvm-install/usr/local/bin/../lib/x86_64-unknown-linux-gnu/libc++.a

ld.lld: error: undefined symbol: _Unwind_GetRegionStart
>>> referenced by cxa_personality.cpp:644 (build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxxabi/src/cxa_personality.cpp:644)
>>>               cxa_personality.cpp.o:(__gxx_personality_v0) in archive ../../../llvm-install/usr/local/bin/../lib/x86_64-unknown-linux-gnu/libc++.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

@boomanaiden154
Copy link
Collaborator

Try building at head of the Fuchsia tree and using the latest known compatible LLVM commit:

cd ${FUCHSIA_SRCDIR}
jiri package 'fuchsia/third_party/clang/${platform}'
cd ${LLVM_SRCDIR}
git checkout {output of previous command}

We currently have a PR open to get rid of the fuchsia.xml file due to some problems we've had there. Last time I tried working through the demo I was able to at least getting LLVM built with those steps (running into an error later on in the Fuchsia build though, but that might have been fixed at some point).

We also have #121 open which has some scripts that should go through the entire demo for the inliner-for-size case and you can use those for reference. They use the docker image checked into the repository. There were some issues when I last worked on that PR, but they might be resolved at this point.

@xc303919323
Copy link
Author

Thanks, I'm using LLVM 15 and newest mlgo code to success compile.

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

3 participants