I am attempting to compile mongod.exe from github src but I keep running into the following error:
C:\Github\Mongo>scons --64 --ssl mongod.exe
scons: Reading SConscript files ...
scons version: 2.3.4
python version: 2 7 8 'final' 0
Checking whether the C++ compiler works... (cached) yes
Checking whether the C compiler works... (cached) yes
Checking if C++ compiler "$CC" is MSVC... (cached) yes
Checking if C compiler "cl" is MSVC... (cached) yes
Checking if C compiler is Microsoft Visual Studio 2013 Update 2 or newer...(cach
ed) yes
Checking if C++ compiler is Microsoft Visual Studio 2013 Update 2 or newer...(ca
ched) yes
Checking if target architecture is 32-bit x86...(cached) no
Checking if we are using libstdc++... (cached) no
Checking if we are on a POSIX system... (cached) no
Checking for __declspec(thread)... (cached) no
Checking for C++11 <atomic> support... (cached) no
Checking for C++ header file execinfo.h... (cached) no
Checking for C library pcap... (cached) no
Checking for C library wpcap... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
cl /Fobuild\win32\64\ssl\mongo\db\db.obj /c src\mongo\db\db.cpp /TP /nologo /EHs
c /W3 /wd4355 /wd4800 /wd4267 /wd4244 /wd4290 /wd4068 /wd4351 /we4099 /Z7 /error
Report:none /MT /O2 /Oy- /Gw /Gy /Zc:inline /DBOOST_ALL_NO_LIB /D_SCONS /DMONGO_
EXPOSE_MACROS /DSUPPORT_UTF8 /DMONGO_OPTIMIZED_BUILD /DMONGO_BYTE_ORDER=1234 /D_
UNICODE /DUNICODE /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS /DMONGO_SSL /D_WIN32_WINN
T=0x0502 /DNTDDI_VERSION=0x05020200 /IC:\Github\winpcap\Include /Isrc\third_part
y\s2 /Isrc\third_party\pcre-8.30 /Isrc\third_party\boost /Ibuild\win32\64\ssl /I
src /Z7
db.cpp
C:\Github\Mongo\src\mongo/platform/atomic_intrinsics.h(60) : fatal error C1189:
#error : "Windows builds must use a compiler supporting std::atomic"
scons: *** [build\win32\64\ssl\mongo\db\db.obj] Error 2
scons: building terminated because of errors.
The source code throwing the error shows a variable _WIN32 as being defined and set to True but I thought the --64 option would have set this to false?
Any suggestions on how to resolve to complete a SSL build would be appreciated:
Environment: Visual Studio 2013, Window 7, x64 latest master from github
Observation: C++11 support is available when I run scons without --ssl and the compilation proceeds, but when using --ssl options the C++11 (atomic) supported is equal to "no" and the compilation fails.
This error occurs if OpenSSL is not found during the build process.
Make sure to install the latest version of OpenSSL (Win64 OpenSSL v1.0.1j)
When compiling add the home path of OpenSSL with --extrapath
Example build command:
scons --ssl --release --64 --extrapath=<OPENSSL-HOME> core
Related
I am a student of TU Wien and quite new in programming. I would like to install a GitHub repository (https://github.com/SICKAG/sick_safetyscanners_base) which is basically for Linux, but I asked one the of the contributors and he said it should work on windows too.
According to the README the following steps have to be done to install this the repository:
git clone https://github.com/SICKAG/sick_safetyscanners_base.git
cd sick_safetyscanners_base
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<path to install folder> ..
make -j8
make install
Here is a list of the softwares and tools I have already installed:
Visual Studio 2022 Community (because of MSVC)
Visual Studio Code
Scoop (to install cmake and make)
Boost 1.80.0
Git
And here are all the commands which are just working fine:
git clone https://github.com/SICKAG/sick_safetyscanners_base.git
cd sick_safetyscanners_base
mkdir build
cd build
cmake -DBoost_USE_STATIC_LIBS=ON .. (-DBoost_USE_STATIC_LIBS=ON, otherwise cmake does not find boost)
The problem is in the command line "make -j8". After this command, I recieve the following message: *** No targets specified and no makefile found. Stop. I have done some research and I found out that make will not work on windows (I use windows 10).
PS C:\Users\ader\sick_safetyscanners_base> mkdir build
Directory: C:\Users\ader\sick_safetyscanners_base
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 09/11/2022 13:04 build
PS C:\Users\ader\sick_safetyscanners_base> cd build
PS C:\Users\ader\sick_safetyscanners_base\build> cmake -DBoost_USE_STATIC_LIBS=ON ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The CXX compiler identification is MSVC 19.33.31630.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found Boost: C:/boost/boost_1_80_0 (found version "1.80.0") found components: system thread chrono atomic
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ader/sick_safetyscanners_base/build
PS C:\Users\ader\sick_safetyscanners_base\build> make -j
make: *** No targets specified and no makefile found. Stop.
Since Make will not work, I tried the command "msbuild" in the Developer PowerShell for VS 2022, but the repository will still not be installed, because I have the following error message: command line error D8021: invalid numeric argument /Werror.
PS C:\Users\ader\sick_safetyscanners_base\build> msbuild sick_safetyscanners_base.vcxproj
MSBuild version 17.3.1+2badb37d1 for .NET Framework
Build started 09/11/2022 13:07:41.
Project "C:\Users\ader\sick_safetyscanners_base\build\sick_safetyscanners_base.vcxproj" on node 1 (default targets).
Project "C:\Users\ader\sick_safetyscanners_base\build\sick_safetyscanners_base.vcxproj" (1) is building "C:\Users\ader\
sick_safetyscanners_base\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
Creating directory "x64\Debug\ZERO_CHECK\".
Creating directory "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\".
InitializeBuildStatus:
Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Checking Build System
FinalizeBuildStatus:
Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "C:\Users\ader\sick_safetyscanners_base\build\ZERO_CHECK.vcxproj" (default targets).
PrepareForBuild:
Creating directory "sick_safetyscanners_base.dir\Debug\".
Creating directory "C:\Users\ader\sick_safetyscanners_base\build\Debug\".
Creating directory "sick_safetyscanners_base.dir\Debug\sick_saf.78B012DA.tlog\".
InitializeBuildStatus:
Creating "sick_safetyscanners_base.dir\Debug\sick_saf.78B012DA.tlog\unsuccessfulbuild" because "AlwaysCreate" was spe
cified.
CustomBuild:
Building Custom Rule C:/Users/ader/sick_safetyscanners_base/CMakeLists.txt
ClCompile:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\CL.exe /c /IC:\User
s\ader\sick_safetyscanners_base\include /IC:\boost\boost_1_80_0 /Zi /nologo /Wall /WX- /diagnostics:column /Od /Ob0 /
D _WINDLL /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D sick_safetyscanners_base_EXPORTS /Gm- /EHsc /R
TC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"sick_safetyscanners_base.dir\Debug\\" /Fd"sick_s
afetyscanners_base.dir\Debug\vc143.pdb" /external:W4 /Gd /TP /errorReport:queue -std=c++11 -Werror C:\Users\ader\sic
k_safetyscanners_base\src\SickSafetyscanners.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\ApplicationNameVari
ableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\ChangeCommSettingsCommand.cpp C:\Users\ader\sick_saf
etyscanners_base\src\cola2\CloseSession.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\Cola2Session.cpp C:\User
s\ader\sick_safetyscanners_base\src\cola2\Command.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\ConfigMetadata
VariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\CreateSession.cpp C:\Users\ader\sick_safetyscann
ers_base\src\cola2\DeviceNameVariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\DeviceStatusVariabl
eCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\FieldGeometryVariableCommand.cpp C:\Users\ader\sick_saf
etyscanners_base\src\cola2\FieldHeaderVariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\FieldSetsV
ariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\FindMeCommand.cpp C:\Users\ader\sick_safetyscanne
rs_base\src\cola2\FirmwareVersionVariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\LatestTelegramV
ariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\MeasurementCurrentConfigVariableCommand.cpp C:\Us
ers\ader\sick_safetyscanners_base\src\cola2\MeasurementPersistentConfigVariableCommand.cpp C:\Users\ader\sick_safetys
canners_base\src\cola2\MethodCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\MonitoringCaseTableHeaderVa
riableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\MonitoringCaseVariableCommand.cpp C:\Users\ader\si
ck_safetyscanners_base\src\cola2\OrderNumberVariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\Proj
ectNameVariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\RequiredUserActionVariableCommand.cpp C:\
Users\ader\sick_safetyscanners_base\src\cola2\SerialNumberVariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\
src\cola2\StatusOverviewVariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\TypeCodeVariableCommand.
cpp C:\Users\ader\sick_safetyscanners_base\src\cola2\UserNameVariableCommand.cpp C:\Users\ader\sick_safetyscanners_ba
se\src\cola2\VariableCommand.cpp C:\Users\ader\sick_safetyscanners_base\src\communication\TCPClient.cpp C:\Users\ader
\sick_safetyscanners_base\src\communication\UDPClient.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\
ParseApplicationData.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseApplicationNameData.cpp C:\U
sers\ader\sick_safetyscanners_base\src\data_processing\ParseConfigMetadata.cpp C:\Users\ader\sick_safetyscanners_base
\src\data_processing\ParseData.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseDataHeader.cpp C:\
Users\ader\sick_safetyscanners_base\src\data_processing\ParseDatagramHeader.cpp C:\Users\ader\sick_safetyscanners_bas
e\src\data_processing\ParseDerivedValues.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseDeviceNa
me.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseDeviceStatus.cpp C:\Users\ader\sick_safetyscan
ners_base\src\data_processing\ParseFieldGeometryData.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\P
arseFieldHeaderData.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseFieldSetsData.cpp C:\Users\ad
er\sick_safetyscanners_base\src\data_processing\ParseFirmwareVersion.cpp C:\Users\ader\sick_safetyscanners_base\src\d
ata_processing\ParseGeneralSystemState.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseIntrusionD
ata.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseMeasurementCurrentConfigData.cpp C:\Users\ade
r\sick_safetyscanners_base\src\data_processing\ParseMeasurementData.cpp C:\Users\ader\sick_safetyscanners_base\src\da
ta_processing\ParseMeasurementPersistentConfigData.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\Par
seMonitoringCaseData.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseOrderNumber.cpp C:\Users\ade
r\sick_safetyscanners_base\src\data_processing\ParseProjectName.cpp C:\Users\ader\sick_safetyscanners_base\src\data_p
rocessing\ParseRequiredUserAction.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseSerialNumber.cp
p C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseStatusOverview.cpp C:\Users\ader\sick_safetyscanner
s_base\src\data_processing\ParseTCPPacket.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseTypeCod
eData.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\ParseUserNameData.cpp C:\Users\ader\sick_safetys
canners_base\src\data_processing\TCPPacketMerger.cpp C:\Users\ader\sick_safetyscanners_base\src\data_processing\UDPPa
cketMerger.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\ApplicationData.cpp C:\Users\ader\sick_safety
scanners_base\src\datastructure\ApplicationInputs.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\Applic
ationName.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\ApplicationOutputs.cpp C:\Users\ader\sick_safe
tyscanners_base\src\datastructure\CommSettings.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\ConfigDat
a.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\ConfigMetadata.cpp C:\Users\ader\sick_safetyscanners_b
ase\src\datastructure\Data.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\DatagramHeader.cpp C:\Users\a
der\sick_safetyscanners_base\src\datastructure\DataHeader.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructur
e\DerivedValues.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\DeviceName.cpp C:\Users\ader\sick_safety
scanners_base\src\datastructure\DeviceStatus.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\FieldData.c
pp C:\Users\ader\sick_safetyscanners_base\src\datastructure\FieldSets.cpp C:\Users\ader\sick_safetyscanners_base\src\
datastructure\FirmwareVersion.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\GeneralSystemState.cpp C:\
Users\ader\sick_safetyscanners_base\src\datastructure\IntrusionData.cpp C:\Users\ader\sick_safetyscanners_base\src\da
tastructure\IntrusionDatum.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\LatestTelegram.cpp C:\Users\a
der\sick_safetyscanners_base\src\datastructure\MeasurementData.cpp C:\Users\ader\sick_safetyscanners_base\src\datastr
ucture\MonitoringCaseData.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\OrderNumber.cpp C:\Users\ader\
sick_safetyscanners_base\src\datastructure\PacketBuffer.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\
ParsedPacketBuffer.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\ProjectName.cpp C:\Users\ader\sick_sa
fetyscanners_base\src\datastructure\RequiredUserAction.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\S
canPoint.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\SerialNumber.cpp C:\Users\ader\sick_safetyscann
ers_base\src\datastructure\StatusOverview.cpp C:\Users\ader\sick_safetyscanners_base\src\datastructure\TypeCode.cpp C
:\Users\ader\sick_safetyscanners_base\src\datastructure\UserName.cpp
cl : befehlszeile error D8021: Ungültiges numerisches Argument /Werror. [C:\Users\ader\sick_safetyscanners_base\build\
sick_safetyscanners_base.vcxproj]
Done Building Project "C:\Users\ader\sick_safetyscanners_base\build\sick_safetyscanners_base.vcxproj" (default targets)
-- FAILED.
Build FAILED.
"C:\Users\ader\sick_safetyscanners_base\build\sick_safetyscanners_base.vcxproj" (default target) (1) ->
(ClCompile target) ->
cl : befehlszeile error D8021: Ungültiges numerisches Argument /Werror. [C:\Users\ader\sick_safetyscanners_base\buil
d\sick_safetyscanners_base.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.43
At this stage, I do not really know, what else should I try to get this lilbrary finally installed. My goal is to call it with #include in my C++ program.
Do you have a solution here on how to get rid of the error message and how to install this library? I think the only thing missing is this step. I would be very grateful for any suggestions.
Thank you in advance!
== UPDATE after the answer of MadScientist ==
Brief history: After installing boost, I got the following message...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\boost\boost_1_80_0
The following directory should be added to linker library paths:
C:\boost\boost_1_80_0\stage\lib
... but I don't know exactly where to put these paths. I'm assuming that's exactly why Cmake doesn't find Boost. This problem was solved with -DBoost_USE_STATIC_LIBS=ON.
Now, if I use the command line cmake -DBoost_USE_STATIC_LIBS=ON -G "Unix Makefiles" .., CMake fails to find Boost again.
Here is what I can see on the terminal:
PS C:\Users\ader\sick_safetyscanners_base\build> cmake -G "Unix Makefiles" -DBoost_USE_STATIC_LIBS=ON ..
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at C:/Users/ader/scoop/apps/cmake/3.24.3/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: system thread chrono) (found version
"1.80.0")
Call Stack (most recent call first):
C:/Users/ader/scoop/apps/cmake/3.24.3/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Users/ader/scoop/apps/cmake/3.24.3/share/cmake-3.24/Modules/FindBoost.cmake:2376 (find_package_handle_standard_args)
CMakeLists.txt:11 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/ader/sick_safetyscanners_base/build/CMakeFiles/CMakeOutput.log".
PS C:\Users\ader\sick_safetyscanners_base\build>
Make absolutely does work on Windows (if you install it). In fact, you can tell it works since you ran it and it worked!!
The problem is that cmake can create project files for lots of different build systems, and the default on Windows is Visual Studio, not make. So when you ran cmake you got a bunch of files that tell Visual Studio how to build your code, but no files that tell make how to build your code.
Delete the directory and unpack it again, then run cmake again and add the -G "Unix Makefiles" option to the command.
However, the option -Werror is an option to the GCC compiler. It won't work if you're trying to run the Visual Studio compiler (even if you use a makefile to build the code, it will still use the Visual Studio compiler to compile it).
My suspicion is that whomever told you that "it should work" to build this code on Windows, was overly optimistic and in fact it will require some porting effort to make this work.
Trying to build mongodb 4.1.6 (the latest) from source on macOS Mojave (10.14.2) is giving configuration error. Some libatomic is missing. I tried searching for the solution on the web but none has worked so far.
Solution that looked most promising was from here: Can't compile C program on a Mac after upgrade to Mojave
But it didn't solve my problem either.
Here is the configuration outout:
scons: Reading SConscript files ...
scons version: 3.0.1
python version: 2 7 10 'final' 0
Checking whether the C compiler works... yes
Checking whether the C++ compiler works... yes
Checking that the C++ compiler can link a C++ program... yes
Checking if C++ compiler "g++" is GCC... no
Checking if C++ compiler "g++" is clang... yes
Checking if C compiler "gcc" is clang... yes
Detected a x86_64 processor
Checking if target OS macOS is supported by the toolchain... yes
Checking if C compiler is clang 3.8 (or Apple XCode 8.3.2) or newer...yes
Checking if C++ compiler is clang 3.8 (or Apple XCode 8.3.2) or newer...yes
Checking for sufficient macOS target version minimum... yes
Checking if C compiler supports -Wno-unused-local-typedefs... yes
Checking if C compiler supports -Wno-unused-function... yes
Checking if C compiler supports -Wno-unused-private-field... yes
Checking if C compiler supports -Wno-deprecated-declarations... yes
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... yes
Checking if C compiler supports -Wno-tautological-constant-compare... yes
Checking if C compiler supports -Wno-tautological-unsigned-zero-compare... yes
Checking if C compiler supports -Wno-tautological-unsigned-enum-zero-compare... yes
Checking if C compiler supports -Wno-unused-const-variable... yes
Checking if C compiler supports -Wno-unused-but-set-variable... no
Checking if C compiler supports -Wno-missing-braces... yes
Checking if C compiler supports -Wno-inconsistent-missing-override... yes
Checking if C compiler supports -Wno-potentially-evaluated-expression... yes
Checking if C++ compiler supports -Wpessimizing-move... yes
Checking if C++ compiler supports -Wredundant-move... yes
Checking if C++ compiler supports -Wno-maybe-uninitialized... no
Checking if C++ compiler supports -Wno-undefined-var-template... yes
Checking if C++ compiler supports -Wno-instantiation-after-specialization... yes
Checking if C compiler supports -Wno-unused-lambda-capture... yes
Checking if C compiler supports -Wno-exceptions... yes
Checking if C compiler supports -Wno-format-truncation... no
Checking if C++ compiler supports -Wno-class-memaccess... no
Checking -Wnon-virtual-dtor for false positives... no
Checking if C compiler supports -Wunguarded-availability... yes
Checking if C compiler supports -fstack-protector-strong... yes
Checking if we are using libstdc++... no
Checking if C++ compiler supports -std=c++14... yes
Checking if C compiler supports -std=c11... yes
Checking for C++14... yes
Checking for memset_s... yes
Checking for C function strnlen()... yes
Checking if we are on a POSIX system... yes
Checking if the POSIX monotonic clock is supported... no
Checking off_t is 8 bytes... yes
Checking if linker supports -fuse-ld=gold... no
Checking if linker supports -Wl,--build-id... no
Checking if linker supports -Wl,--hash-style=gnu... no
Checking if linker supports -Wl,-z,noexecstack... no
Checking if linker supports -Wl,--warn-execstack... no
Checking if linker supports -Wl,-z,relro... no
Checking if C compiler supports -fno-builtin-memcmp... yes
Checking for storage class thread_local yes
Checking for C++14 std::enable_if_t support...yes
Checking for C++14 std::make_unique support... yes
Checking if pthread_setname_np is supported... no
Using SSL Provider: apple
Checking for C library rt... no
Checking for C library dl... no
Checking for C++ header file execinfo.h... yes
Checking whether backtrace is declared... yes
Checking whether backtrace_symbols is declared... yes
Checking whether backtrace_symbols_fd is declared... yes
Checking for C library pcap... no
Checking for C library wpcap... no
Checking if std::atomic<int64_t> works... no
Checking for C library atomic... no
Some atomic ops are not intrinsically supported, but no libatomic found
See /Users/dibyendu/Downloads/build/mongo-virtual-env/mongo/build/scons/config.log for details
And here is the config.log details:
scons: Configure: Checking if std::atomic<int64_t> works...
build/scons/opt/sconf_temp/conftest_64.cpp <-
|
|#include <atomic>
|
|int main(int argc, char* argv[]) {
| std::atomic<int64_t> x;
|
| x.store(0);
| // Use argc to ensure we can't optimize everything away.
| int64_t y = argc;
| x.fetch_add(y);
| x.fetch_sub(y);
| x.exchange(y);
| if (x.compare_exchange_strong(y, x) && x.is_lock_free())
| return 0;
| return x.load();
|}
|
Compiling build/scons/opt/sconf_temp/conftest_64.o
Linking build/scons/opt/sconf_temp/conftest_64
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: fatal warning(s) induced error (-fatal_warnings)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: Configure: no
scons: Configure: Checking for C library atomic...
build/scons/opt/sconf_temp/conftest_65.c <-
|
|
|
|int
|main() {
|
|return 0;
|}
|
Compiling build/scons/opt/sconf_temp/conftest_65.o
Linking build/scons/opt/sconf_temp/conftest_65
ld: library not found for -latomic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: Configure: no
Any suggestion would be helpful.
The problem was not with libatomic at all. The error was coming because of this issue ld: warning: text-based stub file are out of sync. Falling back to library file for linking
Fix:
$ rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
and then executing this script: https://gist.github.com/karololszacki/dec8fd80b20e081b0e91a6bbd639c8fe
I'm struggling with autotools plugin in Eclipse and some C++ project I have downloaded.
My goal consists on cross-compilng for an arm processor, so the project is already configured to work with autotools, but when I try to crosscompile I have the following issue
In file included from /usr/include/c++/4.6/bits/stl_algo.h:61:0,
from /usr/include/c++/4.6/algorithm:63,
from dtntracepath.cpp:17:
/usr/include/c++/4.6/cstdlib:119:11: error: ‘::malloc’ has not been declared
I've checked out the configure output of my project noticing this
...
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... no
checking for memset... yes
...
I know how to fix it through linux terminal through adding the option
export ac_cv_func_malloc_0_nonnull=yes
but non through Eclipse or autotools pluging, since the settings of the project aren't available. May you enlighten me?
Kind regards,
Thanks in advance
PS: the parameters which I've set in autotools plugin are the following ones:
-Command: configure CFLAGS="-m32" LDFLAGS="-m32" CC=/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc CC=c99
-All options : --host=arm-mv5sft-linux-gnueabi --build=i686-linux --target=arm-mv5sft-linux-gnueabi --with-sysroot=/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/arm-mv5sft-linux-gnueabi/
EDITED:
I have tried ldav1s advice an using the following configure
configure CC=/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc CXX=/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-g++ CFLAGS="-m32" LDFLAGS="-m32"
I get these errors
Command-line environment variables:
LDFLAGS="-m32" LDFLAGS="-m32" CC="/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc" CXX="/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-g++"
sh -c /home/t/ibrdtn/ibrdtn-tools-0.8.0/configure ++ --host=arm-mv5sft-linux-gnueabi --with-sysroot=/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/arm-mv5sft-linux-gnueabi/
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: ++
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-mv5sft-linux-gnueabi-strip... no
checking for arm-mv5sft-linux-gnueabi-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
Invalid configuration `++': machine `++' not recognized
configure: error: /bin/bash ./config.sub ++ failed
configure: error: /bin/bash ./config.sub ++ failed
checking build system type...
Configuration failed with error
EDIT2
After reinstalling eclipse the ++ errors of first edition were gone, now if I use the following configuration
configure CC=/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc CXX=/home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-g++ CFLAGS="-m32" LDFLAGS="-m32"--host=arm-mv5sft-linux-gnueabi --build=i686-linux --target=arm-mv5sft-linux-gnueabi
It was compiling properly, I have seen some arm/le outputs, but I have got this error
concerning to one of the libraries
make[3]: Entering directory `/home/t/ibrdtn/ibrcommon-0.8.0/ibrcommon/net'
CXX tcpclient.lo
CXX tcpserver.lo
CXX tcpstream.lo
CXX udpsocket.lo
CXX MulticastSocket.lo
CXX UnicastSocket.lo
CXX stopandwait.lo
CXX vsocket.lo
CXX vinterface.lo
CXX vaddress.lo
CXX LinkManager.lo
In file included from LinkManager.cpp:16:
../../ibrcommon/net/NetLinkManager.h:19:29: error: netlink/netlink.h: No such file or directory
../../ibrcommon/net/NetLinkManager.h:20:26: error: netlink/attr.h: No such file or directory
make[3]: *** [LinkManager.lo] Error 1
make[3]: Leaving directory `/home/t/ibrdtn/ibrcommon-0.8.0/ibrcommon/net'
make[2]: Leaving directory `/home/t/ibrdtn/ibrcommon-0.8.0/ibrcommon'
make[2]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/t/ibrdtn/ibrcommon-0.8.0/ibrcommon'
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
**** Build Finished ****
You haven't set up the C++ compiler (CXX) as part of your arguments to configure, as well as multiply defining the C compiler (CC).
You seem to be picking up the compiler for the build machine (the ones in /usr/include) instead of the one for the crosscompiler (the ones in /home/t/s/arm-mv5sft-linux-gnueabi/SW3.2p1).
I am a newbie for IOS. I am trying to search some examples written in objectiveC for template match using OpenCV. I need to capture a logo from camera and need to match with some images kept in my project. Even after trying for long i didn't find something working. I tried this Project but the compiler is giving following error:Command /usr/bin/make failed with exit code 2
I don't know how to fix this error.
I am using XCode version 4.3.3 & IOS 5 on my MAC mini.
I need your help. One thing please consider, I just started working on MAC and IOS (1-2 months). A step by step guide or some working example will be more helpful.
I am getting following text in log:
* Unpacking OpenCV (2.0.0)...
patching file src/cv/cvcalibration.cpp
*** Configuring OpenCV (2.0.0 - iPhoneSimulator)...
checking build system type... i686-apple-darwin
checking host system type... i686-apple-darwin9
checking target system type... i686-apple-darwin9
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-apple-darwin9-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p...
/Users/Manish/Downloads/OpenCV-iPad/OpenCV/build/iPhoneSimulator/../.././tmp/OpenCV-2.0.0/autotools/install-sh
-c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for style of include used by make... GNU
checking for C++ compiler default output file name...
configure: error: in
`/Users/Manish/Downloads/OpenCV-iPad/OpenCV/build/iPhoneSimulator':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
make: * [opencv_simulator] Error 77
Command /usr/bin/make failed with exit code 2
Thanks for your advise and support, this is the part of the project i am developing for my companies client so don't have nay choice, just to complete this task.
One more thing i have faced same problem on more than one MAC mini.. so if you download same Project you might get the same issue.
Manish
I am trying to compile tesseract 3.01 for iOS 4.0. Config script for tesseract fails with the following error:
checking for acos... yes
checking for asin... yes
checking for leptonica... yes
checking for pixCreate in -llept... no
configure: error: leptonica library missing
make: *** [config.status] Error 1
I have leptonica 1.68 built and have set the right LDFLAGS and LIBLEPT_LIBDIR values. Am I missing something?
You can use the prebuilt library itself. Have a look at here https://stackoverflow.com/a/9124709/641062