Error bootstrapping makefile fragments while building libjpeg/9d with Conan - c++

I have been trying for several days to install OpenCV with Conan (on Windows 10). However, the installation is failing on building the libjpeg/9d dependency.
Conan profile:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=8
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
The used command:
conan install .. --profile vslamprofile --build=missing
The part of the logs related to the error:
libjpeg/9d: configure: creating ./config.status
libjpeg/9d: config.status: creating Makefile
libjpeg/9d: config.status: creating libjpeg.pc
libjpeg/9d: config.status: creating jconfig.h
libjpeg/9d: config.status: executing depfiles commands
libjpeg/9d: config.status: error: in /c/users/username/.conan/data/libjpeg/9d/_/_/build/2e90c2fe2f69846019f521f2004427fb191035af':
libjpeg/9d: config.status: error: Something went wrong bootstrapping makefile fragments
libjpeg/9d: for automatic dependency tracking. Try re-running configure with the
libjpeg/9d: '--disable-dependency-tracking' option to at least be able to build
libjpeg/9d: the package (albeit without support for automatic dependency tracking).
libjpeg/9d: See `config.log' for more details
libjpeg/9d: configure: WARNING: cache variable lt_cv_path_LD contains a newline
libjpeg/9d:
libjpeg/9d: ERROR: Package '2e90c2fe2f69846019f521f2004427fb191035af' build failed
libjpeg/9d: WARN: Build folder C:\Users\username\.conan\data\libjpeg\9d\_\_\build\2e90c2fe2f69846019f521f2004427fb191035af
ERROR: libjpeg/9d: Error in build() method, line 100
autotools = self._configure_autotools()
while calling '_configure_autotools', line 88
self._autotools.configure(configure_dir=self._source_subfolder, args=config_args)
ConanException: Error 1 while executing /c/users/username/.conan/data/libjpeg/9d/_/_/build/2e90c2fe2f69846019f521f2004427fb191035af/source_subfolder/configure --prefix=/c/users/username/.conan/data/libjpeg/9d/_/_/package/2e90c2fe2f69846019f521f2004427fb191035af --enable-shared=no --enable-static=yes --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
I have found several people with the similar error (not while installing OpenCV though) but I have not managed to find any solution.
## ----------- ##
## Core tests. ##
## ----------- ##
<...>
conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:4415: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libjpeg"
| #define PACKAGE_TARNAME "libjpeg"
| #define PACKAGE_VERSION "9.4.0"
| #define PACKAGE_STRING "libjpeg 9.4.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libjpeg"
| #define VERSION "9.4.0"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4440: result: x86_64-w64-mingw32-gcc -E
configure:4460: x86_64-w64-mingw32-gcc -E -DLIBJPEG_BUILDING conftest.c
configure:4460: $? = 0
configure:4474: x86_64-w64-mingw32-gcc -E -DLIBJPEG_BUILDING conftest.c
conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:4474: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libjpeg"
| #define PACKAGE_TARNAME "libjpeg"
| #define PACKAGE_VERSION "9.4.0"
| #define PACKAGE_STRING "libjpeg 9.4.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libjpeg"
| #define VERSION "9.4.0"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4503: checking whether make sets $(MAKE)
configure:4525: result: yes
configure:4534: checking whether ln -s works
configure:4541: result: no, using cp -pR
configure:4551: checking for x86_64-w64-mingw32-ar
configure:4581: result: no
configure:4551: checking for x86_64-w64-mingw32-lib
configure:4581: result: no
configure:4551: checking for x86_64-w64-mingw32-link
configure:4581: result: no
configure:4595: checking for ar
configure:4611: found /c/.conan/42de2d/1/bin/usr/bin/ar
configure:4622: result: ar
configure:4648: checking the archiver (ar) interface
configure:4664: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:4664: $? = 0
configure:4666: ar cru libconftest.a conftest.o >&5
configure:4669: $? = 0
configure:4697: result: ar
configure:4726: checking if LD -Wl,--version-script works
configure:4750: x86_64-w64-mingw32-gcc -o conftest.exe -m64 -g -DLIBJPEG_BUILDING -m64 -Wl,--version-script=conftest.map conftest.c >&5
configure:4750: $? = 0
configure:4759: result: yes
configure:4772: checking for function prototypes
configure:4792: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:4792: $? = 0
configure:4800: result: yes
configure:4821: checking for grep that handles long lines and -e
configure:4879: result: /c/.conan/42de2d/1/bin/usr/bin/grep
configure:4884: checking for egrep
configure:4946: result: /c/.conan/42de2d/1/bin/usr/bin/grep -E
configure:4951: checking for ANSI C header files
configure:4971: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:4971: $? = 0
configure:5044: x86_64-w64-mingw32-gcc -o conftest.exe -m64 -g -DLIBJPEG_BUILDING -m64 conftest.c >&5
configure:5044: $? = 0
configure:5044: ./conftest.exe
configure:5044: $? = 0
configure:5055: result: yes
configure:5068: checking for sys/types.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for sys/stat.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for stdlib.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for string.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for memory.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for strings.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for inttypes.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for stdint.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5068: checking for unistd.h
configure:5068: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5068: $? = 0
configure:5068: result: yes
configure:5083: checking stddef.h usability
configure:5083: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5083: $? = 0
configure:5083: result: yes
configure:5083: checking stddef.h presence
configure:5083: x86_64-w64-mingw32-gcc -E -DLIBJPEG_BUILDING conftest.c
configure:5083: $? = 0
configure:5083: result: yes
configure:5083: checking for stddef.h
configure:5083: result: yes
configure:5083: checking for stdlib.h
configure:5083: result: yes
configure:5083: checking locale.h usability
configure:5083: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5083: $? = 0
configure:5083: result: yes
configure:5083: checking locale.h presence
configure:5083: x86_64-w64-mingw32-gcc -E -DLIBJPEG_BUILDING conftest.c
configure:5083: $? = 0
configure:5083: result: yes
configure:5083: checking for locale.h
configure:5083: result: yes
configure:5093: checking for string.h
configure:5093: result: yes
configure:5106: checking for size_t
configure:5133: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5133: $? = 0
configure:5139: result: yes
configure:5175: checking for type unsigned char
configure:5188: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5188: $? = 0
configure:5189: result: yes
configure:5200: checking for type unsigned short
configure:5213: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5213: $? = 0
configure:5214: result: yes
configure:5225: checking for type void
configure:5259: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5259: $? = 0
configure:5260: result: yes
configure:5270: checking for an ANSI C-conforming const
configure:5336: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5336: $? = 0
configure:5343: result: yes
configure:5353: checking for inline
configure:5368: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5368: $? = 0
configure:5406: result: __inline__
configure:5415: checking for broken incomplete types
configure:5428: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:5428: $? = 0
configure:5429: result: ok
configure:5441: checking for short external names
configure:5457: x86_64-w64-mingw32-gcc -o conftest.exe -m64 -g -DLIBJPEG_BUILDING -m64 conftest.c >&5
configure:5457: $? = 0
configure:5458: result: ok
configure:5471: checking to see if char is signed
configure:5508: x86_64-w64-mingw32-gcc -o conftest.exe -m64 -g -DLIBJPEG_BUILDING -m64 conftest.c >&5
configure:5508: $? = 0
configure:5508: ./conftest.exe
configure:5508: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libjpeg"
| #define PACKAGE_TARNAME "libjpeg"
| #define PACKAGE_VERSION "9.4.0"
| #define PACKAGE_STRING "libjpeg 9.4.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libjpeg"
| #define VERSION "9.4.0"
| #define HAVE_PROTOTYPES 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_UNSIGNED_CHAR 1
| #define HAVE_UNSIGNED_SHORT 1
| #define INLINE __inline__
| /* end confdefs.h. */
|
| #ifdef HAVE_STDLIB_H
| #include <stdlib.h>
| #endif
| #include <stdio.h>
| #ifdef HAVE_PROTOTYPES
| int is_char_signed (int arg)
| #else
| int is_char_signed (arg)
| int arg;
| #endif
| {
| if (arg == 189) { /* expected result for unsigned char */
| return 0; /* type char is unsigned */
| }
| else if (arg != -67) { /* expected result for signed char */
| printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
| printf("I fear the JPEG software will not work at all.\n\n");
| }
| return 1; /* assume char is signed otherwise */
| }
| char signed_char_check = (char) (-67);
| int main() {
| exit(is_char_signed((int) signed_char_check));
| }
configure:5515: result: yes
configure:5523: checking to see if right shift is signed
configure:5563: x86_64-w64-mingw32-gcc -o conftest.exe -m64 -g -DLIBJPEG_BUILDING -m64 conftest.c >&5
configure:5563: $? = 0
configure:5563: ./conftest.exe
configure:5563: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libjpeg"
| #define PACKAGE_TARNAME "libjpeg"
| #define PACKAGE_VERSION "9.4.0"
| #define PACKAGE_STRING "libjpeg 9.4.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libjpeg"
| #define VERSION "9.4.0"
| #define HAVE_PROTOTYPES 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_UNSIGNED_CHAR 1
| #define HAVE_UNSIGNED_SHORT 1
| #define INLINE __inline__
| /* end confdefs.h. */
|
| #ifdef HAVE_STDLIB_H
| #include <stdlib.h>
| #endif
| #include <stdio.h>
| #ifdef HAVE_PROTOTYPES
| int is_shifting_signed (long arg)
| #else
| int is_shifting_signed (arg)
| long arg;
| #endif
| /* See whether right-shift on a long is signed or not. */
| {
| long res = arg >> 4;
|
| if (res == -0x7F7E80CL) { /* expected result for signed shift */
| return 1; /* right shift is signed */
| }
| /* see if unsigned-shift hack will fix it. */
| /* we can't just test exact value since it depends on width of long... */
| res |= (~0L) << (32-4);
| if (res == -0x7F7E80CL) { /* expected result now? */
| return 0; /* right shift is unsigned */
| }
| printf("Right shift isn't acting as I expect it to.\n");
| printf("I fear the JPEG software will not work at all.\n\n");
| return 0; /* try it with unsigned anyway */
| }
| int main() {
| exit(is_shifting_signed(-0x7F7E80B1L));
| }
configure:5570: result: yes
configure:5578: checking to see if fopen accepts b spec
configure:5597: x86_64-w64-mingw32-gcc -o conftest.exe -m64 -g -DLIBJPEG_BUILDING -m64 conftest.c >&5
configure:5597: $? = 0
configure:5597: ./conftest.exe
configure:5597: $? = 0
configure:5598: result: yes
configure:5620: checking for x86_64-w64-mingw32-as
configure:5650: result: no
configure:5660: checking for as
configure:5676: found /c/.conan/42de2d/1/bin/usr/bin/as
configure:5687: result: as
configure:5712: checking for x86_64-w64-mingw32-dlltool
configure:5742: result: no
configure:5752: checking for dlltool
configure:5768: found /c/.conan/42de2d/1/bin/usr/bin/dlltool
configure:5779: result: dlltool
configure:5804: checking for x86_64-w64-mingw32-objdump
configure:5834: result: no
configure:5844: checking for objdump
configure:5860: found /c/.conan/42de2d/1/bin/usr/bin/objdump
configure:5871: result: objdump
configure:5962: checking how to print strings
configure:5989: result: printf
configure:6010: checking for a sed that does not truncate output
configure:6074: result: /c/.conan/42de2d/1/bin/usr/bin/sed
configure:6092: checking for fgrep
configure:6154: result: /c/.conan/42de2d/1/bin/usr/bin/grep -F
configure:6189: checking for ld used by x86_64-w64-mingw32-gcc
configure:6256: result: C:/Program
Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/bin/ld.exe
configure:6263: checking if the linker (C:/Program
Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld
configure:6278: result: no
configure:6290: checking for BSD- or MS-compatible name lister (nm)
configure:6344: result: /c/.conan/42de2d/1/bin/usr/bin/nm -B
configure:6474: checking the name lister (/c/.conan/42de2d/1/bin/usr/bin/nm -B) interface
configure:6481: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:6484: /c/.conan/42de2d/1/bin/usr/bin/nm -B "conftest.o"
configure:6487: output
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_aranges
0000000000000000 N .debug_info
0000000000000000 N .debug_line
0000000000000000 r .rdata$zzz
0000000000000000 t .text
0000000000000000 B some_variable
configure:6494: result: BSD nm
configure:6498: checking the maximum length of command line arguments
configure:6629: result: 8192
configure:6677: checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format
configure:6717: result: func_convert_file_msys_to_w32
configure:6724: checking how to convert x86_64-w64-mingw32 file names to toolchain format
configure:6744: result: func_convert_file_msys_to_w32
configure:6751: checking for C:/Program
Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/bin/ld.exe option to reload object files
configure:6758: result: -r
configure:6792: checking for x86_64-w64-mingw32-objdump
configure:6819: result: objdump
configure:6888: checking how to recognize dependent libraries
configure:7088: result: file_magic ^x86 archive import|^x86 DLL
configure:7133: checking for x86_64-w64-mingw32-dlltool
configure:7160: result: dlltool
configure:7230: checking how to associate runtime and link libraries
configure:7257: result: func_cygming_dll_for_implib
configure:7273: checking for x86_64-w64-mingw32-ar
configure:7300: result: ar
configure:7381: checking for archiver #FILE support
configure:7398: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:7398: $? = 0
configure:7401: ar cru libconftest.a #conftest.lst >&5
configure:7404: $? = 0
configure:7409: ar cru libconftest.a #conftest.lst >&5
ar: conftest.o: No such file or directory
configure:7412: $? = 1
configure:7424: result: #
configure:7442: checking for x86_64-w64-mingw32-strip
configure:7472: result: no
configure:7482: checking for strip
configure:7498: found /c/.conan/42de2d/1/bin/usr/bin/strip
configure:7509: result: strip
configure:7541: checking for x86_64-w64-mingw32-ranlib
configure:7571: result: no
configure:7581: checking for ranlib
configure:7597: found /c/.conan/42de2d/1/bin/usr/bin/ranlib
configure:7608: result: ranlib
configure:7710: checking command to parse /c/.conan/42de2d/1/bin/usr/bin/nm -B output from x86_64-w64-mingw32-gcc object
configure:7863: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
configure:7866: $? = 0
configure:7870: /c/.conan/42de2d/1/bin/usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm
configure:7873: $? = 0
configure:7939: x86_64-w64-mingw32-gcc -o conftest.exe -m64 -g -DLIBJPEG_BUILDING -m64 conftest.c conftstm.o >&5
configure:7942: $? = 0
configure:7980: result: ok
configure:8027: checking for sysroot
configure:8057: result: no
configure:8064: checking for a working dd
configure:8102: result: /c/.conan/42de2d/1/bin/usr/bin/dd
configure:8106: checking how to truncate binary pipes
configure:8121: result: /c/.conan/42de2d/1/bin/usr/bin/dd bs=4096 count=1
configure:8410: checking for x86_64-w64-mingw32-mt
configure:8440: result: no
configure:8450: checking for mt
configure:8480: result: no
configure:8500: checking if : is a manifest tool
configure:8506: : '-?'
configure:8514: result: no
configure:9188: checking for dlfcn.h
configure:9188: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING conftest.c >&5
conftest.c:62:10: fatal error: dlfcn.h: No such file or directory
#include <dlfcn.h>
^~~~~~~~~
compilation terminated.
configure:9188: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libjpeg"
| #define PACKAGE_TARNAME "libjpeg"
| #define PACKAGE_VERSION "9.4.0"
| #define PACKAGE_STRING "libjpeg 9.4.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libjpeg"
| #define VERSION "9.4.0"
| #define HAVE_PROTOTYPES 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_UNSIGNED_CHAR 1
| #define HAVE_UNSIGNED_SHORT 1
| #define INLINE __inline__
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
|
| #include <dlfcn.h>
configure:9188: result: no
configure:9442: checking for objdir
configure:9457: result: .libs
configure:9717: checking if x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions
configure:9735: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING -fno-rtti -fno-exceptions conftest.c >&5
cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
configure:9739: $? = 0
configure:9752: result: no
configure:10110: checking for x86_64-w64-mingw32-gcc option to produce PIC
configure:10117: result: -DDLL_EXPORT -DPIC
configure:10125: checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works
configure:10143: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING -DDLL_EXPORT -DPIC -DPIC conftest.c >&5
configure:10147: $? = 0
configure:10160: result: yes
configure:10189: checking if x86_64-w64-mingw32-gcc static flag -static works
configure:10217: result: yes
configure:10232: checking if x86_64-w64-mingw32-gcc supports -c -o file.o
configure:10253: x86_64-w64-mingw32-gcc -c -m64 -g -DLIBJPEG_BUILDING -o out/conftest2.o conftest.c >&5
configure:10257: $? = 0
configure:10279: result: yes
configure:10287: checking if x86_64-w64-mingw32-gcc supports -c -o file.o
configure:10334: result: yes
configure:10367: checking whether the x86_64-w64-mingw32-gcc linker (C:/Program
Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries
configure:11626: result: yes
configure:11866: checking dynamic linker characteristics
configure:12684: result: Win32 ld.exe
configure:12806: checking how to hardcode library paths into programs
configure:12831: result: immediate
configure:13379: checking whether stripping libraries is possible
configure:13384: result: yes
configure:13419: checking if libtool supports shared libraries
configure:13421: result: yes
configure:13424: checking whether to build shared libraries
configure:13449: result: no
configure:13452: checking whether to build static libraries
configure:13456: result: yes
configure:13575: checking libjpeg version number
configure:13585: result: 9.4.0
configure:13617: WARNING: cache variable lt_cv_path_LD contains a newline
configure:13699: checking that generated files are newer than configure
configure:13705: result: done
configure:13736: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by libjpeg config.status 9.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on DESKTOP-GGV5QKI
config.status:1114: creating Makefile
config.status:1114: creating libjpeg.pc
config.status:1114: creating jconfig.h
config.status:1328: executing depfiles commands
config.status:1405: cd . && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles
/tmp/GmP09nS0:326: *** missing separator. Stop.
config.status:1410: $? = 2
config.status:1414: error: in `/c/users/username/.conan/data/libjpeg/9d/_/_/build/2e90c2fe2f69846019f521f2004427fb191035af':
config.status:1416: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details

You likely made a modification to a Makefile.am that caused autoreconf and/or configure to fail. Run,
rm -f config.h* configure
to clean up, then run,
autoreconf; ./configure
to reconfigure. Of course, if you haven't undone the assumed, offending change to your Makefile.am in the meantime, you're going to end up in the same spot.

It is very possible that the libjpeg library doesn't compile with autotools and/or makefiles in the MinGW tool suite. Even if it is a gcc for Windows, it is not like all the code is fully portable between platforms, and those autotools or Makefiles might do some assumptions of platform that are not correct in Windows.
In general, the Visual Studio toolchain (MSBuild, cl.exe) is better supported in Windows platforms by the community, could be considered the default to-go, especially nowadays that the Visual Studio Community editions are completely free.
The packages in ConanCenter are also typically (and most of them, the ones created from the conan-center-index repo) built and tested with Visual Studio (several versions), so the support is expected to be much better than the one for MinGW.

Related

how to configure bazel toolchain for cross compile use rules_foreign_cc

my project need cross compile for arm aarch64 on ubuntu x86_64, but failed at configure stage, below is log
log
# Execution platform: //platforms:linux_gcc9_aarch64
SUBCOMMAND: # #boost//:filesystem [action 'Linking external/boost/libfilesystem.so', configuration: fc89852de14da3c51e8226c7c5e3087929e4f56710d05ed9ab86ed21b8eb16d4, execution platform: //platforms:linux_gcc9_aarch64]
(cd /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo && \
exec env - \
PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/root/src/go/bin:/usr/local/jdk-11.0.15/bin:/root/.ft:/data/.cache/npm/global/bin \
PWD=/proc/self/cwd \
external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -shared -o bazel-out/k8-fastbuild/bin/external/boost/libfilesystem.so bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/codecvt_error_category.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/directory.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/exception.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/operations.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/path.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/path_traits.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/portability.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/unique_path.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/utf8_codecvt_facet.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/windows_file_codecvt.o -Wl,-S -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes '-fuse-ld=gold')
# Configuration: fc89852de14da3c51e8226c7c5e3087929e4f56710d05ed9ab86ed21b8eb16d4
# Execution platform: //platforms:linux_gcc9_aarch64
ERROR: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/external/rules_foreign_cc/toolchains/BUILD.bazel:130:10: BootstrapGNUMake external/rules_foreign_cc/toolchains/make failed: (Exit 1): bash failed: error executing command
(cd /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo && \
exec env - \
PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/root/src/go/bin:/usr/local/jdk-11.0.15/bin:/root/.ft:/data/.cache/npm/global/bin \
/bin/bash -c bazel-out/k8-opt-exec-277332AD/bin/external/rules_foreign_cc/toolchains/make_tool_foreign_cc/wrapper_build_script.sh)
# Configuration: 920514b75167e08aaf5b08b6fc5ff1721a7e3be841d2c442cd3624a15e568e52
# Execution platform: //platforms:linux_gcc9_aarch64
rules_foreign_cc: Build failed!
rules_foreign_cc: Keeping temp build directory and dependencies directory for debug.
rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag.
rules_foreign_cc: Printing build logs:
_____ BEGIN BUILD LOGS _____
+ AR=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc-ar
+ ARFLAGS=rcsD
+ CC=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
+ CFLAGS='-fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -march=armv8-a -g0 -O3 -DNDEBUG -D_FORTIFY_SOURCE=2 -ffunction-sections -fdata-sections -funsafe-math-optimizations -ftree-vectorize -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted'
+ LD=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
+ LDFLAGS='-lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -Wl,--gc-sections'
+ ./configure --without-guile --with-guile=no --disable-dependency-tracking --prefix=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-277332AD/bin/external/rules_foreign_cc/toolchains/make
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-277332AD/bin/external/rules_foreign_cc/toolchains/make.build_tmpdir':
config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gperftools configure 2.9.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/com_github_gperftools_gperftools/configure --prefix=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.build_tmpdir/gperftools_build --enable-shared=no --enable-frame-pointers --disable-libunwind
## --------- ##
## Platform. ##
## --------- ##
hostname = ubuntu
uname -m = x86_64
uname -r = 5.4.0-109-generic
uname -s = Linux
uname -v = #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.ext_build_deps/bin
PATH: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo
PATH: /root/.cargo/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin
PATH: /usr/local/go/bin
PATH: /root/src/go/bin
PATH: /usr/local/jdk-11.0.15/bin
PATH: /root/.ft
PATH: /data/.cache/npm/global/bin
PATH: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.ext_build_deps/bin/toolchains
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2617: checking build system type
configure:2631: result: x86_64-pc-linux-gnu
configure:2651: checking host system type
configure:2664: result: x86_64-pc-linux-gnu
configure:2700: checking for a BSD-compatible install
configure:2768: result: /usr/bin/install -c
configure:2779: checking whether build environment is sane
configure:2834: result: yes
configure:2978: checking for a thread-safe mkdir -p
configure:3017: result: /bin/mkdir -p
configure:3024: checking for gawk
configure:3040: found /usr/bin/gawk
configure:3051: result: gawk
configure:3062: checking whether /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make sets $(MAKE)
configure:3084: result: yes
configure:3113: checking whether /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make supports nested variables
configure:3130: result: yes
configure:3260: checking whether to enable maintainer-specific portions of Makefiles
configure:3269: result: no
configure:3296: checking for git
configure:3314: found /usr/local/bin/git
configure:3327: result: /usr/local/bin/git
configure:3400: checking whether /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make supports the include directive
configure:3415: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make -f confmf.GNU && cat confinc.out
this is the am__doit target
configure:3418: $? = 0
configure:3437: result: yes (GNU style)
configure:3507: checking for gcc
configure:3534: result: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
configure:3763: checking for C compiler version
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc --version >&5
aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3783: $? = 0
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/external/gcc9_arm_aarch64/bin/../libexec/gcc/aarch64-none-linux-gnu/9.2.1/lto-wrapper
Target: aarch64-none-linux-gnu
Configured with: /tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/src/gcc/configure --target=aarch64-none-linux-gnu --prefix= --with-sysroot=/aarch64-none-linux-gnu/libc --with-build-sysroot=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/install//aarch64-none-linux-gnu/libc --with-bugurl=https://bugs.linaro.org/ --enable-gnu-indirect-function --enable-shared --disable-libssp --disable-libmudflap --enable-checking=release --enable-languages=c,c++,fortran --with-gmp=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --with-mpfr=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --with-mpc=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --with-isl=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --enable-fix-cortex-a53-843419 --with-pkgversion='GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)'
Thread model: posix
gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))
configure:3783: $? = 0
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -V >&5
aarch64-none-linux-gnu-gcc: error: unrecognized command line option '-V'
aarch64-none-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3783: $? = 1
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -qversion >&5
aarch64-none-linux-gnu-gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
aarch64-none-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3783: $? = 1
configure:3803: checking whether the C compiler works
configure:3825: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -lpthread conftest.c >&5
configure:3829: $? = 0
configure:3877: result: yes
configure:3880: checking for C compiler default output file name
configure:3882: result: a.out
configure:3888: checking for suffix of executables
configure:3895: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -o conftest -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -lpthread conftest.c >&5
configure:3899: $? = 0
configure:3921: result:
configure:3943: checking whether we are cross compiling
configure:3951: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -o conftest -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -lpthread conftest.c >&5
configure:3955: $? = 0
configure:3962: ./conftest
/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/com_github_gperftools_gperftools/configure: line 3964: ./conftest: cannot execute binary file: Exec format error
configure:3966: $? = 126
configure:3973: error: in `/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.build_tmpdir':
configure:3975: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
bazel toolchain configuration:
toolchain:
http_archive(
name = "gcc9_arm_aarch64",
build_file = "#bazel_build_file_repo//bazel:gcc_arm_aarch64.BUILD",
sha256 = "8dfe681531f0bd04fb9c53cf3c0a3368c616aa85d48938eebe2b516376e06a66",
strip_prefix = "gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu",
#urls = ["https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz"],
urls = ["file:///root/src/cpp/toolchains/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz"],
)
platform config
constraint_setting(name = "gcc_version")
constraint_value(
name = "gcc_9",
constraint_setting = ":gcc_version",
)
constraint_value(
name = "gcc_10",
constraint_setting = ":gcc_version",
)
constraint_value(
name = "gcc_11",
constraint_setting = ":gcc_version",
)
platform(
name = "linux_gcc9_aarch64",
constraint_values = [
"#platforms//cpu:aarch64",
"#platforms//os:linux",
":gcc_9",
],
)
toolchain config
toolchain(
name = "gcc9_arm_aarch64_xcompile_toolchain",
exec_compatible_with = [
"#platforms//cpu:x86_64",
"#platforms//os:linux",
],
target_compatible_with = [
"#platforms//cpu:aarch64",
"#platforms//os:linux",
"//platforms:gcc_9",
],
toolchain = "#gcc9_arm_aarch64//:cc_toolchain",
toolchain_type = "#bazel_tools//tools/cpp:toolchain_type",
)
here is a very tiny demo to reproduce it:
[enter link description here][https://github.com/xiedeacc/bazel_simple_demo.git]

Unresolved reference to dgemm when using OpenBLAS

I have been trying for some time to compile and link the OpenBLAS lib to multiply to matrices together using dgemm. I finally was able to compile the OpenBLAS after installing MSYS2 and the mingw64 packages from MSYS2 using pacman. My intention is to use the OpenBLAS as a static lib. So I wrote a simple fortran code to multiply the matrices together using dgemm. Here is the fortran code:
program gcc_fun
implicit none
! Variables
real*8 x(2,2),y(2,2),z(2,2)
x(1,1) = 3.d0
x(2,1) = 2.d0
x(1,2) = 1.d0
x(2,2) = 4.d0
y(1,1) = .5d0
y(2,1) = 1.d0
y(1,2) = 2.d0
y(2,2) = .75d0
call dgemm( 'n', 'n', 2, 2, 2, 1,x,2,y, 2, 1, z, 1)
! Body of gcc_fun
print *, 'Z = ', z
end program gcc_fun
Here is my makefile to try and link:
CCC = gcc -g -Iincludem -Iincludev -c -O0
WARN = -Wall
CCCX = x86_64-w64-mingw32-g++ -m64 -s -Iincludem -Iincludev -c -O2 -DNDEBUG
fort = x86_64-w64-mingw32-gfortran -s -Iincludem -Iincludev -fno-underscoring -c -O2 -DNDEBUG
#fort = x86_64-w64-mingw32-gfortran -s -Iincludem -Iincludev -c -O2 -DNDEBUG
OBJECTS = \
obj/gcc_fun.o
#-----------------------------------------------------------------------------------
# Make the Guidance Object Library (GNC_Lib.a) and the Executable (guideUnitTest)
#-----------------------------------------------------------------------------------
gcc_fun.exe: $(OBJECTS)
x86_64-w64-mingw32-gfortran -o gcc_fun.exe -L./ -lopenblas_haswell-r0.3.10 $(OBJECTS)
#------------------------------------------
# object file targets
#------------------------------------------
obj/gcc_fun.o: \
gcc_fun.f90
$(fort) $(WARN) -o $# gcc_fun.f90
I run the make file with make -f makefile_name and get unresolved reference to dgemm. I have tried it with and without the no-underscoring option to no avail. Here is the actual error:
$ make -f Makefile_gcc_fun.mak
x86_64-w64-mingw32-gfortran -s -Iincludem -Iincludev -fno-underscoring -c -O2 -DNDEBUG -Wall -o obj/gcc_fun.o gcc_fun.f90
f951.exe: Warning: Nonexistent include directory 'includem' [-Wmissing-include-dirs]
f951.exe: Warning: Nonexistent include directory 'includev' [-Wmissing-include-dirs]
gcc_fun.f90:27:2:
27 | x(2,1) = 2.d0
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
gcc_fun.f90:28:2:
28 | x(1,2) = 1.d0
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
gcc_fun.f90:29:2:
29 | x(2,2) = 4.d0
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
gcc_fun.f90:31:2:
31 | y(2,1) = 1.d0
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
gcc_fun.f90:32:2:
32 | y(1,2) = 2.d0
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
gcc_fun.f90:33:2:
33 | y(2,2) = .75d0
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
x86_64-w64-mingw32-gfortran -o gcc_fun.exe -L./ -lopenblas_haswell-r0.3.10 obj/gcc_fun.o
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/gcc_fun.o:gcc_fun.f90:(.text+0xf5): undefined reference to `dgemm'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile_gcc_fun.mak:19: gcc_fun.exe] Error 1
When I inspect the OpenBLAS library with nm I get this:
$ nm -g libopenblas_haswell-r0.3.10.a | grep dgemm
dgemm.obj:
0000000000000000 T dgemm_
So it looks like dgemm is an external object and I should be able to call it. I am sure I am missing something easy so thanks for any help.
The subroutine is just dgemm, not dgemm_. You just call it
call dgemm()
The symbol name you see using nm can differ depending on your toolchain (compiler, operating system,...). It matters if you do interoperability of different programming languages. However, if you stay within Fortran, you do not need to worry without it.
Important:
The static library being linked should be placed after the file that uses the library in the linking command. Only then the dependecies can be resolved. If this is the actual issue, we will have some duplicates to link to.

Is it possible for C/C++ preprocessor to detect some compiler options?

I have a function with
static int include[MAX_NODE_NUMBER][MAX_NODE_NUMBER][MAX_NODE_NUMBER*MAX_NODE_NUMBER];
static bool calculated[MAX_NODE_NUMBER][MAX_NODE_NUMBER][MAX_NODE_NUMBER*MAX_NODE_NUMBER]={};
where MAX_NODE_NUMBER is 200. This can be compiled only when -mcmodel=large is in the gcc/g++ option. The two static variables are only to cache some data so they are not so necessary. Is it possible to code like
#if <some condition>
static int include[MAX_NODE_NUMBER][MAX_NODE_NUMBER][MAX_NODE_NUMBER*MAX_NODE_NUMBER];
static bool calculated[MAX_NODE_NUMBER][MAX_NODE_NUMBER][MAX_NODE_NUMBER*MAX_NODE_NUMBER]={};
#endif
so the program can be compiled for both large memory and small memory.
g++ defines:
$ g++ -E -dD -xc++ /dev/null | grep -i model
#define __code_model_small__ 1
$ g++ -E -dD -xc++ -mcmodel=large /dev/null | grep -i model
#define __code_model_large__ 1
Alternatively:
$ diff <(g++ -E -dD -xc++ /dev/null) <(g++ -E -dD -xc++ -mcmodel=large /dev/null)
270c270
< #define __code_model_small__ 1
---
> #define __code_model_large__ 1
you have command line option -D where you can define symbol
for example
-DMODEL_LARGE
then in your source file:
#ifdef MODEL_LARGE
static int include[MAX_NODE_NUMBER][MAX_NODE_NUMBER][MAX_NODE_NUMBER*MAX_NODE_NUMBER];
static bool calculated[MAX_NODE_NUMBER][MAX_NODE_NUMBER][MAX_NODE_NUMBER*MAX_NODE_NUMBER]={};
#endif

./configure cannot not find a working compiler while building gmp library with MSYS2

I'm trying to build gmp-6.1.2 on Windows using MSYS2 with ./configure --enable-cxx command. I get the following error:
configure: error: could not find a working compiler, see config.log for details
Below is the content of config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU MP configure 6.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --enable-cxx
## --------- ##
## Platform. ##
## --------- ##
hostname = computer-name
uname -m = x86_64
uname -r = 2.11.1(0.329/5/3)
uname -s = MINGW64_NT-10.0
uname -v = 2018-09-10 14:19
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /mingw64/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /c/Windows/System32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2885: loading site script /mingw64/etc/config.site
| # This file is in public domain.
| # Original author: Karlson2k (Evgeny Grin)
| # Written for MSys2/MinGW64 to help running 'configure' scripts
|
| # Defaults for MinGW64-targeted programs
|
| # Set proper selfname on bash and fallback to default name on other shells
| test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site
|
| # Set default 'host' to speedup configure
| if test -z "$build_alias"; then
| build_alias="${MSYSTEM_CHOST-x86_64-w64-mingw32}" && \
| $as_echo "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5
| fi
|
| # Set default 'prefix' to "/mingw64"
| if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \
| ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then
| prefix="${MSYSTEM_PREFIX-/mingw64}" && \
| $as_echo "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5
| fi
config.site:13: default build_alias set to x86_64-w64-mingw32
config.site:20: default prefix set to /mingw64
configure:3055: checking build system type
configure:3069: result: x86_64-w64-mingw32
configure:3089: checking host system type
configure:3102: result: x86_64-w64-mingw32
configure:3139: checking for a BSD-compatible install
configure:3207: result: /usr/bin/install -c
configure:3218: checking whether build environment is sane
configure:3273: result: yes
configure:3424: checking for a thread-safe mkdir -p
configure:3463: result: /usr/bin/mkdir -p
configure:3470: checking for gawk
configure:3486: found /usr/bin/gawk
configure:3497: result: gawk
configure:3508: checking whether make sets $(MAKE)
configure:3534: result: no
configure:3559: checking whether make supports nested variables
configure:3576: result: no
configure:3705: checking whether to enable maintainer-specific portions of Makefiles
configure:3714: result: no
User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=64 x32 32
cclist=gcc icc cc
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer -m64 conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc -O
Test compile:
configure:5872: cc -O conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -mx32
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer -mx32 conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc
Test compile:
configure:5872: cc conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5872: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: icc -c conftest.c >&5
./configure: line 5780: icc: command not found
configure:5782: $? = 127
configure:5801: icc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler icc -no-gcc
Test compile:
configure:5872: icc -no-gcc conftest.c >&5
./configure: line 5873: icc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc -O
Test compile:
configure:5872: cc -O conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:7200: error: could not find a working compiler, see config.log for details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-w64-mingw32
ac_cv_env_ABI_set=
ac_cv_env_ABI_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_BUILD_set=
ac_cv_env_CC_FOR_BUILD_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_FOR_BUILD_set=
ac_cv_env_CPP_FOR_BUILD_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_M4_set=
ac_cv_env_M4_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-w64-mingw32
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=no
am_cv_make_support_nested_variables=no
## ----------------- ##
## Output variables. ##
## ----------------- ##
ABI=''
ACLOCAL='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing aclocal-1.15'
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='1'
AM_DEFAULT_VERBOSITY='1'
AM_V='1'
AR=''
AS=''
ASMFLAGS=''
AUTOCONF='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing autoconf'
AUTOHEADER='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing autoheader'
AUTOMAKE='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing automake-1.15'
AWK='gawk'
CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
CC=''
CCAS=''
CC_FOR_BUILD=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CPP_FOR_BUILD=''
CXX=''
CXXCPP=''
CXXFLAGS=''
CYGPATH_W='cygpath -w'
DEFN_LONG_LONG_LIMB=''
DEFS=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
EXEEXT=''
EXEEXT_FOR_BUILD=''
FGREP=''
GMP_LDFLAGS=''
GMP_LIMB_BITS=''
GMP_NAIL_BITS='0'
GREP=''
HAVE_CLOCK_01=''
HAVE_CPUTIME_01=''
HAVE_GETRUSAGE_01=''
HAVE_GETTIMEOFDAY_01=''
HAVE_HOST_CPU_FAMILY_power='0'
HAVE_HOST_CPU_FAMILY_powerpc='0'
HAVE_SIGACTION_01=''
HAVE_SIGALTSTACK_01=''
HAVE_SIGSTACK_01=''
HAVE_STACK_T_01=''
HAVE_SYS_RESOURCE_H_01=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBCURSES=''
LIBGMPXX_LDFLAGS=''
LIBGMP_DLL=''
LIBGMP_LDFLAGS=''
LIBM=''
LIBM_FOR_BUILD=''
LIBOBJS=''
LIBREADLINE=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
M4=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='gmp'
PACKAGE_BUGREPORT='gmp-bugs#gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 6.1.2'
PACKAGE_TARNAME='gmp'
PACKAGE_URL='http://www.gnu.org/software/gmp/'
PACKAGE_VERSION='6.1.2'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP=''
TAL_OBJECT=''
TUNE_LIBS=''
TUNE_SQR_OBJ=''
U_FOR_BUILD=''
VERSION='6.1.2'
WANT_CXX_FALSE=''
WANT_CXX_TRUE=''
WITH_READLINE_01=''
YACC=''
YFLAGS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__isrc=''
am__leading_dot='.'
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-w64-mingw32'
build_alias='x86_64-w64-mingw32'
build_cpu='x86_64'
build_os='mingw32'
build_vendor='w64'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='x86_64-w64-mingw32'
host_alias=''
host_cpu='x86_64'
host_os='mingw32'
host_vendor='w64'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
mpn_objects=''
mpn_objs_in_libgmp=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/mingw64'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "GNU MP"
#define PACKAGE_TARNAME "gmp"
#define PACKAGE_VERSION "6.1.2"
#define PACKAGE_STRING "GNU MP 6.1.2"
#define PACKAGE_BUGREPORT "gmp-bugs#gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
#define PACKAGE "gmp"
#define VERSION "6.1.2"
#define WANT_FFT 1
#define HAVE_HOST_CPU_x86_64 1
#define HOST_DOS64 1
configure: exit 1
Definitely, $CC is empty. I have gcc installed with MinGW so I tried to assign /c/MinGW/bin/gcc.exe to $CC but that didn't work either.
I know there are similar questions but none of those solutions solves my problem.

checking whether g++ can link programs

I received the following error in the logs while I was trying to build glibc:
configure:3180: checking whether g++ can link programs
configure:3203: g++ -o conftest -g -O2 conftest.cpp >&5
configure:3203: $? = 0
configure:3226: g++ -o conftest -g -O2 -static conftest.cpp >&5
/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lm
/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
configure:3226: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "glibc"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "http://sourceware.org/bugzilla/"
| #define PACKAGE_URL "http://www.gnu.org/software/glibc/"
| #define PKGVERSION "(GNU libc) "
| #define REPORT_BUGS_TO "<http://www.gnu.org/software/libc/bugs.html>"
| /* end confdefs.h. */
|
| #include <iostream>
|
| int
| main()
| {
| std::cout << "Hello, world!";
| return 0;
| }
|
configure:3241: result: no
configure:3248: error: you must configure in a separate build directory
Any ideas how to fix it?
How to reproduce it:
Download the glibc from here and try to make ./configure.
I think the error itself if is a good hint? It says you should configure in a build directory, so make a directory called build in the top source directory and cd to it then run ../configure.