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]: Compiler error in link stage #9838

Closed
1 task done
xlxie opened this issue Oct 13, 2021 · 6 comments
Closed
1 task done

[Bug]: Compiler error in link stage #9838

xlxie opened this issue Oct 13, 2021 · 6 comments
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@xlxie
Copy link

xlxie commented Oct 13, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Error log:

Building Milvus ...
# github.com/milvus-io/milvus/internal/indexnode
internal/indexnode/../core/output/lib/libmilvus_indexbuilder.so: undefined reference to `dgesvd_'
internal/indexnode/../core/output/lib/libmilvus_indexbuilder.so: undefined reference to `dsyev_'
internal/indexnode/../core/output/lib/libmilvus_indexbuilder.so: undefined reference to `sgeqrf_'
internal/indexnode/../core/output/lib/libmilvus_indexbuilder.so: undefined reference to `sorgqr_'
internal/indexnode/../core/output/lib/libmilvus_indexbuilder.so: undefined reference to `sgesvd_'
collect2: error: ld returned 1 exit status
# github.com/milvus-io/milvus/internal/querynode
internal/querynode/../core/output/lib/libmilvus_segcore.so: undefined reference to `sgeqrf_'
internal/querynode/../core/output/lib/libmilvus_segcore.so: undefined reference to `sgesvd_'
internal/querynode/../core/output/lib/libmilvus_segcore.so: undefined reference to `dsyev_'
internal/querynode/../core/output/lib/libmilvus_segcore.so: undefined reference to `dgesvd_'
internal/querynode/../core/output/lib/libmilvus_segcore.so: undefined reference to `sorgqr_'

Expected Behavior

Compile succeeded

Steps To Reproduce

Install the dependencies and run make.

Environment

- Milvus version: 2.0.0-rc7
- Deployment mode(standalone or cluster): NaN
- SDK version(e.g. pymilvus v2.0.0rc2): NaN
- OS(Ubuntu or CentOS): Redhat
- CPU/Memory: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
- GPU: NaN
- Others:

Anything else?

I found that when building libmilvus_segcore.so and libmilvus_indexbuilder.so, compiler flag -llapack is missed. I added it manually and the compiling succeeded.

@xlxie xlxie added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 13, 2021
@xiaofan-luan
Copy link
Collaborator

Thanks xlxie for the issue, can you make a pull request to fix the issue?

@xlxie
Copy link
Author

xlxie commented Oct 13, 2021

Thanks xlxie for the issue, can you make a pull request to fix the issue?

No problem. Please allow me to spend sometime to learn about how to contribute to this project.

@xiaofan-luan
Copy link
Collaborator

Thanks xlxie for the issue, can you make a pull request to fix the issue?

No problem. Please allow me to spend sometime to learn about how to contribute to this project.

See contributing.md, that would help you a lot about DCO and git flow

@yanliang567
Copy link
Contributor

/unassign
/assign @xlxie

@sre-ci-robot sre-ci-robot assigned xlxie and unassigned yanliang567 Oct 14, 2021
@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 14, 2021
@yanliang567 yanliang567 added this to the 2.0-Backlog milestone Oct 14, 2021
@XuanYang-cn
Copy link
Contributor

XuanYang-cn commented Oct 14, 2021

maybe caused by :

Lapack is not included in the openblas library

refs:

facebookresearch/faiss#307

facebookresearch/faiss#15

Hopefully helpful

@xlxie
Copy link
Author

xlxie commented Oct 16, 2021

Thanks xlxie for the issue, can you make a pull request to fix the issue?

No problem. Please allow me to spend sometime to learn about how to contribute to this project.

See contributing.md, that would help you a lot about DCO and git flow

I just found the root cause.

In my build, I use blas + lapack, we need to add -lblas and -llapack whenever we use blas.

In the milvus official build, milvus uses openblas. Openblas includes the functions of both blas and lapack. As such, -lopenblas = -lblas + -llapack.

It is no longer a issue if I use openblas in this build. As such, it is closed.

@xlxie xlxie closed this as completed Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants