Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] mingw-w64/8.0.2: build fails on ubuntu 20.04 #25719

Open
pkoshevoy opened this issue Oct 25, 2024 · 1 comment
Open

[package] mingw-w64/8.0.2: build fails on ubuntu 20.04 #25719

pkoshevoy opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pkoshevoy
Copy link

Description

conan-install-mingw-w64.log

recipe fails during compilation of mingw-w64-crt ^

also, recipe will fail during gcc compilation if LIBRARY_PATH or LD_LIBRARY_PATH contains an empty entry, like this:

$ echo $LIBRARY_PATH
:/usr/lib/nvidia-367

Package and Environment Details

  • Package Name/Version: mingw-w64/8.0.2
  • Operating System+version: Linux Ubuntu 20.04
  • Compiler+version: GCC 9
  • Conan version: conan 2.8.1
  • Python version: Python 3.8.20

Conan profile

local default profile:

[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.exception=dwarf2
compiler.libcxx=libstdc++11
compiler.version=9
compiler.threads=posix
os=Linux
os.distribution=Ubuntu
os.distribution.version=20.04

Steps to reproduce

$ cat /tmp/conanfile.txt 
[requires]
mingw-w64/8.0.2

$ conan install --build=missing /tmp/conanfile.txt 

Logs

Click to expand log
  CC       stdio/lib32_libucrtbase_a-ucrt_vfprintf.o
/home/pkoshevoy/.conan2/p/b/mingw80cee71e4f445/b/src/mingw-w64/mingw-w64-crt/stdio/ucrt_sprintf.c: In function ‘sprintf’:
/home/pkoshevoy/.conan2/p/b/mingw80cee71e4f445/b/src/mingw-w64/mingw-w64-crt/stdio/ucrt_sprintf.c:16:33: error: ‘_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR’ undeclared (first use in this function); did you mean ‘UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR’?
   16 |   ret = __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, _Dest, (size_t)-1, _Format, NULL, ap);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR
/home/pkoshevoy/.conan2/p/b/mingw80cee71e4f445/b/src/mingw-w64/mingw-w64-crt/stdio/ucrt_sprintf.c:16:33: note: each undeclared identifier is reported only once for each function it appears in
  CC       stdio/lib32_libucrtbase_a-ucrt_vprintf.o
/home/pkoshevoy/.conan2/p/b/mingw80cee71e4f445/b/src/mingw-w64/mingw-w64-crt/stdio/ucrt__vscprintf.c:11:5: error: redefinition of ‘_vscprintf’
   11 | int _vscprintf(const char * __restrict__ _Format, va_list _ArgList)
      |     ^~~~~~~~~~
In file included from /home/pkoshevoy/.conan2/p/b/mingw80cee71e4f445/b/src/mingw-w64/mingw-w64-crt/stdio/ucrt__vscprintf.c:9:
/usr/share/mingw-w64/include/stdio.h:946:15: note: previous definition of ‘_vscprintf’ was here
  946 |   int __cdecl _vscprintf(const char * __restrict__ _Format,va_list _ArgList)
      |               ^~~~~~~~~~
@pkoshevoy pkoshevoy added the bug Something isn't working label Oct 25, 2024
@pkoshevoy
Copy link
Author

pkoshevoy commented Oct 25, 2024

conans boost/1.80.0 (and newer) fails to build with the system provided mingw-w64 tools (gcc 9.3)

conans mingw-w64/8.0.2 recipe fails to build on ubuntu 20.04 if there are system mingw-w64 packages installed

a workaround is to uninstall system packages before attempting to build the mingw-w64/8.0.2 conan recipe:

sudo apt remove binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64  gcc-mingw-w64-base   gcc-mingw-w64-x86-64  mingw-w64-common  mingw-w64-x86-64-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant