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

[Bug] Build failed with undefined references to 'std::__throw_bad_array_new_length()' follow #17591

Open
Zoeeeeey opened this issue Jan 14, 2025 · 1 comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@Zoeeeeey
Copy link

Zoeeeeey commented Jan 14, 2025

Expected behavior

Build tvm-0.18.0 from source.

Actual behavior

Hi, I follow this document (https://tvm.apache.org/docs/install/from_source.html) to install tvm 0.18.0 from source.

Everything was fine until I ran the command:
cmake .. && cmake --build . --parallel $(nproc).

Here is the error I encountered:

/usr/bin/ld: /root/miniconda3/envs/tvm-build-venv/lib/libLLVMipo.a(SampleContextTracker.cpp.o):SampleContextTracker.cpp:(.text._ZN4llvm20SampleContextTracker17getBaseSamplesForENS_10sampleprof10FunctionIdEb+0x3c5): more undefined references to `std::__throw_bad_array_new_length()' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/tvm.dir/build.make:2035: libtvm.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:205: CMakeFiles/tvm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target tvm_allvisible
make: *** [Makefile:136: all] Error 2

Then, I searched for solutions on Github. This solution (mlc-ai/mlc-llm#1683) worked.

The solution required me to execute conda deactivate tvm-build-venv to exit the conda environment with the build dependency.

In the base environment, I was able to successfully build tvm without encountering the same error.

I do not understand the role of the created build environment in this, at least during the installation of tvm-0.18.0.

Does the document (https://tvm.apache.org/docs/install/from_source.html) need to be updated again? Or if there are some issues that need fixing.

Thank you for your time and reply.

Environment

Ubuntu 20.04

cmake version 3.24.2
clang version 15.0.4
make version 4.2.1
gcc version 9.4.0
g++ version 9.4.0

Triage

Please refer to the list of label tags here to find the relevant tags and add them below in a bullet format (example below).

  • backend: llvm
@Zoeeeeey Zoeeeeey added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Jan 14, 2025
@WGX11
Copy link

WGX11 commented Jan 17, 2025

I encountered the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

2 participants