I have an error about installation in CGAL in Visual 2012 32bit.
I install Boost and Cmake also configuring and generating a CGAL project successfully.
I rebuild ALL_BUILD, CGAL, Demo, Example.. projects in both Release and Debug, all successed except INSTALL project
I rebuild INSTALL project had problem here:
Error 102 error MSB3073: The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd:cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 134 5 INSTALL
Then, I copy "Hello World" into .cpp file CGAL Project, rebuilded successfully. Iam so excited but when I press Local Window Debug then it said: Unable to start program 'C:(name of project)\bin\Release\CGAL-vc-mt-4.5.dll'
Here CMake said:
The CXX compiler identification is MSVC 17.0.50727.1
The C compiler identification is MSVC 17.0.50727.1
Check for working CXX compiler using: Visual Studio 11 2012
Check for working CXX compiler using: Visual Studio 11 2012 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working C compiler using: Visual Studio 11 2012
Check for working C compiler using: Visual Studio 11 2012 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
== Setting paths ==
Build CGAL from release in directory CGAL-4.5
Packagenames: CGAL-4.5
== Setting paths (DONE) ==
== Generate version files ==
CGAL_MAJOR_VERSION=4
CGAL_MINOR_VERSION=5
CGAL_BUGFIX_VERSION=0
CGAL_SONAME_VERSION=10
CGAL_SOVERSION =10.0.4
CGAL_REFERENCE_CACHE_DIR=
Building shared libraries
Targetting Visual Studio 11 2012
Target build enviroment supports auto-linking
Using VC11 compiler.
Generator uses intermediate configuration directory: $(Configuration)
USING CMake version: 3.1.0
System: Windows
CMake Warning (dev) at CMakeLists.txt:437 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.
== Generate version files (DONE) ==
== Set up flags ==
Build type: Release
USING CXXFLAGS = ' /DWIN32 /D_WINDOWS /W3 /GR /EHsc -D_CRT_SECURE_NO_DEPRECATE - D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /fp:strict /fp:except- /wd4503 /bigobj /MD /O2 /Ob2 /D NDEBUG'
USING LDFLAGS = ' /machine:X86 /INCREMENTAL:NO'
== Set up flags (DONE) ==
== Detect external libraries ==
External libraries supported: GMP;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
Preconfiguring library: GMP ...
Found GMP: C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libgmp-10.lib
GMP has been preconfigured:
UseGMP-file:
GMP include: C:/Program Files/CGAL-4.5/auxiliary/gmp/include
GMP libraries: C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libgmp-10.lib
GMP definitions:
USING GMP_VERSION = '5.0.1'
Preconfiguring library: MPFR ...
Found MPFR: C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libmpfr-4.lib
MPFR has been preconfigured:
UseMPFR-file:
MPFR include: C:/Program Files/CGAL-4.5/auxiliary/gmp/include
MPFR libraries: C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libmpfr-4.lib
MPFR definitions:
USING MPFR_VERSION = '3.0.0'
Boost version: 1.57.0
Found the following Boost libraries:
thread
system
Boost include: C:/boost_1_57_0
Boost libraries: optimized;C:/boost_1_57_0/stage/lib/boost_thread-vc110-mt- 1_57.lib;debug;C:/boost_1_57_0/stage/lib/boost_thread-vc110-mt-gd-1_57.lib;optimized;C:/boost_1_57_0/stage/lib/boost_system-vc110-mt-1_57.lib;debug;C:/boost_1_57_0/stage/lib/boost_system-vc110-mt-gd-1_57.lib
Boost definitions:
USING BOOST_VERSION = '1.57.0'
== Detect external libraries (DONE) ==
== Write compiler_config.h ==
Performing Test CGAL_CFG_BOOST_VARIANT_SWAP_BUG - Failed
Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Success
Performing Test CGAL_CFG_IEEE_754_BUG - Success
Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
Performing Test CGAL_CFG_MATCHING_BUG_6 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_7 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Failed
Performing Test CGAL_CFG_NO_LIMITS - Success
Performing Test CGAL_CFG_NO_NEXTAFTER - Failed
Performing Test CGAL_CFG_NO_STL - Success
Performing Test CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG - Failed
Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
== Write compiler_config.h (DONE) ==
== Generating build files ==
Configuring libCGAL
Requested component: MPFR
Requested component: GMP
libCGAL is configured
Sources for CGAL component library 'CGAL_Core' detected
Configuring libCGAL_Core
Requested component: MPFR
Requested component: GMP
libCGAL_Core is configured
Sources for CGAL component library 'CGAL_ImageIO' detected
Configuring libCGAL_ImageIO
Found OpenGL: opengl32
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
OpenGL include:
OpenGL libraries: glu32;opengl32
Requested component: MPFR
Requested component: GMP
libCGAL_ImageIO is configured
NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.
Sources for CGAL component library 'CGAL_Qt3' detected
Configuring libCGAL_Qt3
libCGAL_Qt3 needs Qt3, cannot be configured.
Sources for CGAL component library 'CGAL_Qt4' detected
Configuring libCGAL_Qt4
libCGAL_Qt4 needs Qt4, cannot be configured.
Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt3;CGAL_Qt4' detected
== Generating build files (DONE) ==
Configuring done
Generating done
I hope you can help me as soon as possible. Thanks you very much.
I was getting exactly same errors. I realized, when I was building QGLViewer via VS 2010 command prompt, it was giving an error for manipulatedFrame.cpp<244>. Error is about variable types.
So in manipulatedFrame.cpp, I changed line 244;
const qreal dist = sqrt(delta.x()*delta.x() + delta.y()*delta.y());
To this line;
const qreal dist = sqrt(((double)(delta.x()))*((double)(delta.x())) + ((double)(delta.y()))*((double)(delta.y())));
And build it again. It seems good now.
Related
The full build log is below
I am building following NGraph instructions on https://github.com/NervanaSystems/ngraph
Looking at these I am assuming these variables
NGRAPH_VERSION
NGRAPH_VERSION_SHORT
NGRAPH_API_VERSION
did not get set for some reason, even though the instructions never specifically require them to be set
My installation steps are:
git clone https://github.com/csullivan/ngraph.git
cd ngraph
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/home/pi/openvino_files/ngraph/install
make -j install
I tried setting them manually in the command line and in the cmake file, adding
SET(NGRAPH_VERSION 1)
SET(NGRAPH_VERSION_SHORT 1)
SET(NGRAPH_API_VERSION 1)
but the error still did not go away. And i don't want to have to set the version manually every time.
Something else is wrong here, what am I doing wrong?
What command do I need to type in to make it build correctly?
Thanks,
pi#raspberrypi:~/openvino_files/ngraph/build $ cmake .. -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/home/pi/openvino_files/ngraph/install
-- Found Git: /usr/bin/git (found version "2.20.1")
From https://github.com/csullivan/ngraph.git
CMake Error at cmake/Modules/git_tags.cmake:39 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
Call Stack (most recent call first):
cmake/Modules/git_tags.cmake:60 (NGRAPH_GET_TAG_OF_CURRENT_HASH)
CMakeLists.txt:21 (NGRAPH_GET_VERSION_LABEL)
CMake Error at CMakeLists.txt:27 (list):
list GET given empty list
CMake Error at CMakeLists.txt:28 (list):
list GET given empty list
CMake Error at CMakeLists.txt:29 (list):
list GET given empty list
-- NGRAPH_VERSION
-- NGRAPH_VERSION_SHORT
-- NGRAPH_API_VERSION
CMake Deprecation Warning at CMakeLists.txt:41 (cmake_policy):
The OLD behavior for policy CMP0042 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Installation directory: /home/pi/openvino_files/ngraph/install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/openvino_files/ngraph/build/tbb
Scanning dependencies of target ext_tbb
[ 12%] Creating directories for 'ext_tbb'
[ 25%] Performing download step (git clone) for 'ext_tbb'
Cloning into 'tbb-src'...
Switched to a new branch 'tbb_2018'
Branch 'tbb_2018' set up to track remote branch 'tbb_2018' from 'origin'.
[ 37%] No patch step for 'ext_tbb'
[ 50%] No update step for 'ext_tbb'
[ 62%] No configure step for 'ext_tbb'
[ 75%] No build step for 'ext_tbb'
[ 87%] No install step for 'ext_tbb'
[100%] Completed 'ext_tbb'
[100%] Built target ext_tbb
CMake Error at src/ngraph/runtime/interpreter/CMakeLists.txt:27 (set_target_properties):
set_target_properties called with incorrect number of arguments.
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Building Intel TBB: /usr/bin/make -j4 compiler=gcc tbb_build_dir=/home/pi/openvino_files/ngraph/build/src/ngraph/runtime/cpu/tbb_build tbb_build_prefix=tbb
CMake Warning (dev) at src/ngraph/runtime/cpu/CMakeLists.txt:125 (find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
CMake variable TBB_ROOT is set to:
/home/pi/openvino_files/ngraph/build/tbb/tbb-src
For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found TBB and imported target TBB::tbb
-- tools enabled
-- Adding unit test for backend INTERPRETER
-- Adding unit test for backend CPU
-- unit tests enabled
-- Configuring incomplete, errors occurred!
See also "/home/pi/openvino_files/ngraph/build/CMakeFiles/CMakeOutput.log".
I suggest you use a validated OpenVINO toolkit release with all the components (including ngraph). You can download the latest Raspberry Pi OpenVINO version from https://download.01.org/opencv/2020/openvinotoolkit/2020.4/
The OpenVINO Raspberry Pi installation guide is available at
https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_installing_openvino_raspbian.html
I am in the process of creating a pure x64 version of my application. In order to do that, I also need an x64 installer. I've read online that the NSIS code does support x64 but since they don't distribute an x64 build that I need to build from source (including all plugins/etc).
I've been able to build NSIS (v3.0.4) from source for x86 using Python 2.7/SCons 3.1.1/VS 2012/Zlib 1.2.7.
scons ZLIB_W32=C:\Source\zlib-1.2.7
But when I add the TARGET_ARCH=amd64 to the scons command,
scons ZLIB_W32=C:\Source\zlib-1.2.7 TARGET_ARCH=amd64
It doesn't work. Initially it built but didn't link because zlib was still x86.
C:\Source\zlib-1.2.7\lib\zdll.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
However, after rebuilding zlib1.dll (using VS2012) to be x64 (dumpbin confirms this)
I now get an error that it can't find zlib
scons ZLIB_W32=C:\Source\zlib-1.2.7 TARGET_ARCH=amd64
scons: Reading SConscript files ...
WARNING: VER_PACKED not set, defaulting to 0x03003666!
Delete("nsis-18-Nov-2019.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration (14.2)
Checking for memset requirement... (cached) yes
Checking for memcpy requirement... (cached) yes
Checking for C library gdi32... (cached) yes
Checking for C library user32... (cached) yes
Checking for C library pthread... (cached) no
Checking for C library iconv... (cached) no
Checking for C library shlwapi... (cached) yes
Checking for C library oleaut32... (cached) yes
Checking for C library version... (cached) yes
Checking for C library zdll... no
Checking for C library z... no
zlib (win32) is missing!
Note that I have made sure that the directory structure matches in the x64 build so that the following files exist:
C:\Source\zlib-1.2.7\zlib1.dll
C:\Source\zlib-1.2.7\lib\zlib1.lib
C:\Source\zlib-1.2.7\include\zconf.h
C:\Source\zlib-1.2.7\include\zlib.h
It did occur to me that I'm telling scons to look for x86 zlib (hence the W32 in ZLIB_W32) but I didn't see an option for telling scons to look for x64 zlib in the -h output.
What am I missing?
-UPDATE 1-
I'm making progress but not out of the woods yet. I've identified several issues with my build. #1, I wasn't actually using VS2012 like I thought (I have several versions installed). See above where the scons output says 14.0 (VS2019). Oops. Unfortunately, simply adding a MSVC_VERSION=11.0 to my command line didn't fix it. It seems that the nsis project isn't passing this along to scons. The only way I could figure out how to do this was to modify the nsis SConstruct file from:
######################################################################
####### Build Environment ###
######################################################################
path = ARGUMENTS.get('PATH', '')
toolset = ARGUMENTS.get('TOOLSET', '')
arch = ARGUMENTS.get('TARGET_ARCH', 'x86')
if toolset and path:
defenv = Environment(TARGET_ARCH = arch, ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip'])
else:
if path:
defenv = Environment(TARGET_ARCH = arch, ENV = {'PATH' : path})
if toolset:
defenv = Environment(TARGET_ARCH = arch, TOOLS = toolset.split(',') + ['zip'])
if not toolset and not path:
defenv = Environment(TARGET_ARCH = arch)
Export('defenv')
to:
######################################################################
####### Build Environment ###
######################################################################
path = ARGUMENTS.get('PATH', '')
toolset = ARGUMENTS.get('TOOLSET', '')
arch = ARGUMENTS.get('TARGET_ARCH', 'x86')
vs_version = ARGUMENTS.get('MSVC_VERSION', '')
if toolset and path:
defenv = Environment(TARGET_ARCH = arch, ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip'], MSVC_VERSION = vs_version)
else:
if path:
defenv = Environment(TARGET_ARCH = arch, ENV = {'PATH' : path}, MSVC_VERSION = vs_version)
if toolset:
defenv = Environment(TARGET_ARCH = arch, TOOLS = toolset.split(',') + ['zip'], MSVC_VERSION = vs_version)
if not toolset and not path:
defenv = Environment(TARGET_ARCH = arch, MSVC_VERSION = vs_version)
Export('defenv')
Now my build output correctly identifies as VS2012:
C:\Source\nsis\nsis-code-r7069-NSIS-tags-v304>scons ZLIB_W32=C:\Source\zlib MSVC_VERSION=11.0
scons: Reading SConscript files ...
WARNING: VER_PACKED not set, defaulting to 0x03003666!
Delete("nsis-19-Nov-2019.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration (11.0)
Checking for memset requirement... (cached) yes
<snip>
It seems like there should be a better way to allow this but I'm not familiar enough (yet) with scons or nsis's usage of it to submit a PR to fix this. Or maybe it already exists and I'm just not smart enough to find it (yet).
Now, on to building x64 nsis. Big thanks to #Anders for narrowing down which files are needed a bit and #bdbaddog for suggesting to look into the scons config.log where I found that I had named the zlib.dll lib file incorrectly when I build it for x64. After changing the output lib to
C:\Source\zlib-1.2.7\lib\zdll.lib
It at least tries to build but fails at linking...
-edit to update 1- all of the linking errors that were here previously were a bad rabbit hole I went down yesterday. Not sure if it was caused by scons leaving some temp files somewhere or VS doing it or me just being stupid but today when I started trying to track down the linking errors I couldn't reproduce them (there was a machine reboot yesterday and who knows what might have been locked/cached until then).
-UPDATE 2-
This update is removing all the mis-leading crap from update 1. Current situation is x64 NSIS build (using both my zlib-1.2.7-amd64 build AND the official NSIS zlib-1.2.8-amd64 pre-built binaries on the NSIS wiki) is failing at linking with the same error:
System.obj : error LNK2019: unresolved external symbol CallProc2 referenced in function Call
build\urelease\System\amd64-unicode\System.dll : fatal error LNK1120: 1 unresolved externals
scons: *** [build\urelease\System\amd64-unicode\System.dll] Error 1120
scons: building terminated because of errors.
So far I'm not having any luck figuring out what CallProc2 is but I think this means zlib is no longer at fault here.
-UPDATE 3-
Thanks to #Anders for the direction here since I was really stumped on the Callproc issue, the CallProc2 method is isolated to the system plugin and is caused by it not building correctly. There is some discussion in the comments below trying to find the cause but for now, I'm just excluding that plugin to get to a system that works before coming back to this.
Right now, the scons build completes and produces x64 binaries.
C:\Source\nsis\build\urelease\makensisw\>dumpbin /HEADERS ./makensisw.exe
Microsoft (R) COFF/PE Dumper Version 11.00.61030.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file ./makensisw.exe
PE signature found
File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
8664 machine (x64)
However, the installer build now results in the following error:
scons dist-installer ZLIB_W32=C:\Source\zlib-1.2.8-x64 MSVC_VERSION=11.0
link /nologo /map /subsystem:console,5.01 /OUT:build\urelease\VPatch\Source\GenPat\GenPat.exe /LIBPATH:C:\Source\zlib-1.2.8-x64\lib zdll.lib build\urelease\VPatch\Source\GenPat\adler32.obj build\urelease\VPatch\Source\GenPat\Checksums.obj build\urelease\VPatch\Source\GenPat\ChunkedFile.obj build\urelease\VPatch\Source\GenPat\FileFormat1.obj build\urelease\VPatch\Source\GenPat\GlobalTypes.obj build\urelease\VPatch\Source\GenPat\main.obj build\urelease\VPatch\Source\GenPat\md5.obj build\urelease\VPatch\Source\GenPat\PatchGenerator.obj build\urelease\VPatch\Source\GenPat\POSIXUtil.obj
adler32.obj : error LNK2019: unresolved external symbol _adler32 referenced in function "unsigned long __cdecl Checksum::adler32(unsigned long,unsigned char const *,unsigned int)" (?adler32#Checksum##YAKKPBEI#Z)
build\urelease\VPatch\Source\GenPat\GenPat.exe : fatal error LNK1120: 1 unresolved externals
scons: *** [build\urelease\VPatch\Source\GenPat\GenPat.exe] Error 1120
Unfortunately, without the installer, I'm kinda lost again. The x64 binaries run but when trying to compile any script (I believe), I get the following error (note that I copied makensis and zlib1.dll into the same directory for this):
C:\Source>makensis.exe ./myapp.nsi
Error: reading stub "C:\Stubs\zlib-amd64-unicode"
Error initalizing CEXEBuild: error setting default stub
-UPDATE 4-
I have finally gotten a build to work successfully after ignoring the system plugin. This works both with compiling zlib from source for x64 or with the prebuilt version from the NSIS wiki (linked in #Anders answer below):
scons ZLIB_W32=C:\Source\zlib-1.2.8-x64 TARGET_ARCH=amd64 MSVC_VERSION=11.0 SKIPPLUGINS=System
and I was able to deploy to my dev system using (from an admin enabled prompt since I was installing to Program Files):
scons PREFIX="C:\Program Files (x86)\NSIS" install ZLIB_W32=C:\Source\zlib-1.2.8-x64 TARGET_ARCH=amd64 SKIPPLUGINS=System
Unfortunately, you cannot build the NSIS installer from here (dist-install) because the NSIS installer itself apparently depends on usage of the System plugin. So this scenario isn't sufficient for being able to prep a build machine unless you are going to build everything from scratch on that machine.
Also, I'm not out of the woods yet because I also use the System plugin for my installer so I need to figure out why that isn't working.
However, I was able to compile and run a pure x64 bare minimum installer package with the above setup:
# name the installer
OutFile "Installer.exe"
# default section start; every NSIS script has at least one section.
Section
# default section end
SectionEnd
The above was straight out of the NSIS docs.
My environment:
cl.exe:
Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28316 for x64
nsis version: 3.06.1
zlib: Zlib-1.2.8-win64-AMD64
I modified SCons/Tool/masm.py:
C:\miniconda3\Lib\site-packages\SCons-4.0.1-py3.7.egg\SCons\Tool>diff -c masm.old.py masm.py
*** masm.old.py Fri Oct 09 22:02:45 2020
--- masm.py Fri Oct 09 21:58:06 2020
***************
*** 61,66 ****
--- 61,68 ----
shared_obj.add_emitter(suffix, SCons.Defaults.SharedObjectEmitter)
env['AS'] = 'ml'
+ if env.get('TARGET_ARCH')=='amd64':
+ env['AS'] = 'ml64'
env['ASFLAGS'] = SCons.Util.CLVar('/nologo')
env['ASPPFLAGS'] = '$ASFLAGS'
env['ASCOM'] = '$AS $ASFLAGS /c /Fo$TARGET $SOURCES'
Also modified nsis-3.06.1-src\Contrib\System\SConscript as follows:
C:\dev\nsis-3.06.1-src\Contrib\System>diff -c SConscript.old SConscript
*** SConscript.old Fri Oct 09 22:06:31 2020
--- SConscript Fri Oct 09 19:17:40 2020
***************
*** 4,9 ****
--- 4,10 ----
Source/Buffers.c
Source/Plugin.c
Source/System.c
+ Source/Call-amd64.S
""")
libs = Split("""
Then C:\dev\nsis-3.06.1-src>scons TARGET_ARCH=amd64 ended successfully.
I have
\zlib1.dll
\include\zconf.h
\include\zlib.h
\lib\libzdll.a
\lib\zdll.lib
\lib\zlib.lib
You can get pre-built zlib for NSIS here.
In the past I have actually used Process Monitor to figure out which file SCons is looking for, that sadly seems to be the fastest way to find out.
Regarding CallProc2. Add "System" to SKIPPLUGINS to get past this issue to make sure everything else compiles. CallProc2 is implemented in the amd64 .S file and used by system.c. You need the 64-bit Microsoft assembler detected correctly to build the .S file.
If you only need to compile NSIS once then you can cheat; Open a Visual Studio command prompt and execute ml64.exe /c Call-amd64.S and then copy the .obj file to the same build directory as system.obj and run Scons again.
To do it properly you need to investigate why Scons is not compiling the .S file. Could be a configuration issue or a bug in the related Sconscript file.
I have visual studio 2015 community version on Windows 10. I downloaded Ethereum project on github and tried running
CMake .. -G "Visual Studio 14 2015 ARM"
command but it failed with following message. (The failing step seems to be the installation of Boost through hunter):
-- Selecting Windows SDK version 10.0.15063.0 to target Windows 10.0.16299.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test fstack-protector-strong
-- Performing Test fstack-protector-strong - Failed
-- Performing Test Wimplicit-fallthrough
-- Performing Test Wimplicit-fallthrough - Failed
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: C:/.hunter
-- [hunter] [ Hunter-ID: b96750b | Toolchain-ID: bb3d68a | Config-ID: 59ec5bb ]
-- [hunter] BOOST_ROOT: C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Install (ver.: 1.64.0)
-- [hunter] Building Boost
loading initial cache file C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/cache.cmake
loading initial cache file C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/args.cmake
-- Selecting Windows SDK version 10.0.15063.0 to target Windows 10.0.16299.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe -- works
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe -- works
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/27/2017 11:33:03 AM.
Project "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\ALL_BUILD.vcxproj" on node 1 (default targets).
Project "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\ALL_BUILD.vcxproj" (1) is building "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
Creating directory "ARM\Debug\ZERO_CHECK\".
Creating directory "ARM\Debug\ZERO_CHECK\ZERO_CHECK.tlog\".
InitializeBuildStatus:
Creating "ARM\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Checking Build System
CMake does not need to re-run because C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/CMakeFiles/generate.stamp is up-to-date.
FinalizeBuildStatus:
Deleting file "ARM\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
Touching "ARM\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\ZERO_CHECK.vcxproj" (default targets).
Project "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\ALL_BUILD.vcxproj" (1) is building "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\Boost.vcxproj" (3) on node 1 (default targets).
PrepareForBuild:
Creating directory "ARM\Debug\Boost\".
Creating directory "ARM\Debug\Boost\Boost.tlog\".
InitializeBuildStatus:
Creating "ARM\Debug\Boost\Boost.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ComputeCustomBuildOutput:
Creating directory "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\Boost-prefix\src\Boost-stamp\Debug\".
Creating directory "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\CMakeFiles\Debug\".
CustomBuild:
Building Custom Rule C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/CMakeLists.txt
CMake does not need to re-run because C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/CMakeFiles/generate.stamp is up-to-date.
Creating directories for 'Boost'
Performing download step (download, verify and extract) for 'Boost'
-- Boost download command succeeded. See also C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/Boost-prefix/src/Boost-stamp/Boost-download-*.log
No update step for 'Boost'
No patch step for 'Boost'
Performing configure step for 'Boost'
-- Boost configure command succeeded. See also C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/Boost-prefix/src/Boost-stamp/Boost-configure-*.log
No build step for 'Boost'
Performing install step for 'Boost'
CMake Error at C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/Boost-prefix/src/Boost-stamp/Boost-install-Debug.cmake:16 (message):
Command failed: 1
'C:/Program Files/CMake/bin/cmake.exe' '-Dmake=' '-Dconfig=Debug' '-P' 'C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/Boost-prefix/src/Boost-stamp/Boost-install-Debug-impl.cmake'
See also
C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/Boost-prefix/src/Boost-stamp/Boost-install-*.log
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\Boost.vcxproj]
Done Building Project "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\Boost.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\ALL_BUILD.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\Boost.vcxproj" (default target) (3) ->
(CustomBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\.hunter\_Base\b96750b\bb3d68a\59ec5bb\Build\Boost\Build\Boost.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:01:53.05
[hunter ** FATAL ERROR **] Build step failed (dir: C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost
[hunter ** FATAL ERROR **] [Directory:C:/.hunter/_Base/Download/Hunter/0.19.105/b96750b/Unpacked/cmake/projects/Boost]
------------------------------ WIKI -------------------------------
https://github.com/ruslo/hunter/wiki/error.external.build.failed
-------------------------------------------------------------------
CMake Error at C:/.hunter/_Base/Download/Hunter/0.19.105/b96750b/Unpacked/cmake/modules/hunter_wiki.cmake:12 (message):
Call Stack (most recent call first):
C:/.hunter/_Base/Download/Hunter/0.19.105/b96750b/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_wiki)
C:/.hunter/_Base/Download/Hunter/0.19.105/b96750b/Unpacked/cmake/modules/hunter_download.cmake:596 (hunter_fatal_error)
C:/.hunter/_Base/Download/Hunter/0.19.105/b96750b/Unpacked/cmake/projects/Boost/hunter.cmake:272 (hunter_download)
C:/.hunter/_Base/Download/Hunter/0.19.105/b96750b/Unpacked/cmake/modules/hunter_add_package.cmake:53 (include)
CMakeLists.txt:101 (hunter_add_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Alan/Documents/Projects/cpp-ethereum/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Alan/Documents/Projects/cpp-ethereum/build/CMakeFiles/CMakeError.log".
----------------------------Boost-install-err.log-----------------------
CMake Error at C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Build/Boost-prefix/src/Boost-stamp/Boost-install-Debug-impl.cmake:9 (message):
Command failed (The system cannot find the file specified):
'b2' '--layout=tagged' '-d0' 'install' '--without-atomic' '--without-chrono' '--without-container' '--without-context' '--without-coroutine' '--without-coroutine2' '--without-date_time' '--without-exception' '--without-fiber' '--without-filesystem' '--without-graph' '--without-graph_parallel' '--without-iostreams' '--without-locale' '--without-log' '--without-math' '--without-metaparse' '--without-mpi' '--without-program_options' '--without-python' '--without-random' '--without-regex' '--without-serialization' '--without-signals' '--without-system' '--without-test' '--without-thread' '--without-timer' '--without-type_erasure' '--without-wave' '--prefix=C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Install' '--ignore-site-config'
??In Boost-install-err.log, which file the system couldn't find? b2.exe? The folder 'C:/.hunter/_Base/b96750b/bb3d68a/59ec5bb/Build/Boost/Install' only contains a subfolder call 'lib'. Is it suppose to contain 'the' file that the command is looking for?
I have fetched/merged the last changes from the libgit2 repository (the commit 4ae29053d5), created the build subdirectory, and compiled the library on Windows 7 using Visual Studio 2010 this way:
e:\Software\libgit2\build>cmake .. -G"Visual Studio 10" -DTHREADSAFE=ON -DSTDCALL=OFF
-- The C compiler identification is MSVC 16.0.40219.1
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
zlib was not found; using bundled 3rd-party sources.
-- Found PythonInterp: c:/Python26/python.exe (found version "2.6.5")
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Software/libgit2/build
e:\Software\libgit2\build>cmake --build .
Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1> Checking Build System
1> CMake does not need to re-run because E:/Software/libgit2/build/CMakeFiles/g
enerate.stamp is up-to-date.
2>------ Build started: Project: git2, Configuration: Debug Win32 ------
3>------ Build started: Project: libgit2_clar, Configuration: Debug Win32 ------
2> Building Custom Rule E:/Software/libgit2/CMakeLists.txt
2> CMake does not need to re-run because E:\Software\libgit2\build\CMakeFiles\g
enerate.stamp is up-to-date.
2> precompiled.c
3> Building Custom Rule E:/Software/libgit2/CMakeLists.txt
[...]
3> renames.c
3> submodules.c
3> lookup.c
3> status.c
3> basic.c
3> trace.c
3> Creating library E:/Software/libgit2/build/Debug/libgit2_clar.lib and obj
ect E:/Software/libgit2/build/Debug/libgit2_clar.exp
3> Creating library E:/Software/libgit2/build/Debug/libgit2_clar.lib and obj
ect E:/Software/libgit2/build/Debug/libgit2_clar.exp
3> libgit2_clar.vcxproj -> E:\Software\libgit2\build\Debug\libgit2_clar.exe
4>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
4> Building Custom Rule E:/Software/libgit2/CMakeLists.txt
4> CMake does not need to re-run because E:\Software\libgit2\build\CMakeFiles\g
enerate.stamp is up-to-date.
4> Build all projects
========== Build: 4 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Everything seems OK. When launching the test, it fails:
e:\Software\libgit2\build>ctest -V
UpdateCTestConfiguration from :E:/Software/libgit2/build/DartConfiguration.tcl
UpdateCTestConfiguration from :E:/Software/libgit2/build/DartConfiguration.tcl
Test project E:/Software/libgit2/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: libgit2_clar
1: Test command: E:\Software\libgit2\build\Debug\libgit2_clar.exe "-ionline"
1: Test timeout computed to be: 9.99988e+006
1: Loaded 195 suites:
1: Started
1:
1: attr::file....
1: attr::flags...
1: attr::ignore.....
[...]
1: status::submodules......
1: status::worktree..................................
1: status::worktree::init........
1: submodule::lookup.....
1: submodule::modify....
1: submodule::status.......
1: threads::basic.
1: trace::trace......
1:
1: 1) Failure:
1: diff::workdir::submodules [..\tests-clar\diff\workdir.c:825]
1: 33 != exp.lines
1: 33 != 35
1:
1/1 Test #1: libgit2_clar .....................***Failed 250.12 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 250.20 sec
The following tests FAILED:
1 - libgit2_clar (Failed)
Errors while running CTest
Is it a know situation? It seems that a lot of (sub)tests passed. I do not know the test framework. Does the messages at the end mean that only the diff::workdir::submodules failed?
I do not know the test framework.
Libgit2 relies on the Clar test framework.
Does the messages at the end mean that only the diff::workdir::submodules failed?
Yes. More precisely, it points you to the failing assertion
Is it a known situation?
No. The libgit2 team works hard to always have the tests passing.
I've tried locally and I cannot reproduce this issue. This gist contains the build and test run against libgit2#4ae29053.
This has been run on Win 7 (32 bits) platform against Visual Studio 2010 as well.
The only difference I see is that you're running an older version of Python, but that shouldn't be a problem. Clar relies on Python to generate the test suite (more info about this in the README file of the project) and supports Python back to version 2.5.
If you can successfully reproduce this failure, please open an issue in the libgit2 issue tracker as this may require a more deeper troubleshooting that may not fit to the StackOverflow format.
I am working a project that uses the Discrete Gaussian Image Filter within ITK. I am using CMake to automate the build process but it seems that CMake is leaving out certain ITK libraries during the configuration/generate step. I am currently using other headers in the ITK library without any issue. There are no configuration error messages in CMake for the project.
The CMakeLists.txt for my project:
#PROJECT(REGISTRATION)
#
# List of source files
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# Top of file: the name of the program
PROJECT(MultiObjModelToUSReg)
INCLUDE_REGULAR_EXPRESSION("^.*$")
FIND_PACKAGE( ITK REQUIRED)
IF( ITK_FOUND )
INCLUDE( ${USE_ITK_FILE} )
ENDIF( ITK_FOUND )
# Directories to search for #include (add more if needed)
# (ITK is already included through the use of INCLUDE(${ITK_USE_FILE})
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
src
)
# Name of the executable
#SET(MultiObjModelToUSReg MultiObjModelToUSReg_EXE)
# All source files (only .cxx, not .h or .txx)
SET(MultiObjModelToUSReg_SRCS
src/Utilities.cpp
src/MultiObjModel.cpp
src/USVolume.cpp
src/Registration.cpp
src/BoneProbabilityMap.cpp
#src/MultiObjModelToUSRegistration.cpp
#src/USRegistrationDialog.cpp
#src/MainPanel.cpp
#src/ModelRegistration.cxx
)
#only .h files that use QT_ macros!
#SET(MultiObjModelToUSReg_HEADERS
#src/USRegistrationDialog.h
#src/MainPanel.h
#src/ModelRegistration.h)
#SET(MultiObjModelToUSReg_FORMS
##ui/USRegistrationDialog.ui
##ui/MainPanel.ui
#ui/ModelRegistration.ui)
#SET(MultiObjModelToUSReg_RESOURCES)
# These two lines will compile and link your executable
#ADD_EXECUTABLE(MultiObjModelToUSReg
#${MultiObjModelToUSReg_EXE}
#${MultiObjModelToUSReg_SRCS}
#${MultiObjModelToUSReg_HEADERS_MOC}
#${MultiObjModelToUSReg_FORMS_HEADERS}
#${MultiObjModelToUSReg_RESOURCES_RCC}
#)
ADD_LIBRARY(MultiObjModelToUSReg STATIC ${MultiObjModelToUSReg_SRCS})
TARGET_LINK_LIBRARIES(MultiObjModelToUSReg ${ITK_LIBRARIES} )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
ENABLE_TESTING()
INCLUDE(CTEST)
IF (BUILD_TESTING)
ADD_SUBDIRECTORY (Test)
ENDIF (BUILD_TESTING)
CMake's error-free output:
Check for working C compiler using: Visual Studio 9 2008
Check for working C compiler using: Visual Studio 9 2008 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 9 2008
Check for working CXX compiler using: Visual Studio 9 2008 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Configuring done
Generating done
However, when I compile in Visual C++ 2008:
1>------ Build started: Project: MultiObjModelToUSReg, Configuration: Debug Win32 ------
1>Compiling...
1>BoneProbabilityMap.cpp
1>..\src\BoneProbabilityMap.cpp(8) : fatal error C1083: Cannot open include file: 'itkDiscreteGaussianImageFilter.h': No such file or directory
1>Build log was saved at "file://c:\MultiObjModelToUSReg\bin\MultiObjModelToUSReg.dir\Debug\BuildLog.htm"
1>MultiObjModelToUSReg - 1 error(s), 0 warning(s)
2>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 12 up-to-date, 1 skipped ==========
While there is a workaround to manually it into the project's configuration, I will need to collaborate with others so it would be ideal to have the build process automated.
Any help would be greatly appreciated! (I am quite new to Stackoverflow, please let me know if I made anything unclear).
You need to build ITK with ITK_BUILD_ALL_MODULES=ON.