Genivia / ugrep

NEW ugrep 6.5: a more powerful, ultra fast, user-friendly, compatible grep. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more
https://ugrep.com
BSD 3-Clause "New" or "Revised" License
2.57k stars 109 forks source link

gcc-10 musl-1.2.4 static build build error #324

Closed terefang closed 9 months ago

terefang commented 9 months ago

this is the output from configure and make:

# CC="x86_64-linux-musl-gcc --static -I${toolchain.dir}/include" \
CXX="x86_64-linux-musl-g++ --static -I${toolchain.dir}/include" \
CFLAGS="-fPIC" \
LDFLAGS="-static" \
./configure --prefix=/usr --without-brotli --without-bzip3

[exec] checking for a BSD-compatible install... /usr/bin/install -c
     [exec] checking whether build environment is sane... yes
     [exec] checking for a race-free mkdir -p... /bin/mkdir -p
     [exec] checking for gawk... gawk
     [exec] checking whether make sets $(MAKE)... yes
     [exec] checking whether make supports nested variables... yes
     [exec] checking whether make supports the include directive... yes (GNU style)
     [exec] checking whether the C++ compiler works... yes
     [exec] checking for C++ compiler default output file name... a.out
     [exec] checking for suffix of executables... 
     [exec] checking whether we are cross compiling... no
     [exec] checking for suffix of object files... o
     [exec] checking whether the compiler supports GNU C++... yes
     [exec] checking whether x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include accepts -g... yes
     [exec] checking for x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include option to enable C++11 features... none needed
     [exec] checking dependency style of x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include... gcc3
     [exec] checking whether x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include supports C++11 features with -std=gnu++11... yes
     [exec] checking for dirent.h that defines DIR... yes
     [exec] checking for library containing opendir... none required
     [exec] checking for struct dirent.d_ino... yes
     [exec] checking for struct dirent.d_type... yes
     [exec] checking build system type... x86_64-pc-linux-gnu
     [exec] checking host system type... x86_64-pc-linux-gnu
     [exec] checking for stdio.h... yes
     [exec] checking for stdlib.h... yes
     [exec] checking for string.h... yes
     [exec] checking for inttypes.h... yes
     [exec] checking for stdint.h... yes
     [exec] checking for strings.h... yes
     [exec] checking for sys/stat.h... yes
     [exec] checking for sys/types.h... yes
     [exec] checking for unistd.h... yes
     [exec] checking for sys/param.h... yes
     [exec] checking for getpagesize... yes
     [exec] checking for working mmap... yes
     [exec] checking for sys/statvfs.h... yes
     [exec] checking for sys/time.h... yes
     [exec] checking for sys/param.h... (cached) yes
     [exec] checking for sys/cpuset.h... no
     [exec] checking for sys/resource.h... yes
     [exec] checking for sched.h... yes
     [exec] checking for pthread.h... yes
     [exec] checking for statvfs... yes
     [exec] checking for sched_setaffinity... yes
     [exec] checking for cpuset_setaffinity... no
     [exec] checking for pthread_setaffinity_np... yes
     [exec] checking for pthread_setschedprio... yes
     [exec] checking for setpriority... yes
     [exec] checking for struct stat.st_atim... yes
     [exec] checking for struct stat.st_mtim... yes
     [exec] checking for struct stat.st_ctim... yes
     [exec] checking for struct stat.st_atimespec... no
     [exec] checking for struct stat.st_mtimespec... no
     [exec] checking for struct stat.st_ctimespec... no
     [exec] checking for size_t... yes
     [exec] checking for ssize_t... yes
     [exec] checking whether the compiler supports GNU C++... (cached) yes
     [exec] checking whether x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include -std=gnu++11 accepts -g... (cached) yes
     [exec] checking for x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include -std=gnu++11 option to enable C++11 features... (cached) none needed
     [exec] checking dependency style of x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include -std=gnu++11... (cached) gcc3
     [exec] checking for gcc... x86_64-linux-musl-gcc --static -IREDACTED/toolchain/include
     [exec] checking whether the compiler supports GNU C... yes
     [exec] checking whether x86_64-linux-musl-gcc --static -IREDACTED/toolchain/include accepts -g... yes
     [exec] checking for x86_64-linux-musl-gcc --static -IREDACTED/toolchain/include option to enable C11 features... none needed
     [exec] checking whether x86_64-linux-musl-gcc --static -IREDACTED/toolchain/include understands -c and -o together... yes
     [exec] checking dependency style of x86_64-linux-musl-gcc --static -IREDACTED/toolchain/include... gcc3
     [exec] checking for ar... ar
     [exec] checking the archiver (ar) interface... ar
     [exec] checking for ranlib... ranlib
     [exec] checking whether ln -s works... yes
     [exec] checking for F_RDAHEAD fcntl... no
     [exec] checking for O_NOATIME open flag... yes
     [exec] checking if PCRE2 is wanted... yes
     [exec] checking for pcre2_compile_8 in -lpcre2-8... yes
     [exec] checking for pcre2.h... yes
     [exec] checking if zlib is wanted... yes
     [exec] checking for inflateEnd in -lz... yes
     [exec] checking for zlib.h... yes
     [exec] checking if bzlib is wanted... yes
     [exec] checking for BZ2_bzRead in -lbz2... yes
     [exec] checking for bzlib.h... yes
     [exec] checking if lzma is wanted... yes
     [exec] checking for lzma_code in -llzma... yes
     [exec] checking for lzma.h... yes
     [exec] checking if lz4 is wanted... yes
     [exec] checking for LZ4_createStreamDecode in -llz4... yes
     [exec] checking for lz4.h... yes
     [exec] checking if zstd is wanted... yes
     [exec] checking for ZSTD_decompressStream in -lzstd... yes
     [exec] checking for zstd.h... yes
     [exec] checking if brotli is wanted... no
     [exec] checking if bzip3 is wanted... no
     [exec] checking for --with-grep-path... 
     [exec] checking for --with-grep-colors... 
     [exec] checking for --disable-auto-color... no
     [exec] checking for --enable-color... yes
     [exec] checking for --enable-pretty... no
     [exec] checking for --enable-pager... no
     [exec] checking for --enable-hidden... no
     [exec] checking for --disable-mmap... no
     [exec] checking for --disable-sse2... no
     [exec] checking whether x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include -std=gnu++11 supports SSE2 intrinsics... yes
     [exec] checking for --disable-avx... no
     [exec] checking whether x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include -std=gnu++11 supports AVX intrinsics... yes
     [exec] checking that generated files are newer than configure... done
     [exec] configure: creating ./config.status
     [exec] config.status: creating Makefile
     [exec] config.status: creating lib/Makefile
     [exec] config.status: creating src/Makefile
     [exec] config.status: creating config.h
     [exec] config.status: executing depfiles commands
# make -j 1
     [exec] make  all-recursive
     [exec] make[1]: Entering directory 'REDACTED/ugrep-4.3.4'
     [exec] Making all in lib
     [exec] make[2]: Entering directory 'REDACTED/ugrep-4.3.4/lib'
     [exec] x86_64-linux-musl-g++ --static -IREDACTED/toolchain/include -std=gnu++11 -DHAVE_CONFIG_H -I. -I..  -I../include -msse2 -DHAVE_AVX2 -DWITH_NO_INDENT -DWITH_NO_CODEGEN -I/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/include -I/include  -Wall -Wextra -Wunused -O2 -MT libreflex_a-convert.o -MD -MP -MF .deps/libreflex_a-convert.Tpo -c -o libreflex_a-convert.o `test -f 'convert.cpp' || echo './'`convert.cpp
     [exec] In file included from REDACTED/toolchain/include/c++/10.2.1/cstdlib:75,
     [exec]                  from REDACTED/toolchain/include/c++/10.2.1/ext/string_conversions.h:41,
     [exec]                  from REDACTED/toolchain/include/c++/10.2.1/bits/basic_string.h:6545,
     [exec]                  from REDACTED/toolchain/include/c++/10.2.1/string:55,
     [exec]                  from REDACTED/toolchain/include/c++/10.2.1/stdexcept:39,
     [exec]                  from ../include/reflex/error.h:41,
     [exec]                  from ../include/reflex/convert.h:40,
     [exec]                  from convert.cpp:37:
     [exec] REDACTED/toolchain/include/stdlib.h:44:1: error: ‘_Noreturn’ does not name a type
     [exec]    44 | _Noreturn void abort (void);
     [exec]       | ^~~~~~~~~
     [exec] REDACTED/toolchain/include/stdlib.h:46:1: error: ‘_Noreturn’ does not name a type
     [exec]    46 | _Noreturn void exit (int);
     [exec]       | ^~~~~~~~~
     [exec] REDACTED/toolchain/include/stdlib.h:47:1: error: ‘_Noreturn’ does not name a type
     [exec]    47 | _Noreturn void _Exit (int);
     [exec]       | ^~~~~~~~~
     [exec] REDACTED/toolchain/include/stdlib.h:49:1: error: ‘_Noreturn’ does not name a type
     [exec]    49 | _Noreturn void quick_exit (int);
     [exec]       | ^~~~~~~~~
     [exec] In file included from REDACTED/toolchain/include/c++/10.2.1/ext/string_conversions.h:41,
     [exec]                  from REDACTED/toolchain/include/c++/10.2.1/bits/basic_string.h:6545,
     [exec]                  from REDACTED/toolchain/include/c++/10.2.1/string:55,
     [exec]                  from REDACTED/toolchain/include/c++/10.2.1/stdexcept:39,
     [exec]                  from ../include/reflex/error.h:41,
     [exec]                  from ../include/reflex/convert.h:40,
     [exec]                  from convert.cpp:37:
     [exec] REDACTED/toolchain/include/c++/10.2.1/cstdlib:130:11: error: ‘abort’ has not been declared in ‘::’
     [exec]   130 |   using ::abort;
     [exec]       |           ^~~~~
     [exec] REDACTED/toolchain/include/c++/10.2.1/cstdlib:146:11: error: ‘exit’ has not been declared in ‘::’
     [exec]   146 |   using ::exit;
     [exec]       |           ^~~~
     [exec] REDACTED/toolchain/include/c++/10.2.1/cstdlib:160:11: error: ‘quick_exit’ has not been declared in ‘::’
     [exec]   160 |   using ::quick_exit;
     [exec]       |           ^~~~~~~~~~
     [exec] REDACTED/toolchain/include/c++/10.2.1/cstdlib:206:11: error: ‘_Exit’ has not been declared in ‘::’
     [exec]   206 |   using ::_Exit;
     [exec]       |           ^~~~~
     [exec] REDACTED/toolchain/include/c++/10.2.1/cstdlib:242:22: error: ‘_Exit’ has not been declared in ‘__gnu_cxx’
     [exec]   242 |   using ::__gnu_cxx::_Exit;
     [exec]       |                      ^~~~~
     [exec] Makefile:423: recipe for target 'libreflex_a-convert.o' failed
     [exec] make[2]: Leaving directory 'REDACTED/ugrep-4.3.4/lib'
     [exec] Makefile:466: recipe for target 'all-recursive' failed
     [exec] make[1]: Leaving directory 'REDACTED/ugrep-4.3.4'
     [exec] Makefile:366: recipe for target 'all' failed
     [exec] make[2]: *** [libreflex_a-convert.o] Error 1
     [exec] make[1]: *** [all-recursive] Error 1
     [exec] make: *** [all] Error 2
     [exec] Result: 2
terefang commented 9 months ago

ok ... seems that i need to set the --with-<lib>=<path> options for proper cross-compiling