microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.5k stars 4.29k forks source link

Error when trying to build CNTK #1213

Closed M12Shehab closed 7 years ago

M12Shehab commented 7 years ago

Dear All

I got this error when I am trying to build CNTK after I download : https://github.com/Microsoft/CNTK

can anyone help me to solve it? many thanks in advance


Error 4 error MSB3073: The command "c:\local\protobuf-3.1.0\bin\protoc --proto_path=F:\Projects\Researches\Deep learing\CNTK-master\Source\CNTKv2LibraryDll\proto\ --cpp_out=F:\Projects\Researches\Deep learing\CNTK-master\Source\CNTKv2LibraryDll\proto\ F:\Projects\Researches\Deep learing\CNTK-master\Source\CNTKv2LibraryDll\proto\CNTK.proto :VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 202 5 CNTKv2LibraryDll

lahiruts commented 7 years ago

I encountered the same error when building in Linux.

_creating .build/Source/CNTKv2LibraryDll/proto/CNTK.pb.o for Linux with build type release mpic++ -c Source/CNTKv2LibraryDll/proto/CNTK.pb.cc -o .build/Source/CNTKv2LibraryDll/proto/CNTK.pb.o -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -std=c++11 -DUSE_CUDNN -DUSE_MKL -DNDEBUG -DNO_SYNC -DKALDI_DOUBLEPRECISION=0 -DHAVE_POSIX_MEMALIGN -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_ATLAS -DHAVE_OPENFST_GE_10400 -DUSE_ZIP -msse4.1 -mssse3 -std=c++0x -fopenmp -fpermissive -fPIC -Werror -fcheck-new -Wno-error=literal-suffix -g -O4 -ISource/Common/Include -ISource/CNTKv2LibraryDll -ISource/CNTKv2LibraryDll/API -ISource/CNTKv2LibraryDll/proto -ISource/Math -ISource/CNTK -ISource/ActionsLib -ISource/ComputationNetworkLib -ISource/SGDLib -ISource/SequenceTrainingLib -ISource/CNTK/BrainScript -ISource/Readers/ReaderLib -I/home/local/protobuf-3.1.0/include -I/usr/include/nvidia/gdk -I/home/local/cub-1.4.1 -I/usr/local/cuda-8.0/include -I/home/local/cudnn-5.1/cuda/include -I/home/local/CNTKCustomMKL/2/include -I/home/lahiruts/Devinstall/kaldi/src -I/home/lahiruts/Devinstall/kaldi/tools/ATLAS/include -I/home/lahiruts/Devinstall/kaldi/tools/openfst/include -ITests/UnitTests/V2LibraryTests -I/usr/include -I/home/local/libzip-1.1.2/include -I/home/local/libzip-1.1.2/lib/libzip/include -I/home/local/opencv-3.1.0/include -I/usr/include -ISource/Readers/CNTKTextFormatReader -MD -MP -MF .build/Source/CNTKv2LibraryDll/proto/CNTK.pb.d In file included from Source/Readers/ImageReader/ImageDataDeserializer.h:12:0, from Source/Readers/ImageReader/Exports.cpp:14: Source/Readers/ReaderLib/CorpusDescriptor.h: In lambda function: Source/Readers/ReaderLib/CorpusDescriptor.h:43:59: error: expected ‘)’ before ‘PRIu64’ int converted = sscanf_s(key.c_str(), "%" PRIu64, &id); ^ In file included from Source/Readers/ImageReader/ImageDataDeserializer.h:12:0, from Source/Readers/ImageReader/ImageReader.cpp:13: Source/Readers/ReaderLib/CorpusDescriptor.h: In lambda function: Source/Readers/ReaderLib/CorpusDescriptor.h:43:59: error: expected ‘)’ before ‘PRIu64’ int converted = sscanf_s(key.c_str(), "%" PRIu64, &id); ^ make: [.build/Source/Readers/ImageReader/Exports.o] Error 1 make: Waiting for unfinished jobs.... make: [.build/Source/Readers/ImageReader/ImageReader.o] Error 1 Source/../Tests/UnitTests/BrainScriptTests/ComputationNetworkTests.cpp: In function ‘void Microsoft::MSR::CNTK::Test::ComputationNetworkSuite::compareNetworks(const wstring&)’: Source/../Tests/UnitTests/BrainScriptTests/ComputationNetworkTests.cpp:53:50: error: ‘per_element’ is not a member of ‘boost::test_tools’ BOOST_TEST(actualNetwork == expectedNetwork, boost::test_tools::per_element()); ^ Source/../Tests/UnitTests/BrainScriptTests/ComputationNetworkTests.cpp:53:82: error: ‘BOOST_TEST’ was not declared in this scope BOOST_TEST(actualNetwork == expectedNetwork, boost::test_tools::per_element()); ^ Source/../Tests/UnitTests/BrainScriptTests/ParserTests.cpp: In function ‘void Microsoft::MSR::CNTK::Test::ParserSuite::parseLine(std::wstring, std::wstring)’: Source/../Tests/UnitTests/BrainScriptTests/ParserTests.cpp:56:48: error: ‘per_element’ is not a member of ‘boost::test_tools’ BOOST_TEST(actualOutput == expectedOutput, boost::test_tools::per_element()); ^ Source/../Tests/UnitTests/BrainScriptTests/ParserTests.cpp:56:80: error: ‘BOOST_TEST’ was not declared in this scope BOOST_TEST(actualOutput == expectedOutput, boost::test_tools::per_element()); ^ make: [.build/Source/../Tests/UnitTests/BrainScriptTests/ParserTests.o] Error 1 make: *** [.build/Source/../Tests/UnitTests/BrainScriptTests/ComputationNetworkTests.o] Error 1_

M12Shehab commented 7 years ago

and do you find any solution for this problem?

eldakms commented 7 years ago

Hi M12Shehab, lahiruts,

the second error (BOOST one) it seems due to a wrong version of boost. CNTK requires 1.60, please have a look here: https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Linux#boost-library

the first one - it seems Protobuf is no installed correctly (https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Windows#protobuf) Do you have Protobuf installed in the c:\local\protobuf-3.1.0? What does it report if you run this manually in the command line

c:\local\protobuf-3.1.0\bin\protoc --proto_path=F:\Projects\Researches\Deep learing\CNTK-master\Source\CNTKv2LibraryDll\proto\ --cpp_out=F:\Projects\Researches\Deep learing\CNTK-master\Source\CNTKv2LibraryDll\proto\ F:\Projects\Researches\Deep learing\CNTK-master\Source\CNTKv2LibraryDll\proto\CNTK.proto

Thank you!

M12Shehab commented 7 years ago

git it is work for windows.

many thanks for your help @eldakms 👍

eldakms commented 7 years ago

Thanks, i'm closing the issue then.