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] xz_utils/5.2.5: cannot build for Windows gcc x86_64 #7665

Closed
Buckskin opened this issue Oct 12, 2021 · 12 comments
Closed

[package] xz_utils/5.2.5: cannot build for Windows gcc x86_64 #7665

Buckskin opened this issue Oct 12, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@Buckskin
Copy link

Hello - A configuration for xz_utils/5.2.5 is not available, and when I try to build it I get a linker error and a corresponding compiler warning. Please help if possible. Thank you.

Detail log provided below. A short summary of the compiler warning and linker error:

[SNIP]
warning: implicit declaration of function ‘_beginthreadex’ [-Wimplicit-function-declaration]
389 | uintptr_t ret = _beginthreadex(NULL, 0, func, arg, 0, NULL);
[SNIP]
error: undefined reference to mythread_sigmask' error: undefined reference to _beginthreadex'
[SNIP]

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: xz_utils/5.2.5
  • Operating System+version: Windows 10
  • Compiler+version: GCC 8.1
  • Conan version: conan 1.41.0
  • Python version: Python 3.10.0

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8.1
compiler.libcxx=libstdc++11
compiler.exception=seh
compiler.threads=posix
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

$ mkdir testdir && cd testdir
$ type con > conanfile.txt
[requires]
xz_utils/5.2.5

[generators]
cmake
$ mkdir build && cd build
$ conan install .. --build=missing

Logs (Include/Attach if Applicable)

Click to expand log
[SNIP]

C:\sandbox\test_xz_utils\build>conan install .. --build=missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.exception=seh
compiler.libcxx=libstdc++11
compiler.threads=posix
compiler.version=8.1
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

xz_utils/5.2.5: WARN: Package binary is corrupted, removing: 254b8a847b6839f11dd2d082a1b8cc6428d6edae
conanfile.txt: Installing package
Requirements
    xz_utils/5.2.5 from 'conancenter' - Cache
Packages
    xz_utils/5.2.5:254b8a847b6839f11dd2d082a1b8cc6428d6edae - Build
Build requirements
    msys2/cci.latest from 'conancenter' - Cache
Build requirements packages
    msys2/cci.latest:eee3fba89db6d777329de604625af8c30d46f080 - Cache

Installing (downloading, building) binaries...
msys2/cci.latest: Already installed!
msys2/cci.latest: Creating MSYS_ROOT env var : C:\.conan\00c7c675\1\bin\msys64
msys2/cci.latest: Creating MSYS_BIN env var : C:\.conan\00c7c675\1\bin\msys64\usr\bin
msys2/cci.latest: Appending PATH env var with : C:\.conan\00c7c675\1\bin\msys64\usr\bin
xz_utils/5.2.5: Applying build-requirement: msys2/cci.latest
xz_utils/5.2.5: WARN: Build folder is dirty, removing it: C:\Users\lbrooks\.conan\data\xz_utils\5.2.5\_\_\build\254b8a847b6839f11dd2d082a1b8cc6428d6edae
xz_utils/5.2.5: Copying sources to build folder
xz_utils/5.2.5: Building your package in C:\Users\lbrooks\.conan\data\xz_utils\5.2.5\_\_\build\254b8a847b6839f11dd2d082a1b8cc6428d6edae
xz_utils/5.2.5: Generator txt created conanbuildinfo.txt
xz_utils/5.2.5: Aggregating env generators
xz_utils/5.2.5: Calling build()
xz_utils/5.2.5: run_in_windows_bash: C:\.conan\00c7c675\1\bin\msys64\usr\bin\bash.exe --login -c ^"cd \^"/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae\^" ^&^& PATH=\^"/c/.conan/00c7c675/1/bin/msys64/usr/bin:$PATH\^" ^&^& /c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/configure --help ^"
`configure' configures XZ Utils 5.2.5 to adapt to many kinds of systems.

[SNIP]

XZ Utils 5.2.5

System type:
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32

Configure options:
checking if debugging code should be compiled... no
checking which encoders to build... lzma1 lzma2 delta x86 powerpc ia64 arm armthumb sparc
checking which decoders to build... lzma1 lzma2 delta x86 powerpc ia64 arm armthumb sparc
checking which match finders to build... hc3 hc4 bt2 bt3 bt4
checking which integrity checks to build... crc32 crc64 sha256
checking if external SHA-256 should be used... no
checking if assembler optimizations should be used... x86_64
checking if small size is preferred over speed... no
checking if threading support is wanted... yes, vista
checking how much RAM to assume if the real amount is unknown... 128 MiB
checking if library symbol versioning should be used... no
checking if sandboxing should be used... maybe (autodetect)

checking for a shell that conforms to POSIX... /bin/sh

Initializing Automake:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /c/.conan/00c7c675/1/bin/msys64/usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether ln -s works... no, using cp -pR
checking whether make supports the include directive... yes (GNU style)
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 dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /c/.conan/00c7c675/1/bin/msys64/usr/bin/grep
checking for egrep... /c/.conan/00c7c675/1/bin/msys64/usr/bin/grep -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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes

Initializing Libtool:
checking how to print strings... printf
checking for a sed that does not truncate output... /c/.conan/00c7c675/1/bin/msys64/usr/bin/sed
checking for fgrep... /c/.conan/00c7c675/1/bin/msys64/usr/bin/grep -F
checking for ld used by gcc... /c/.conan/00c7c675/1/bin/msys64/usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/c/.conan/00c7c675/1/bin/msys64/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /c/.conan/00c7c675/1/bin/msys64/usr/bin/nm -B
checking the name lister (/c/.conan/00c7c675/1/bin/msys64/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format... func_convert_file_msys_to_w32
checking how to convert x86_64-w64-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for /c/.conan/00c7c675/1/bin/msys64/usr/x86_64-pc-msys/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 /c/.conan/00c7c675/1/bin/msys64/usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /c/.conan/00c7c675/1/bin/msys64/usr/bin/dd
checking how to truncate binary pipes... /c/.conan/00c7c675/1/bin/msys64/usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
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/.conan/00c7c675/1/bin/msys64/usr/x86_64-pc-msys/bin/ld.exe) supports shared libraries... 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... no
checking whether to build static libraries... yes
checking for windres... windres

Initializing gettext:
checking whether NLS is requested... yes
checking for msgfmt... /c/.conan/00c7c675/1/bin/msys64/usr/bin/msgfmt
checking for gmsgfmt... /c/.conan/00c7c675/1/bin/msys64/usr/bin/msgfmt
checking for xgettext... /c/.conan/00c7c675/1/bin/msys64/usr/bin/xgettext
checking for msgmerge... /c/.conan/00c7c675/1/bin/msys64/usr/bin/msgmerge
checking for ld... /c/.conan/00c7c675/1/bin/msys64/usr/x86_64-pc-msys/bin/ld.exe
checking if the linker (/c/.conan/00c7c675/1/bin/msys64/usr/x86_64-pc-msys/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for the common suffixes of directories in the library search path... lib,lib
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for CFLocaleCopyPreferredLanguages... no
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl

System headers and functions:
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking immintrin.h usability... yes
checking immintrin.h presence... yes
checking for immintrin.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking size of size_t... 8
checking for struct stat.st_atim.tv_nsec... yes
checking for struct stat.st_atimespec.tv_nsec... no
checking for struct stat.st_atimensec... no
checking for struct stat.st_uatime... no
checking for struct stat.st_atim.st__tim.tv_nsec... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether byte ordering is bigendian... no
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking for getopt_long... yes
checking whether optreset is declared... yes
checking for futimens... yes
checking for posix_fadvise... yes
checking whether program_invocation_name is declared... yes
checking if __builtin_bswap16/32/64 are supported... yes
checking if unaligned memory access should be used... yes
checking if unsafe type punning should be used... no
checking if __builtin_assume_aligned is supported... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking how to detect the amount of physical memory... special
checking for sys/param.h... (cached) yes
checking how to detect the number of available CPU cores... special
checking whether mbrtowc and mbstate_t are properly declared... yes
checking for wcwidth... yes
checking whether _mm_movemask_epi8 is declared... yes
checking sys/capsicum.h usability... no
checking sys/capsicum.h presence... no
checking for sys/capsicum.h... no
checking whether cap_rights_limit is declared... no

GCC extensions:
checking whether the -Werror option is usable... yes
checking for simple visibility declarations... yes
checking if gcc accepts -Wall... yes
checking if gcc accepts -Wextra... yes
checking if gcc accepts -Wvla... yes
checking if gcc accepts -Wformat=2... yes
checking if gcc accepts -Winit-self... yes
checking if gcc accepts -Wmissing-include-dirs... yes
checking if gcc accepts -Wstrict-aliasing... yes
checking if gcc accepts -Wfloat-equal... yes
checking if gcc accepts -Wundef... yes
checking if gcc accepts -Wshadow... yes
checking if gcc accepts -Wpointer-arith... yes
checking if gcc accepts -Wbad-function-cast... yes
checking if gcc accepts -Wwrite-strings... yes
checking if gcc accepts -Wlogical-op... yes
checking if gcc accepts -Waggregate-return... yes
checking if gcc accepts -Wstrict-prototypes... yes
checking if gcc accepts -Wold-style-definition... yes
checking if gcc accepts -Wmissing-prototypes... yes
checking if gcc accepts -Wmissing-declarations... yes
checking if gcc accepts -Wmissing-noreturn... yes
checking if gcc accepts -Wredundant-decls... yes

checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Doxyfile
config.status: creating Makefile
config.status: creating po/Makefile.in
config.status: creating lib/Makefile
config.status: creating src/Makefile
config.status: creating src/liblzma/Makefile
config.status: creating src/liblzma/api/Makefile
config.status: creating src/xz/Makefile
config.status: creating src/xzdec/Makefile
config.status: creating src/lzmainfo/Makefile
config.status: creating src/scripts/Makefile
config.status: creating tests/Makefile
config.status: creating debug/Makefile
config.status: creating src/scripts/xzdiff
config.status: creating src/scripts/xzgrep
config.status: creating src/scripts/xzmore
config.status: creating src/scripts/xzless
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
xz_utils/5.2.5: run_in_windows_bash: C:\.conan\00c7c675\1\bin\msys64\usr\bin\bash.exe --login -c ^"cd \^"/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae\^" ^&^& PATH=\^"/c/.conan/00c7c675/1/bin/msys64/usr/bin:$PATH\^" ^&^& make -j16 ^"
make  all-recursive
make[1]: Entering directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae'
Making all in src
make[2]: Entering directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/src'
Making all in liblzma
make[3]: Entering directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/src/liblzma'
Making all in api
make[4]: Entering directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/src/liblzma/api'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/src/liblzma/api'
make[4]: Entering directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/src/liblzma'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma -I../..  -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/api -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/common -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/check -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lz -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/rangecoder -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lzma -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/delta -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/simple -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -DNDEBUG -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -m64 -O3 -s -MT liblzma_la-tuklib_physmem.lo -MD -MP -MF .deps/liblzma_la-tuklib_physmem.Tpo -c -o liblzma_la-tuklib_physmem.lo `test -f '../common/tuklib_physmem.c' || echo '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/'`../common/tuklib_physmem.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma -I../..  -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/api -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/common -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/check -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lz -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/rangecoder -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lzma -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/delta -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/simple -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -DNDEBUG -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -m64 -O3 -s -MT liblzma_la-tuklib_cpucores.lo -MD -MP -MF .deps/liblzma_la-tuklib_cpucores.Tpo -c -o liblzma_la-tuklib_cpucores.lo `test -f '../common/tuklib_cpucores.c' || echo '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/'`../common/tuklib_cpucores.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma -I../..  -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/api -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/common -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/check -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lz -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/rangecoder -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lzma -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/delta -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/simple -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -DNDEBUG -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -m64 -O3 -s -MT liblzma_la-common.lo -MD -MP -MF .deps/liblzma_la-common.Tpo -c -o liblzma_la-common.lo `test -f 'common/common.c' || echo '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/'`common/common.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma -I../..  -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/api -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/common -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/check -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lz -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/rangecoder -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/lzma -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/delta -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/simple -I/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -DNDEBUG -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -m64 -O3 -s -MT liblzma_la-block_util.lo -MD -MP -MF .deps/liblzma_la-block_util.Tpo -c -o liblzma_la-block_util.lo `test -f 'common/block_util.c' || echo '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/liblzma/'`common/block_util.c

[SNIP]

/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/xz/message.c:384:2: note: ‘snprintf’ output between 3 and 337 bytes into a destination of size 16
  384 |  snprintf(buf, sizeof(buf), "%.*f %s",
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  385 |    speed > 9.9 ? 0 : 1, speed, unit[unit_index]);
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f .deps/xz-mytime.Tpo .deps/xz-mytime.Po
mv -f .deps/xz-args.Tpo .deps/xz-args.Po
/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/xz/message.c: In function ‘message_progress_update’:
/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/xz/message.c:384:35: warning: ‘%s’ directive output may be truncated writing up to 23 bytes into a region of size between 0 and 14 [-Wformat-truncation=]
  384 |  snprintf(buf, sizeof(buf), "%.*f %s",
      |                                   ^~
/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/xz/message.c:384:2: note: ‘snprintf’ output between 3 and 337 bytes into a destination of size 16
  384 |  snprintf(buf, sizeof(buf), "%.*f %s",
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  385 |    speed > 9.9 ? 0 : 1, speed, unit[unit_index]);
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f .deps/xz-options.Tpo .deps/xz-options.Po
mv -f .deps/xz-coder.Tpo .deps/xz-coder.Po
mv -f .deps/xz-signals.Tpo .deps/xz-signals.Po
mv -f .deps/xz-file_io.Tpo .deps/xz-file_io.Po
mv -f .deps/xz-suffix.Tpo .deps/xz-suffix.Po
mv -f .deps/xz-util.Tpo .deps/xz-util.Po
mv -f .deps/xz-message.Tpo .deps/xz-message.Po
In file included from /c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/xz/private.h:14,
                 from /c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/xz/list.c:13:
/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/common/mythread.h: In function ‘mythread_create’:
/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/source_subfolder/src/common/mythread.h:389:18: warning: implicit declaration of function ‘_beginthreadex’ [-Wimplicit-function-declaration]
  389 |  uintptr_t ret = _beginthreadex(NULL, 0, func, arg, 0, NULL);
      |                  ^~~~~~~~~~~~~~
mv -f .deps/xz-list.Tpo .deps/xz-list.Po
/bin/sh ../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -m64 -O3 -s  -m64 -o xz.exe xz-args.o xz-coder.o xz-file_io.o xz-hardware.o xz-main.o xz-message.o xz-mytime.o xz-options.o xz-signals.o xz-suffix.o xz-util.o xz-tuklib_open_stdxxx.o xz-tuklib_progname.o xz-tuklib_exit.o xz-tuklib_mbstr_width.o xz-tuklib_mbstr_fw.o xz-list.o xz_w32res.o ../../src/liblzma/liblzma.la   -lintl
libtool: link: gcc -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -m64 -O3 -s -m64 -o xz.exe xz-args.o xz-coder.o xz-file_io.o xz-hardware.o xz-main.o xz-message.o xz-mytime.o xz-options.o xz-signals.o xz-suffix.o xz-util.o xz-tuklib_open_stdxxx.o xz-tuklib_progname.o xz-tuklib_exit.o xz-tuklib_mbstr_width.o xz-tuklib_mbstr_fw.o xz-list.o xz_w32res.o  ../../src/liblzma/.libs/liblzma.a -lintl
/c/.conan/00c7c675/1/bin/msys64/usr/bin/../lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: xz-signals.o:signals.c:(.text+0x15f): undefined reference to `mythread_sigmask'
/c/.conan/00c7c675/1/bin/msys64/usr/bin/../lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: xz-signals.o:signals.c:(.text+0x1c7): undefined reference to `mythread_sigmask'
/c/.conan/00c7c675/1/bin/msys64/usr/bin/../lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: ../../src/liblzma/.libs/liblzma.a(liblzma_la-stream_encoder_mt.o):stream_encoder_mt.c:(.text+0x522): undefined reference to `_beginthreadex'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:509: xz.exe] Error 1
make[3]: Leaving directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/src/xz'
make[2]: *** [Makefile:422: all-recursive] Error 1
make[2]: Leaving directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae/src'
make[1]: *** [Makefile:616: all-recursive] Error 1
make[1]: Leaving directory '/c/users/lbrooks/.conan/data/xz_utils/5.2.5/_/_/build/254b8a847b6839f11dd2d082a1b8cc6428d6edae'
make: *** [Makefile:483: all] Error 2
xz_utils/5.2.5:
xz_utils/5.2.5: ERROR: Package '254b8a847b6839f11dd2d082a1b8cc6428d6edae' build failed
xz_utils/5.2.5: WARN: Build folder C:\Users\lbrooks\.conan\data\xz_utils\5.2.5\_\_\build\254b8a847b6839f11dd2d082a1b8cc6428d6edae
ERROR: xz_utils/5.2.5: Error in build() method, line 110
        autotools.make()
        ConanException: Error 2 while executing make -j16


[SNIP]
@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 12, 2021

This mingw is quite old. Does it work with the one available on https://winlibs.com/

@Buckskin
Copy link
Author

Hello - thanks for the help.

This mingw is quite old. Does it work with the one available on https://winlibs.com/

This is indeed where I obtained my tool. I grabbed the most recent (unless my procedure is wrong), and just did it again to make sure. This is the version it installed:

gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)

This is where I landed following the links to the binary installer: https://sourceforge.net/projects/mingw-w64/.

Did I go the Right Route?

@Buckskin
Copy link
Author

I should have mentioned I could not figure out how to generate a conan profile for this tool automatically - because it finds my Visual Studio tool first and generates that for the default profile using the $ conan config init --force. So, I created the mentioned profile by hand. Is there a way to have the tool detect and generate a profile for a specific tool? Thanks.

@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 13, 2021

Hello - thanks for the help.

This mingw is quite old. Does it work with the one available on https://winlibs.com/

This is indeed where I obtained my tool. I grabbed the most recent (unless my procedure is wrong), and just did it again to make sure. This is the version it installed:

gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)

This is where I landed following the links to the binary installer: https://sourceforge.net/projects/mingw-w64/.

Did I go the Right Route?

What? No, download links point to https://github.com/brechtsanders/winlibs_mingw/releases

@Buckskin
Copy link
Author

Hi - OH! I clicked on the first MinGW-w64 link on the https://winlibs.com/ page and it went to https://www.mingw-w64.org/ which sent me down the wrong path. Now I downloaded and tried: gcc version 11.2.0 (MinGW-W64 x86_64-ucrt-posix-seh).

However, same exact error! I was so hopeful! OK, I will try the MSVCRT version instead of UCRT version (because the errors seems related to threads). Let's see.

@Buckskin
Copy link
Author

Is there a way to have the tool detect and generate a profile for a specific tool? Thanks.

I learned if I set an env var CXX=gcc it forced $ conan config init --force to generate the correct GCC profile and not use the Visual Studio one.

@Buckskin
Copy link
Author

I will try the MSVCRT version instead of UCRT version (because the errors seems related to threads). Let's see.

I tried gcc version 11.2.0 (MinGW-W64 x86_64-posix-seh) and it gave me the same error.

@Buckskin
Copy link
Author

By the way, here is my conan profile for the gcc 11.2.0 tests I am trying:

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]

@ericLemanissier
Copy link
Contributor

ericLemanissier commented Oct 13, 2021

the error messge starts with /c/.conan/00c7c675/1/bin/msys64/usr/bin/../lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld, which makes me think the wrong linker (and compiler ?) is used (the one provided by msys instead of mingw). Can you retry but set CC and CXX environement variables to absolute path ?

EDIT: checking for ld used by gcc... /c/.conan/00c7c675/1/bin/msys64/usr/x86_64-pc-msys/bin/ld.exe

@Buckskin
Copy link
Author

which makes me think the wrong linker (and compiler ?) is used (the one provided by msys instead of mingw). Can you retry but set CC and CXX environement variables to absolute path ?

SUCCESS! WOW. That seems to be it. Thanks so much!

I added this to my script:

set CC=C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1/mingw64/bin/gcc.exe
set CXX=C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1/mingw64/bin/gcc.exe

Here are the differences I notice after setting CC and CXX to the full path. The ld.exe is indeed different. But, also some settings that must affect the compiler flags are different (because I also no longer get the compiler warning about implicit _beginthreadex).

success case:
[SNIP]
checking for ld used by C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1/mingw64/bin/gcc.exe... c:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1/mingw64/x86_64-w64-mingw32/bin/ld.exe
[SNIP]
checking whether optreset is declared... yes
checking for futimens... yes
checking for posix_fadvise... yes
checking whether program_invocation_name is declared... yes
[SNIP]

fail case:
[SNIP]
checking for ld used by gcc... /c/.conan/00c7c6750ff/1/bin/msys64/usr/x86_64-pc-msys/bin/ld.exe
[SNIP]
checking whether optreset is declared... no
checking for futimens... no
checking for posix_fadvise... no
checking whether program_invocation_name is declared... no
[SNIP]

@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 13, 2021

Add CC & CXX (and eventually LD) in env section of your profile instead. It's important when you have several compilers on your system.

@Buckskin
Copy link
Author

Hello everyone - thanks again for the help. It looks like I am set. For the record, here is the solution detail:

The profile works for gcc version 11.2.0 (MinGW-W64 x86_64-ucrt-posix-seh) installed at C:\winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2\mingw64\bin.

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]
PATH=['C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2/mingw64/bin']
CC=C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2/mingw64/bin/gcc.exe
CXX=C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2/mingw64/bin/gcc.exe

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

3 participants