NEWPLAN edited a comment on issue #11684: fix compile error in debug model URL: https://github.com/apache/incubator-mxnet/pull/11684#issuecomment-404730258 Hi, My environment: OS: CentOS Linux release 7.3.1611 (Core) GCC: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz DRAM: 64GB 2133MHZ G++: g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) NVCC: Built on Fri_Sep__1_21:08:03_CDT_2017 + Cuda compilation tools, release 9.0, V9.0.176 NCCL: 2.1 CUDA: 9 cuDNN: 7.0 command for compiling: make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 USE_DIST_KVSTORE=1 USE_NCCL=1 USE_CPP_PACKAGE=1 DEBUG=1 there are two errors: 1: src/kvstore/./kvstore_nccl.h:345:28: error: ‘struct mxnet::kvstore::KVStoreNCCL::BufferEntry’ has no member named ‘ctx’ assert(root == buf.ctx().dev_id); When i fixed this error as uncommend and complie again, got the second error: a - build/src/kvstore/kvstore_utils_gpu.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o: In function `_init': (.init+0x7): relocation truncated to fit: R_X86_64_GOTPCREL against undefined symbol `__gmon_start__' /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::NumResponse(int)': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0x5): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::AddResponse(int, int)': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0x7d): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::WaitRequest(int)': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0xfe): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::Receiving()': /home/yang/software/incubator-mxnet/3rdparty/ps-lite/src/customer.cc:49:(.text+0x1d2): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `std::string::_Rep::_S_empty_rep_storage@@GLIBCXX_3.4' defined in .bss section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libstdc++.so /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::Receiving()': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0x2dd): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::Receiving()': /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x46f): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x555): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x61a): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x6ce): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .text section in /lib64/libpthread.so.0 /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::Receiving()': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0x773): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status make: *** [lib/libmxnet.so] Error 1 make: *** Waiting for unfinished jobs.... /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o:(.eh_frame+0x20): relocation truncated to fit: R_X86_64_PC32 against `.text' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o: In function `_init': (.init+0x7): relocation truncated to fit: R_X86_64_GOTPCREL against undefined symbol `__gmon_start__' /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::NumResponse(int)': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0x5): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .plt section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::AddResponse(int, int)': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0x7d): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .plt section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::WaitRequest(int)': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0xfe): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .plt section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::Receiving()': /home/yang/software/incubator-mxnet/3rdparty/ps-lite/src/customer.cc:49:(.text+0x1d2): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `std::string::_Rep::_S_empty_rep_storage@@GLIBCXX_3.4' defined in .bss section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libstdc++.so /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::Receiving()': /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h:747:(.text+0x2dd): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .plt section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /home/yang/software/incubator-mxnet/3rdparty/ps-lite/build/libps.a(customer.o): In function `ps::Customer::Receiving()': /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x46f): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .plt section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x555): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .plt section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x61a): relocation truncated to fit: R_X86_64_GOTPCREL against symbol `__pthread_key_create@@GLIBC_2.2.5' defined in .plt section in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/include/c++/4.8.2/bits/stl_construct.h:102:(.text+0x6ce): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status make: *** [bin/im2rec] Error 1 I find that it is because the default code size can not be large than 2GB, and add compiler flag -mcmodel=large can work
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services