conan-package-tools icon indicating copy to clipboard operation
conan-package-tools copied to clipboard

default exclude_vcvars_precommand breaks meson/ninja builds

Open SSE4 opened this issue 6 years ago • 3 comments

Description of Problem, Request, or Question

default value of exclude_vcvars_precommand breaks meson/ninja builds (e.g. GLib, GStreamer, etc.). they fails with the following error:

LINK : warning LNK4068: /MACHINE not specified; defaulting to X64
gobject/6270cfe@@gobject-2.0@sta/meson-generated_.._glib-enumtypes.c.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

full log: https://ci.appveyor.com/project/bincrafters/conan-glib/builds/24831437/job/5vogbmbhjqo0xbb9 (specifying the /MACHINE explicitly doesn't solve the problem).

the problems CPT sets up vcvars incorrectly, then correct vcvars are skipped during the build:

Conan:vcvars already set

adding CONAN_EXCLUDE_VCVARS_PRECOMMAND solves the issue

/cc @uilianries

Environment Details

  • Conan Package Tools Version: 0.27.0
  • Operating System: Windows
  • Operation System Version: Windows 10
  • Compiler+version: Visual Studio 2015
  • Docker image: None
  • Conan version: conan 1.15.0
  • Python version: python 3.7.0

Steps to reproduce (Include if Applicable)

Build logs (Include if Available)

SSE4 avatar May 27 '19 12:05 SSE4

I'm trying to build here, but I have completely different error. It's about linkage error:

FAILED: glib/tests/refcount.exe
link @glib/tests/refcount.exe.rsp
libglib-2.0.a(ggettext.c.obj) : error LNK2019: unresolved external symbol __imp__g_libintl_gettext referenced in function __g_dgettext_should_translate
libglib-2.0.a(ggettext.c.obj) : error LNK2019: unresolved external symbol __imp__g_libintl_dgettext referenced in function _g_dgettext
libglib-2.0.a(ggettext.c.obj) : error LNK2019: unresolved external symbol __imp__g_libintl_dcgettext referenced in function _g_dcgettext
libglib-2.0.a(ggettext.c.obj) : error LNK2019: unresolved external symbol __imp__g_libintl_dngettext referenced in function _g_dngettext
libglib-2.0.a(ggettext.c.obj) : error LNK2019: unresolved external symbol __imp__g_libintl_textdomain referenced in function __g_dgettext_should_translate
libglib-2.0.a(ggettext.c.obj) : error LNK2019: unresolved external symbol __imp__g_libintl_bindtextdomain referenced in function _ensure_gettext_initialized
libglib-2.0.a(ggettext.c.obj) : error LNK2019: unresolved external symbol __imp__g_libintl_bind_textdomain_codeset referenced in function _ensure_gettext_initialized
glib/tests/refcount.exe : fatal error LNK1120: 7 unresolved externals

conan-glib-msvc15.log

I'll try to fix it.

uilianries avatar May 27 '19 17:05 uilianries

it was fixed in the next commit, ignore this

SSE4 avatar May 27 '19 17:05 SSE4

Thanks!

uilianries avatar May 27 '19 18:05 uilianries