Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

/usr/bin/ld fail when build #18170

Closed
chinakook opened this issue Apr 26, 2020 · 4 comments · Fixed by #18761
Closed

/usr/bin/ld fail when build #18170

chinakook opened this issue Apr 26, 2020 · 4 comments · Fixed by #18761
Labels

Comments

@chinakook
Copy link
Contributor

chinakook commented Apr 26, 2020

Description

build mxnet master in ubuntu with build.sh

Error Message

/usr/bin/ld: build/src/operator/tensor/elemwise_binary_broadcast_op_basic_gpu.o: in function void mxnet::op::BinaryBroadcastComputeSparseEx<mshadow::gpu, mxnet::op::mshadow_op::div>(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&)': tmpxft_000410b3_00000000-5_elemwise_binary_broadcast_op_basic.cudafe1.cpp:(.text._ZN5mxnet2op30BinaryBroadcastComputeSparseExIN7mshadow3gpuENS0_10mshadow_op3divEEEvRKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_7NDArrayESaISE_EERKSD_INS_9OpReqTypeESaISJ_EESI_[_ZN5mxnet2op30BinaryBroadcastComputeSparseExIN7mshadow3gpuENS0_10mshadow_op3divEEEvRKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_7NDArrayESaISE_EERKSD_INS_9OpReqTypeESaISJ_EESI_]+0x48a): undefined reference to void mxnet::op::ElemwiseBinaryOp::DnsCsrCsrOp<mshadow::gpu, mxnet::op::mshadow_op::mul>(nnvm::NodeAttrs const&, mxnet::OpContext const&, mxnet::NDArray const&, mxnet::NDArray const&, mxnet::OpReqType, mxnet::NDArray const&, bool)'
/usr/bin/ld: build/src/operator/tensor/elemwise_binary_broadcast_op_basic_gpu.o: in function void mxnet::op::BinaryBroadcastComputeSparseEx<mshadow::gpu, mxnet::op::mshadow_op::mul>(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&)': tmpxft_000410b3_00000000-5_elemwise_binary_broadcast_op_basic.cudafe1.cpp:(.text._ZN5mxnet2op30BinaryBroadcastComputeSparseExIN7mshadow3gpuENS0_10mshadow_op3mulEEEvRKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_7NDArrayESaISE_EERKSD_INS_9OpReqTypeESaISJ_EESI_[_ZN5mxnet2op30BinaryBroadcastComputeSparseExIN7mshadow3gpuENS0_10mshadow_op3mulEEEvRKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_7NDArrayESaISE_EERKSD_INS_9OpReqTypeESaISJ_EESI_]+0x3c2): undefined reference to void mxnet::op::ElemwiseBinaryOp::DnsCsrCsrOp<mshadow::gpu, mxnet::op::mshadow_op::mul>(nnvm::NodeAttrs const&, mxnet::OpContext const&, mxnet::NDArray const&, mxnet::NDArray const&, mxnet::OpReqType, mxnet::NDArray const&, bool)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:645: bin/im2rec] Error 1

To Reproduce

(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

What have you tried to solve it?

Environment

We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:

curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python

# paste outputs here
@chinakook chinakook added the Bug label Apr 26, 2020
@chinakook
Copy link
Contributor Author

chinakook commented Apr 26, 2020

I'm sure it's cased by
#17767

@ptrendx
Copy link
Member

ptrendx commented Apr 28, 2020

Are you sure you have a clean build environment? When developing that PR I did see that there are some problems with dependency tracking for some of the files touched by it (not caused by the PR) and I had to do a clean build to see all the changes made. Maybe it is a manifestation of the same problem?

@chinakook
Copy link
Contributor Author

I'll try again.

@chinakook
Copy link
Contributor Author

@ptrendx Thank for your reply. It's solved by using right version of gfortran in Ubuntu 20.04.

chinakook added a commit to chinakook/mxnet that referenced this issue Jul 20, 2020
szha pushed a commit that referenced this issue Oct 25, 2020
mseth10 added a commit to mseth10/incubator-mxnet that referenced this issue Apr 26, 2021
mseth10 added a commit that referenced this issue Apr 27, 2021
* Update elemwise_binary_broadcast_op_basic.cu (#18761)

This fix #18170
refer to the fix: #18357

* Fix undef symbol mxnet::op::ElemwiseBinaryOp::DnsCsrCsrOp (#18357)

Co-authored-by: Balint Cristian <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants