Arm Compute Library build problems
I encountered a couple of problems while trying to build the latest version of the library on Cygwin64 Terminal I'm running the following command : scons.bat Werror=1 -j8 debug=1 asserts=1 neon=1 opencl=0 embed_kernels=0 os=android arch=arm64-v8a The first problem was in sconscript - at line 164 : except (OSError, subbprocess.CalledProcessError): it should be subprocess (with 1 'b') instead of subbprocess
After fixing that, the build process started, but after a while it was aborted with the following error : sh: -c: line 0: unexpected EOF while looking for matching `"' sh: -c: line 1: syntax error: unexpected end of file scons: *** [build\arm_compute\libarm_compute-static.a] Error 1 scons: building terminated because of errors. Can you please help with this problem ?
We will fix the spelling mistake in the next release. Thanks for reporting that. I just tried to build the library with Cygwin but I couldn't reproduce the second issue. I had to build for 32 bit because I currently don't have the 64 bit toolchain. Could you try if you get the same problem for 32 bit? But anyway, the errors seems strange as scons shouldn't invoke shell scripts (to my knowledge). Could you provide more details?
Please find full output below One more detail that I can give is the following : "build" creates for source files an .o and an .os file; this is the case for all source files except in folder ComputeLibrary-master\build\arm_compute\src\runtime\NEON\functions, where both .o and .os files were created for NEAbsoluteDifference, but for all other files in this folder, only .o files were created. I hope this will help you identifying the problem.
scons.bat Werror=1 -j1 debug=1 asserts=1 neon=1 opencl=0 embed_kernels=0 os=android arch=arm 64-v8a
scons: Reading SConscript files ...
fatal: Not a git repository (or any of the parent directories): .git
scons: done reading SConscript files.
scons: Building targets ...
scons: build\arm_compute\libarm_compute_core-static.a' is up to date.
scons: build\arm_compute\libarm_compute_core.so' is up to date.
aarch64-linux-android-ar rc build\arm_compute\libarm_compute-static.a build\arm_compute\src\co re\AccessWindowAutoPadding.o build\arm_compute\src\core\AccessWindowStatic.o build\arm_compute \src\core\AccessWindowTranspose.o build\arm_compute\src\core\Error.o build\arm_compute\src\cor e\HOGInfo.o build\arm_compute\src\core\Helpers.o build\arm_compute\src\core\IAccessWindow.o bu ild\arm_compute\src\core\IDistribution.o build\arm_compute\src\core\IDistribution1D.o build\ar m_compute\src\core\IKernel.o build\arm_compute\src\core\ITensor.o build\arm_compute\src\core\M ultiImageInfo.o build\arm_compute\src\core\PyramidInfo.o build\arm_compute\src\core\TensorInfo .o build\arm_compute\src\core\Utils.o build\arm_compute\src\core\Validate.o build\arm_compute\ src\core\CPP\ICPPSimpleKernel.o build\arm_compute\src\core\CPP\kernels\CPPCornerCandidatesKern el.o build\arm_compute\src\core\CPP\kernels\CPPSortEuclideanDistanceKernel.o build\arm_compute \src\core\NEON\kernels\NEAbsoluteDifferenceKernel.o build\arm_compute\src\core\NEON\kernels\NE AccumulateKernel.o build\arm_compute\src\core\NEON\kernels\NEActivationLayerKernel.o build\arm compute\src\core\NEON\kernels\NEArithmeticAdditionKernel.o build\arm_compute\src\core\NEON\ke rnels\NEArithmeticSubtractionKernel.o build\arm_compute\src\core\NEON\kernels\NEBitwiseAndKern el.o build\arm_compute\src\core\NEON\kernels\NEBitwiseNotKernel.o build\arm_compute\src\core\N EON\kernels\NEBitwiseOrKernel.o build\arm_compute\src\core\NEON\kernels\NEBitwiseXorKernel.o b uild\arm_compute\src\core\NEON\kernels\NEBox3x3Kernel.o build\arm_compute\src\core\NEON\kernel s\NECannyEdgeKernel.o build\arm_compute\src\core\NEON\kernels\NEChannelCombineKernel.o build\a rm_compute\src\core\NEON\kernels\NEChannelExtractKernel.o build\arm_compute\src\core\NEON\kern els\NECol2ImKernel.o build\arm_compute\src\core\NEON\kernels\NEColorConvertKernel.o build\arm compute\src\core\NEON\kernels\NEConvolutionKernel.o build\arm_compute\src\core\NEON\kernels\NE ConvolutionLayerWeightsReshapeKernel.o build\arm_compute\src\core\NEON\kernels\NECumulativeDis tributionKernel.o build\arm_compute\src\core\NEON\kernels\NEDepthConvertKernel.o build\arm_com pute\src\core\NEON\kernels\NEDerivativeKernel.o build\arm_compute\src\core\NEON\kernels\NEDila teKernel.o build\arm_compute\src\core\NEON\kernels\NEErodeKernel.o build\arm_compute\src\core\ NEON\kernels\NEFastCornersKernel.o build\arm_compute\src\core\NEON\kernels\NEFillArrayKernel.o build\arm_compute\src\core\NEON\kernels\NEFillBorderKernel.o build\arm_compute\src\core\NEON\ kernels\NEFillInnerBorderKernel.o build\arm_compute\src\core\NEON\kernels\NEGEMMInterleave4x4K ernel.o build\arm_compute\src\core\NEON\kernels\NEGEMMLowpMatrixMultiplyKernel.o build\arm_com pute\src\core\NEON\kernels\NEGEMMMatrixAccumulateBiasesKernel.o build\arm_compute\src\core\NEO N\kernels\NEGEMMMatrixAdditionKernel.o build\arm_compute\src\core\NEON\kernels\NEGEMMMatrixMul tiplyKernel.o build\arm_compute\src\core\NEON\kernels\NEGEMMTranspose1xWKernel.o build\arm_com pute\src\core\NEON\kernels\NEGaussian3x3Kernel.o build\arm_compute\src\core\NEON\kernels\NEGau ssian5x5Kernel.o build\arm_compute\src\core\NEON\kernels\NEGaussianPyramidKernel.o build\arm_c ompute\src\core\NEON\kernels\NEHOGDescriptorKernel.o build\arm_compute\src\core\NEON\kernels\N EHOGDetectorKernel.o build\arm_compute\src\core\NEON\kernels\NEHOGNonMaximaSuppressionKernel.o build\arm_compute\src\core\NEON\kernels\NEHarrisCornersKernel.o build\arm_compute\src\core\NE ON\kernels\NEHistogramKernel.o build\arm_compute\src\core\NEON\kernels\NEIm2ColKernel.o build\ arm_compute\src\core\NEON\kernels\NEIntegralImageKernel.o build\arm_compute\src\core\NEON\kern els\NELKTrackerKernel.o build\arm_compute\src\core\NEON\kernels\NEMagnitudePhaseKernel.o build \arm_compute\src\core\NEON\kernels\NEMeanStdDevKernel.o build\arm_compute\src\core\NEON\kernel s\NEMedian3x3Kernel.o build\arm_compute\src\core\NEON\kernels\NEMinMaxLocationKernel.o build\a rm_compute\src\core\NEON\kernels\NENonLinearFilterKernel.o build\arm_compute\src\core\NEON\ker nels\NENonMaximaSuppression3x3Kernel.o build\arm_compute\src\core\NEON\kernels\NENormalization LayerKernel.o build\arm_compute\src\core\NEON\kernels\NEPixelWiseMultiplicationKernel.o build\ arm_compute\src\core\NEON\kernels\NEPoolingLayerKernel.o build\arm_compute\src\core\NEON\kerne ls\NERemapKernel.o build\arm_compute\src\core\NEON\kernels\NEScaleKernel.o build\arm_compute\s rc\core\NEON\kernels\NEScharr3x3Kernel.o build\arm_compute\src\core\NEON\kernels\NESobel3x3Ker nel.o build\arm_compute\src\core\NEON\kernels\NESobel5x5Kernel.o build\arm_compute\src\core\NE ON\kernels\NESobel7x7Kernel.o build\arm_compute\src\core\NEON\kernels\NESoftmaxLayerKernel.o b uild\arm_compute\src\core\NEON\kernels\NETableLookupKernel.o build\arm_compute\src\core\NEON\k ernels\NEThresholdKernel.o build\arm_compute\src\core\NEON\kernels\NETransposeKernel.o build\a rm_compute\src\core\NEON\kernels\NEWarpKernel.o build\arm_compute\src\runtime\Distribution1D.o build\arm_compute\src\runtime\HOG.o build\arm_compute\src\runtime\ILutAllocator.o build\arm_c ompute\src\runtime\ITensorAllocator.o build\arm_compute\src\runtime\Lut.o build\arm_compute\sr c\runtime\LutAllocator.o build\arm_compute\src\runtime\MultiHOG.o build\arm_compute\src\runtim e\MultiImage.o build\arm_compute\src\runtime\Pyramid.o build\arm_compute\src\runtime\Tensor.o build\arm_compute\src\runtime\TensorAllocator.o build\arm_compute\src\runtime\CPP\CPPScheduler .o build\arm_compute\src\runtime\NEON\INESimpleFunction.o build\arm_compute\src\runtime\NEON\f unctions\NEAbsoluteDifference.o build\arm_compute\src\runtime\NEON\functions\NEAccumulate.o bu ild\arm_compute\src\runtime\NEON\functions\NEActivationLayer.o build\arm_compute\src\runtime\N EON\functions\NEArithmeticAddition.o build\arm_compute\src\runtime\NEON\functions\NEArithmetic Subtraction.o build\arm_compute\src\runtime\NEON\functions\NEBitwiseAnd.o build\arm_compute\sr c\runtime\NEON\functions\NEBitwiseNot.o build\arm_compute\src\runtime\NEON\functions\NEBitwise Or.o build\arm_compute\src\runtime\NEON\functions\NEBitwiseXor.o build\arm_compute\src\runtime \NEON\functions\NEBox3x3.o build\arm_compute\src\runtime\NEON\functions\NECannyEdge.o build\ar m_compute\src\runtime\NEON\functions\NEChannelCombine.o build\arm_compute\src\runtime\NEON\fun ctions\NEChannelExtract.o build\arm_compute\src\runtime\NEON\functions\NEColorConvert.o build\ arm_compute\src\runtime\NEON\functions\NEConvolution.o build\arm_compute\src\runtime\NEON\func tions\NEConvolutionLayer.o build\arm_compute\src\runtime\NEON\functions\NEDepthConvert.o build \arm_compute\src\runtime\NEON\functions\NEDerivative.o build\arm_compute\src\runtime\NEON\func tions\NEDilate.o build\arm_compute\src\runtime\NEON\functions\NEEqualizeHistogram.o build\arm_ compute\src\runtime\NEON\functions\NEErode.o build\arm_compute\src\runtime\NEON\functions\NEFa stCorners.o build\arm_compute\src\runtime\NEON\functions\NEFillBorder.o build\arm_compute\src\ runtime\NEON\functions\NEFullyConnectedLayer.o build\arm_compute\src\runtime\NEON\functions\NE GEMM.o build\arm_compute\src\runtime\NEON\functions\NEGEMMInterleave4x4.o build\arm_compute\sr c\runtime\NEON\functions\NEGEMMLowp.o build\arm_compute\src\runtime\NEON\functions\NEGEMMTrans pose1xW.o build\arm_compute\src\runtime\NEON\functions\NEGaussian3x3.o build\arm_compute\src\r untime\NEON\functions\NEGaussian5x5.o build\arm_compute\src\runtime\NEON\functions\NEGaussianP yramid.o build\arm_compute\src\runtime\NEON\functions\NEHOGDescriptor.o build\arm_compute\src\ runtime\NEON\functions\NEHOGDetector.o build\arm_compute\src\runtime\NEON\functions\NEHOGGradi ent.o build\arm_compute\src\runtime\NEON\functions\NEHOGMultiDetection.o build\arm_compute\src \runtime\NEON\functions\NEHarrisCorners.o build\arm_compute\src\runtime\NEON\functions\NEHisto gram.o build\arm_compute\src\runtime\NEON\functions\NEIntegralImage.o build\arm_compute\src\ru ntime\NEON\functions\NELaplacianPyramid.o build\arm_compute\src\runtime\NEON\functions\NELapla cianReconstruct.o build\arm_compute\src\runtime\NEON\functions\NEMagnitude.o build\arm_compute \src\runtime\NEON\functions\NEMeanStdDev.o build\arm_compute\src\runtime\NEON\functions\NEMedi an3x3.o build\arm_compute\src\runtime\NEON\functions\NEMinMaxLocation.o build\arm_compute\src\ runtime\NEON\functions\NENonLinearFilter.o build\arm_compute\src\runtime\NEON\functions\NENonM aximaSuppression3x3.o build\arm_compute\src\runtime\NEON\functions\NENormalizationLayer.o buil d\arm_compute\src\runtime\NEON\functions\NEOpticalFlow.o build\arm_compute\src\runtime\NEON\fu nctions\NEPhase.o build\arm_compute\src\runtime\NEON\functions\NEPixelWiseMultiplication.o bui ld\arm_compute\src\runtime\NEON\functions\NEPoolingLayer.o build\arm_compute\src\runtime\NEON\ functions\NERemap.o build\arm_compute\src\runtime\NEON\functions\NEScale.o build\arm_compute\s rc\runtime\NEON\functions\NEScharr3x3.o build\arm_compute\src\runtime\NEON\functions\NESobel3x 3.o build\arm_compute\src\runtime\NEON\functions\NESobel5x5.o build\arm_compute\src\runtime\NE ON\functions\NESobel7x7.o build\arm_compute\src\runtime\NEON\functions\NESoftmaxLayer.o build\ arm_compute\src\runtime\NEON\functions\NETableLookup.o build\arm_compute\src\runtime\NEON\func tions\NEThreshold.o build\arm_compute\src\runtime\NEON\functions\NETranspose.o build\arm_compu te\src\runtime\NEON\functions\NEWarpAffine.o build\arm_compute\src\runtime\NEON\functions\NEWa rpPerspective.o
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file
scons: *** [build\arm_compute\libarm_compute-static.a] Error 1
scons: building terminated because of errors.
Sorry for bothering, but your issue seems to be also related to what we were recently solving with @psyhtest when adding ARM Compute Library as a Collective Knowledge package with JSON API ( we need it to enable collaborative benchmarking). We actually provided support to build ACL on native Windows targeting Android (besides Linux of course). OpenCL is not yet supported, but your case should be fine. If it will be of interest you can try it as following (I assume you have pip in your Windows python):
pip install ck ck pull repo:ck-math ck install package:lib-acl-master-universal --target_os=android21-arm64 --env.USE_NEON=ON
And if you have Android device connected via adb to your Windows machine, you can test installation using simple SGEMM test:
ck compile program:acl-sgemm-neon-example --target_os=android21-arm64 ck run program:acl-sgemm-neon-example --target_os=android21-arm64
But if it's not of interest, I would like to apologize again for bothering ...
Hi, What is of interest for me is to successfully build the library and linking it to our own program. Do you mean that I can no longer build the library the way I did with the previous version, by running (in Cygwin64 Terminal) the command line below ? scons.bat Werror=1 -j1 debug=1 asserts=1 neon=1 opencl=0 embed_kernels=0 os=android arch=arm 64-v8a Or what should be done to make that possible again ?
If I follow the instructions you gave me in your answer, will it solve the Build problem ? I actually started with the "pip install ck" and ran into some problem : ImportError: cannot import name HashMissing - do you know what is the problem ?
We converted scons script to CK package manager format (with JSON API to be able to integrate it with higher-level experimental workflows), so normally you should not see this issue when running on Windows (however I need to add vars debug assert and Werror - just didn't have time to do that). As for your first question: yes, you can use ck install package:{something} instead of scons.bat As for your second problem - I never encountered it before, but googling it looks like you have a conflict of virtualenv with Python 2.7, i.e. it's not related to CK. But in such cases you can use CK even without installing it via pip (see below)...
@joel-mi Just to clarify, you will still be able to use the scons scripts as usual. The CK package just provides a second (non official) way of building the library.
We will be looking into the issue with the SConscript. Would it be possible for you to double check that version 17.04 indeed still builds for you and the issue only occurs when using version 17.05?
@mpflanzer - yes, that's right, thanks for clarification! CK is just a non-intrusive (independent) wrapper on top of existing libraries and tools to provide a common JSON API for installation. It is needed for our open performance tuning infrastructure: http://schedule.armtechcon.com/session/know-your-workloads-design-more-efficient-systems ...
@joel-mi - just last thing and I will stop spamming here. You do not need to install CK via pip to install packages (it's required only if you need to access CK from python or ipython notebooks directly). You can just clone CK from github and run it directly: $ git clone https://github.com/ctuning/ck ck-client $ set PATH={CURRENT PATH}\ck-client\bin;%PATH% $ ck pull repo:ck-math ...
@mpflanzer - Before downloading version 17.05, I was actually working with v17.03.1 I've just run the command line below from Cygwin64 Terminal for this version and build was successful : scons.bat Werror=1 -j8 debug=1 asserts=1 neon=1 opencl=0 embed_kernels=0 os=android arch=arm64-v8a But this doesn't work with v17.05 (see full build output above in this thread) Do you want me to check if this build command works with v17.04 ? What actually prompted me to upgrade to latest version was the problem I encountered when trying to configure NEFullyConnectedLayer - see open issue #95 (BTW, there still is an unanswered question there)
Thanks for confirming. No, you don't have to test with 17.04 as well. I just wanted to be sure that there was no unintentional change in the environment before digging deeper into the issue. We will try to reproduce the issue.
I can't reproduce the issue. Running your command builds everything without problems for me. Which version of scons are you using? Have you installed scons via Cygwin? Just wondering because I usually just type scons in Cygwin instead of using a scons.bat script.
I'm using version 2.5.1 of scons, I don't remember for sure if I installed it via Cygwin but probably not.
Did you notice the error message at the end of build output ? sh: -c: line 0: unexpected EOF while looking for matching `"' sh: -c: line 1: syntax error: unexpected end of file I'm trying to find out file this message relates to - do you have some clue on that ?
Did you try using scons instead of scons.bat so far we can't reproduce the error on our end: everything builds fine using Cygwin.
Try to delete the build folder too as Cygwin seems to be doing some weird things for incremental builds in some cases
using scons instead of scons.bat seems to require installing scons as a package when installing Cygwin That's what I did but I couldn't proceed with the build - I would get an error message saying : cygwin: died waiting for dll loading, errno 11 (I think a forking issue was mentioned). At this point I reverted to my first approach - using scons.bat I noticed that the failure occurs while executing command : aarch64-linux-android-ar rc build\arm_compute\libarm_compute-static.a, with that long list of *.o files (error message says : sh: -c: line 0: unexpected EOF while looking for matching `"', followed by : sh: -c: line 1: syntax error: unexpected end of file)
I then tried the following :
- copied that command to a text editor
- replaced all instances of \ with /
- ran the edited command from Cygwin64 Terminal And I didn't get any error message - moreover, a libarm_compute-static.a file was actually generated Can this help you identifying the problem ? In the meantime, I'm going on with linking the 2 static libraries - libarm_compute_core-static.a and libarm_compute-static.a to my program, but it would certainly be better to be able to build the library without this work-around
Closing this issue as it seems to be solved. Reopen if needed.