blackbird icon indicating copy to clipboard operation
blackbird copied to clipboard

Build error - failed to run MSBuild command

Open DuckEggStudios opened this issue 8 years ago • 11 comments

Hi all, I'm getting the below error when I'm trying to compile the code - any ideas?

Vesh@Vesh-PC MINGW64 ~/blackbird
$ cmake -B./build -H. -DCMAKE_BUILD_TYPE=Release
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.15063.
CMake Error at CMakeLists.txt:3 (project):
  Failed to run MSBuild command:

    C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

  to get the value of VCTargetsPath:

    Microsoft (R) Build Engine version 14.0.25123.0
    Copyright (C) Microsoft Corporation. All rights reserved.

    Build started 21/11/2017 9:40:32 PM.
    Project "C:\Users\Vesh\blackbird\build\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" on node 1 (default targets).
    C:\Users\Vesh\blackbird\build\CMakeFiles\3.10.0\VCTargetsPath.vcxproj(15,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    Done Building Project "C:\Users\Vesh\blackbird\build\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "C:\Users\Vesh\blackbird\build\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" (default target) (1) ->
      C:\Users\Vesh\blackbird\build\CMakeFiles\3.10.0\VCTargetsPath.vcxproj(15,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.13


  Exit code: 1



-- Configuring incomplete, errors occurred!
See also "C:/Users/Vesh/blackbird/build/CMakeFiles/CMakeOutput.log".

Thanks

DuckEggStudios avatar Nov 21 '17 13:11 DuckEggStudios

Fixed using -G "Visual Studio 15 2017 Win64"

Now have another issue, libraries aren't installed properly. Would love is someone could help me install the necessary libraries!

DuckEggStudios avatar Nov 21 '17 14:11 DuckEggStudios

Current error as below. Can't find any libraries. Pretty sure I installed them properly but would appreciate some help.

Vesh@Vesh-PC MINGW64 ~/blackbird
$ cmake -B./build -H. -DCMAKE_BUILD_TYPE=Release
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.15063.
-- cotire 1.7.9 loaded.
-- Could NOT find CURL (missing: CURL_LIBRARY) (found version "7.56.1")
-- Could NOT find Jansson (missing: JANSSON_LIBRARIES)
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Could NOT find SQLITE3 (missing: SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

DuckEggStudios avatar Nov 21 '17 15:11 DuckEggStudios

Most of the libraries you have to download and compile. Jansson also uses CMake but it doesn't have any other dependencies so should be easy to build. For Curl and OpenSSL I think precompiled binaries are available for MSVC you can use if you're looking to save trouble of building yourself. SQLite3 is included in the extern directory.

greatwolf avatar Nov 21 '17 19:11 greatwolf

Thanks, what do I do with it once it's built? That is where I am stuck I think? I have a folder of compiled binaries but when I try to build Blackbird I get the above error as if it can't see them.

DuckEggStudios avatar Nov 21 '17 22:11 DuckEggStudios

You need to tell cmake where to look for them. You can do that with -DCMAKE_PREFIX_PATH. Also see issue #246.

greatwolf avatar Nov 21 '17 23:11 greatwolf

Thanks heaps greatwolf, will try that out after work!

DuckEggStudios avatar Nov 22 '17 00:11 DuckEggStudios

Hmm still getting the same thing:

$ cmake -B./build -H. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="C:\Users\Vesh\jansson-2.10"
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.15063.
-- cotire 1.7.9 loaded.
-- Could NOT find CURL (missing: CURL_LIBRARY) (found version "7.56.1")
-- Could NOT find Jansson (missing: JANSSON_LIBRARIES)

When I built Jansson, I used ./configure, make, make check, make install. Is that all I had to do to build it?

DuckEggStudios avatar Nov 22 '17 11:11 DuckEggStudios

Find out where the make install put the *.lib and include files. That's the path CMAKE_PREFIX_PATH needs to point to.

Wherever the install location it should have a directory structure like this for cmake to find it:

Folder PATH listing
.
├───cmake
│       JanssonConfig.cmake
│       JanssonConfigVersion.cmake
│       JanssonTargets-release.cmake
│       JanssonTargets.cmake
│
├───include
│       jansson.h
│       jansson_config.h
│
└───lib
    │   jansson.lib

greatwolf avatar Nov 22 '17 18:11 greatwolf

Thanks, I've realised now that Jansson is not being built. This is what happens when I do the instructions from the website of ./configure, make, make check, make install.

Vesh@Vesh-PC MINGW32 ~/jansson-2.10
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... c:/git/mingw32/mingw32/bin/ld.exe
checking if the linker (c:/git/mingw32/mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw32/bin/nm -B
checking the name lister (/mingw32/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format... func_convert_file_msys_to_w32
checking how to convert i686-pc-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for c:/git/mingw32/mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw32/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (c:/git/mingw32/mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking sched.h usability... no
checking sched.h presence... no
checking for sched.h... no
checking for unistd.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for int32_t... yes
checking for uint32_t... yes
checking for uint16_t... yes
checking for uint8_t... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking for inline... inline
checking for close... yes
checking for getpid... yes
checking for gettimeofday... yes
checking for localeconv... yes
checking for open... yes
checking for read... yes
checking for sched_yield... no
checking for strtoll... yes
checking for gcc __sync builtins... yes
checking for gcc __atomic builtins... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating jansson.pc
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating src/jansson_config.h
config.status: creating test/Makefile
config.status: creating test/bin/Makefile
config.status: creating test/suites/Makefile
config.status: creating test/suites/api/Makefile
config.status: creating jansson_private_config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Vesh@Vesh-PC MINGW32 ~/jansson-2.10
$ make
C:/Git/mingw32/bin/make  all-recursive
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10'
Making all in doc
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/doc'
Making all in src
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/src'
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT dump.lo -MD -MP -MF .deps/dump.Tpo -c -o dump.lo dump.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT dump.lo -MD -MP -MF .deps/dump.Tpo -c dump.c  -DDLL_EXPORT -DPIC -o .libs/dump.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT dump.lo -MD -MP -MF .deps/dump.Tpo -c dump.c -o dump.o >/dev/null 2>&1
mv -f .deps/dump.Tpo .deps/dump.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c -o error.lo error.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c  -DDLL_EXPORT -DPIC -o .libs/error.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
mv -f .deps/error.Tpo .deps/error.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.lo hashtable.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c hashtable.c  -DDLL_EXPORT -DPIC -o .libs/hashtable.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c hashtable.c -o hashtable.o >/dev/null 2>&1
mv -f .deps/hashtable.Tpo .deps/hashtable.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT hashtable_seed.lo -MD -MP -MF .deps/hashtable_seed.Tpo -c -o hashtable_seed.lo hashtable_seed.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT hashtable_seed.lo -MD -MP -MF .deps/hashtable_seed.Tpo -c hashtable_seed.c  -DDLL_EXPORT -DPIC -o .libs/hashtable_seed.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT hashtable_seed.lo -MD -MP -MF .deps/hashtable_seed.Tpo -c hashtable_seed.c -o hashtable_seed.o >/dev/null 2>&1
mv -f .deps/hashtable_seed.Tpo .deps/hashtable_seed.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT load.lo -MD -MP -MF .deps/load.Tpo -c -o load.lo load.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT load.lo -MD -MP -MF .deps/load.Tpo -c load.c  -DDLL_EXPORT -DPIC -o .libs/load.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT load.lo -MD -MP -MF .deps/load.Tpo -c load.c -o load.o >/dev/null 2>&1
mv -f .deps/load.Tpo .deps/load.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT memory.lo -MD -MP -MF .deps/memory.Tpo -c -o memory.lo memory.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT memory.lo -MD -MP -MF .deps/memory.Tpo -c memory.c  -DDLL_EXPORT -DPIC -o .libs/memory.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT memory.lo -MD -MP -MF .deps/memory.Tpo -c memory.c -o memory.o >/dev/null 2>&1
mv -f .deps/memory.Tpo .deps/memory.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT pack_unpack.lo -MD -MP -MF .deps/pack_unpack.Tpo -c -o pack_unpack.lo pack_unpack.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT pack_unpack.lo -MD -MP -MF .deps/pack_unpack.Tpo -c pack_unpack.c  -DDLL_EXPORT -DPIC -o .libs/pack_unpack.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT pack_unpack.lo -MD -MP -MF .deps/pack_unpack.Tpo -c pack_unpack.c -o pack_unpack.o >/dev/null 2>&1
mv -f .deps/pack_unpack.Tpo .deps/pack_unpack.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT strbuffer.lo -MD -MP -MF .deps/strbuffer.Tpo -c -o strbuffer.lo strbuffer.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT strbuffer.lo -MD -MP -MF .deps/strbuffer.Tpo -c strbuffer.c  -DDLL_EXPORT -DPIC -o .libs/strbuffer.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT strbuffer.lo -MD -MP -MF .deps/strbuffer.Tpo -c strbuffer.c -o strbuffer.o >/dev/null 2>&1
mv -f .deps/strbuffer.Tpo .deps/strbuffer.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT strconv.lo -MD -MP -MF .deps/strconv.Tpo -c -o strconv.lo strconv.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT strconv.lo -MD -MP -MF .deps/strconv.Tpo -c strconv.c  -DDLL_EXPORT -DPIC -o .libs/strconv.o
strconv.c: In function 'jsonp_strtod':
strconv.c:18:16: warning: implicit declaration of function '__strtod' [-Wimplicit-function-declaration]
 #define strtod __strtod
                ^
strconv.c:77:13: note: in expansion of macro 'strtod'
     value = strtod(strbuffer->value, &end);
             ^~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT strconv.lo -MD -MP -MF .deps/strconv.Tpo -c strconv.c -o strconv.o >/dev/null 2>&1
mv -f .deps/strconv.Tpo .deps/strconv.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT utf.lo -MD -MP -MF .deps/utf.Tpo -c -o utf.lo utf.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT utf.lo -MD -MP -MF .deps/utf.Tpo -c utf.c  -DDLL_EXPORT -DPIC -o .libs/utf.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT utf.lo -MD -MP -MF .deps/utf.Tpo -c utf.c -o utf.o >/dev/null 2>&1
mv -f .deps/utf.Tpo .deps/utf.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT value.lo -MD -MP -MF .deps/value.Tpo -c -o value.lo value.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT value.lo -MD -MP -MF .deps/value.Tpo -c value.c  -DDLL_EXPORT -DPIC -o .libs/value.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT value.lo -MD -MP -MF .deps/value.Tpo -c value.c -o value.o >/dev/null 2>&1
mv -f .deps/value.Tpo .deps/value.Plo
C:/Git/usr/bin/sh.exe ../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2 -no-undefined -export-symbols-regex '^json_' -version-info 14:0:10  -o libjansson.la -rpath /usr/local/lib dump.lo error.lo hashtable.lo hashtable_seed.lo load.lo memory.lo pack_unpack.lo strbuffer.lo strconv.lo utf.lo value.lo
libtool: link: /mingw32/bin/nm -B  .libs/dump.o .libs/error.o .libs/hashtable.o .libs/hashtable_seed.o .libs/load.o .libs/memory.o .libs/pack_unpack.o .libs/strbuffer.o .libs/strconv.o .libs/utf.o .libs/value.o   | sed -n -e 's/^.*[        ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[  ][      ]*_\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed -e '/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //' | sort | uniq > .libs/libjansson.exp
libtool: link: /usr/bin/grep -E -e "^json_" ".libs/libjansson.exp" > ".libs/libjansson.expT"
libtool: link: mv -f ".libs/libjansson.expT" ".libs/libjansson.exp"
libtool: link: if test DEF = "`/usr/bin/sed -n -e 's/^[  ]*//' -e '/^\(;.*\)*$/d' -e 's/^\(EXPORTS\|LIBRARY\)\([         ].*\)*$/DEF/p' -e q .libs/libjansson.exp`" ; then cp .libs/libjansson.exp .libs/libjansson-4.dll.def; else echo EXPORTS > .libs/libjansson-4.dll.def; cat .libs/libjansson.exp >> .libs/libjansson-4.dll.def; fi
libtool: link:  gcc -shared .libs/libjansson-4.dll.def  .libs/dump.o .libs/error.o .libs/hashtable.o .libs/hashtable_seed.o .libs/load.o .libs/memory.o .libs/pack_unpack.o .libs/strbuffer.o .libs/strconv.o .libs/utf.o .libs/value.o    -g -O2   -o .libs/libjansson-4.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libjansson.dll.a
libtool: link: ar cru .libs/libjansson.a  dump.o error.o hashtable.o hashtable_seed.o load.o memory.o pack_unpack.o strbuffer.o strconv.o utf.o value.o
libtool: link: ranlib .libs/libjansson.a
libtool: link: ( cd ".libs" && rm -f "libjansson.la" && cp -pR "../libjansson.la" "libjansson.la" )
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/src'
Making all in test
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/test'
Making all in bin
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/bin'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/bin'
Making all in suites
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites'
Making all in api
make[4]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[4]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test'
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test'
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10'
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10'

Vesh@Vesh-PC MINGW32 ~/jansson-2.10
$ make check
Making check in doc
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10/doc'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10/doc'
Making check in src
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10/src'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10/src'
Making check in test
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10/test'
Making check in bin
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/bin'
C:/Git/mingw32/bin/make  json_process.exe
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/bin'
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src -I../../src  -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT json_process.o -MD -MP -MF .deps/json_process.Tpo -c -o json_process.o json_process.c
mv -f .deps/json_process.Tpo .deps/json_process.Po
C:/Git/usr/bin/sh.exe ../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2  -static   -o json_process.exe json_process.o ../../src/libjansson.la
libtool: link: gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2 -o json_process.exe json_process.o  ../../src/.libs/libjansson.a
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/bin'
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/bin'
Making check in suites
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites'
Making check in api
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
C:/Git/mingw32/bin/make  test_array.exe test_copy.exe test_dump.exe test_dump_callback.exe test_equal.exe test_load.exe test_loadb.exe test_load_callback.exe test_memory_funcs.exe test_number.exe test_object.exe test_pack.exe test_simple.exe test_unpack.exe
make[4]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
gcc -DHAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../src  -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT test_array.o -MD -MP -MF .deps/test_array.Tpo -c -o test_array.o test_array.c
mv -f .deps/test_array.Tpo .deps/test_array.Po
C:/Git/usr/bin/sh.exe ../../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2  -static   -o test_array.exe test_array.o ../../../src/libjansson.la
libtool: link: gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2 -o test_array.exe test_array.o  ../../../src/.libs/libjansson.a
gcc -DHAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../src  -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT test_copy.o -MD -MP -MF .deps/test_copy.Tpo -c -o test_copy.o test_copy.c
mv -f .deps/test_copy.Tpo .deps/test_copy.Po
C:/Git/usr/bin/sh.exe ../../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2  -static   -o test_copy.exe test_copy.o ../../../src/libjansson.la
libtool: link: gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2 -o test_copy.exe test_copy.o  ../../../src/.libs/libjansson.a
gcc -DHAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../src  -Wall -Wextra -Wdeclaration-after-statement -g -O2 -MT test_dump.o -MD -MP -MF .deps/test_dump.Tpo -c -o test_dump.o test_dump.c
test_dump.c: In function 'dumpfd':
test_dump.c:259:8: warning: implicit declaration of function 'pipe' [-Wimplicit-function-declaration]
     if(pipe(fds))
        ^~~~
mv -f .deps/test_dump.Tpo .deps/test_dump.Po
C:/Git/usr/bin/sh.exe ../../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2  -static   -o test_dump.exe test_dump.o ../../../src/libjansson.la
libtool: link: gcc -Wall -Wextra -Wdeclaration-after-statement -g -O2 -o test_dump.exe test_dump.o  ../../../src/.libs/libjansson.a
test_dump.o: In function `dumpfd':
C:\Users\Vesh\jansson-2.10\test\suites\api/test_dump.c:259: undefined reference to `pipe'
collect2.exe: error: ld returned 1 exit status
make[4]: *** [Makefile:427: test_dump.exe] Error 1
make[4]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[3]: *** [Makefile:604: check-am] Error 2
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[2]: *** [Makefile:349: check-recursive] Error 1
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[1]: *** [Makefile:558: check-recursive] Error 1
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test'
make: *** [Makefile:450: check-recursive] Error 1

Vesh@Vesh-PC MINGW32 ~/jansson-2.10
$ make install
Making install in doc
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10/doc'
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/doc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/doc'
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10/doc'
Making install in src
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10/src'
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/src'
 /usr/bin/mkdir -p '/usr/local/lib'
 C:/Git/usr/bin/sh.exe ../libtool   --mode=install /usr/bin/install -c   libjansson.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libjansson.dll.a /usr/local/lib/libjansson.dll.a
libtool: install: base_file=`basename libjansson.la`
libtool: install:  dlpath=`/bin/sh 2>&1 -c '. .libs/'libjansson.la'i; echo libjansson-4.dll'`
libtool: install:  dldir=/usr/local/lib/`dirname ../bin/libjansson-4.dll`
libtool: install:  test -d /usr/local/lib/../bin || mkdir -p /usr/local/lib/../bin
libtool: install:  /usr/bin/install -c .libs/libjansson-4.dll /usr/local/lib/../bin/libjansson-4.dll
libtool: install:  chmod a+x /usr/local/lib/../bin/libjansson-4.dll
libtool: install:  if test -n '' && test -n 'strip --strip-unneeded'; then eval 'strip --strip-unneeded /usr/local/lib/../bin/libjansson-4.dll' || exit 0; fi
libtool: install: /usr/bin/install -c .libs/libjansson.lai /usr/local/lib/libjansson.la
libtool: install: /usr/bin/install -c .libs/libjansson.a /usr/local/lib/libjansson.a
libtool: install: chmod 644 /usr/local/lib/libjansson.a
libtool: install: ranlib /usr/local/lib/libjansson.a
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 jansson.h '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 jansson_config.h '/usr/local/include'
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/src'
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10/src'
Making install in test
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10/test'
Making install in bin
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/bin'
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/bin'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/bin'
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/bin'
Making install in suites
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites'
Making install in api
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[4]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites/api'
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[4]: Entering directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test/suites'
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10/test'
make[3]: Entering directory 'C:/Users/Vesh/jansson-2.10/test'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test'
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test'
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10/test'
make[1]: Entering directory 'C:/Users/Vesh/jansson-2.10'
make[2]: Entering directory 'C:/Users/Vesh/jansson-2.10'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 jansson.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory 'C:/Users/Vesh/jansson-2.10'
make[1]: Leaving directory 'C:/Users/Vesh/jansson-2.10'

DuckEggStudios avatar Nov 23 '17 12:11 DuckEggStudios

It looks like the ./config make is trying to build using mingw toolchain. You should try building jansson with cmake instead with NMake as the generator. Note that static libraries *.a built with mingw does not work with Visual C++.

greatwolf avatar Nov 30 '17 00:11 greatwolf

can you please tell how did u fix "failed to run MS Build Command " ? Thank you in advance

sripoojatirumani avatar Jun 07 '18 11:06 sripoojatirumani