Error compiling latest linux-gcc commit e14fd3616ea7

Jan 29, 2015 at 10:47 PM
I see that the timing functions have changed, probably for compatibility between Windows and linux timing. This is a good idea but when compiling the link of cn.exe I now get an error undefined reference to Microsoft::MSR::CNTK::Timer::MilliSecondElapsed()' :

building output for x86_64 with build type release ...
g++ -O4 -o bin/x86_64.cpu.release.mkl/cn.exe .build/x86_64.cpu.release.mkl/MachineLearning/cn/NetworkDescriptionLanguage.o .build/x86_64.cpu.release.mkl/MachineLearning/cn/cn.o .build/x86_64.cpu.release.mkl/MachineLearning/cn/ComputationNode.o .build/x86_64.cpu.release.mkl/MachineLearning/cn/ModelEditLanguage.o .build/x86_64.cpu.release.mkl/MachineLearning/cn/PTaskGraphBuilder.o .build/x86_64.cpu.release.mkl/MachineLearning/cn/SimpleNetworkBuilder.o .build/x86_64.cpu.release.mkl/MachineLearning/cn/tests.o .build/x86_64.cpu.release.mkl/MachineLearning/CNTKEval/CNTKEval.o .build/x86_64.cpu.release.mkl/Math/Math/Matrix.o .build/x86_64.cpu.release.mkl/Math/Math/CPUMatrix.o .build/x86_64.cpu.release.mkl/Math/Math/CPUSparseMatrix.o .build/x86_64.cpu.release.mkl/Math/Math/NoGPU.o .build/x86_64.cpu.release.mkl/Common/fileutil.o .build/x86_64.cpu.release.mkl/Common/DataWriter.o .build/x86_64.cpu.release.mkl/Common/ConfigFile.o .build/x86_64.cpu.release.mkl/Common/DataReader.o .build/x86_64.cpu.release.mkl/Common/Eval.o .build/x86_64.cpu.release.mkl/Common/File.o .build/x86_64.cpu.release.mkl/Common/BestGpu.o -L/opt/intel/composer_xe_2015.1.133/compiler/lib/intel64 -L/opt/intel/composer_xe_2015.1.133/mkl/lib/intel64 -L/opt/intel/composer_xe_2015.1.133/compiler/lib/mic -L/opt/intel/composer_xe_2015.1.133/mkl/lib/mic -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lm -liomp5 -lpthread -fopenmp -ldl
.build/x86_64.cpu.release.mkl/MachineLearning/cn/cn.o: In function
Microsoft::MSR::CNTK::SGD<float>::TrainOneEpoch(Microsoft::MSR::CNTK::ComputationNetwork<float>&, Microsoft::MSR::CNTK::ComputationNetwork<float>&, Microsoft::MSR::CNTK::ComputationNode<float>, int, unsigned long, Microsoft::MSR::CNTK::IDataReader<float>, float, std::vector<Microsoft::MSR::CNTK::ComputationNode<float>, std::allocator<Microsoft::MSR::CNTK::ComputationNode<float>> > const&, std::vector<Microsoft::MSR::CNTK::ComputationNode<float>, std::allocator<Microsoft::MSR::CNTK::ComputationNode<float>> > const&, std::vector<Microsoft::MSR::CNTK::ComputationNode<float>, std::allocator<Microsoft::MSR::CNTK::ComputationNode<float>> > const&, std::vector<Microsoft::MSR::CNTK::ComputationNode<float>, std::allocator<Microsoft::MSR::CNTK::ComputationNode<float>> > const&, std::map<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, Microsoft::MSR::CNTK::Matrix<float>, std::less<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, std::allocator<std::pair<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const, Microsoft::MSR::CNTK::Matrix<float>> > >&, std::list<Microsoft::MSR::CNTK::ComputationNode<float>, std::allocator<Microsoft::MSR::CNTK::ComputationNode<float>> > const&, std::list<Microsoft::MSR::CNTK::Matrix<float>, std::allocator<Microsoft::MSR::CNTK::Matrix<float> > >&, float&, std::vector<float, std::allocator<float> >&, unsigned long&)':
cn.cpp:(.text._ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm[_ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm]+0x263): undefined reference to Microsoft::MSR::CNTK::Timer::MilliSecondElapsed()'
cn.cpp:(.text._ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm[_ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm]+0x39a): undefined reference to
Microsoft::MSR::CNTK::Timer::MilliSecondElapsed()'
cn.cpp:(.text._ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm[_ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm]+0x3a4): undefined reference to Microsoft::MSR::CNTK::Timer::MilliSecondElapsed()'
cn.cpp:(.text._ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm[_ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm]+0x6bc): undefined reference to
Microsoft::MSR::CNTK::Timer::MilliSecondElapsed()'
cn.cpp:(.text._ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm[_ZN9Microsoft3MSR4CNTK3SGDIfE13TrainOneEpochERNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEimPNS1_11IDataReaderIfEEfRKSt6vectorIS9_SaIS9_EESH_SH_SH_RSt3mapISbIwSt11char_traitsIwESaIwEEPNS1_6MatrixIfEESt4lessISM_ESaISt4pairIKSM_SP_EEERKSt4listIS9_SE_ERSY_ISO_SaISO_EERfRSD_IfSaIfEERm]+0x9b3): undefined reference to Microsoft::MSR::CNTK::Timer::MilliSecondElapsed()'
.build/x86_64.cpu.release.mkl/MachineLearning/cn/cn.o:cn.cpp:(.text._ZN9Microsoft3MSR4CNTK3SGDIfE17TrainOrAdaptModelEiRNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEPNS1_11IDataReaderIfEESC_[_ZN9Microsoft3MSR4CNTK3SGDIfE17TrainOrAdaptModelEiRNS1_18ComputationNetworkIfEES6_PNS1_15ComputationNodeIfEEPNS1_11IDataReaderIfEESC_]+0x9b1): more undefined references to
Microsoft::MSR::CNTK::Timer::MilliSecondElapsed()' follow
collect2: error: ld returned 1 exit status
make: *** [bin/x86_64.cpu.release.mkl/cn.exe] Error 1
Richard
Jan 29, 2015 at 11:07 PM
Sorry for premature error -- I was using the wrong Makefile. It compiles OK after all.
 Richard
Marked as answer by rbhodges on 1/29/2015 at 4:07 PM