LINUX.ORG.RU

А получается ли его скомпилить более традиционными методами? А то, может, дело не в bmake, а в самом gcc?

blex ★★★
()
Ответ на: комментарий от blex

А то, может, дело не в bmake, а в самом gcc?

Возможно, попробую чем-то другим. В последний раз компилировал bmake более года назад, тогда gcc был старее.

dataman ★★★★★
() автор топика

gcc version 12.2.0 (Debian 12.2.0-14)

user@computer:/tmp/bmake$ ./configure 
checking whether system has timezone Europe/Berlin... yes
checking for gcc... 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... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking for sys/time.h... yes
checking for vfork.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
Using: BMAKE_PATH_MAX=1024
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/param.h... yes
checking for sys/sysctl.h... no
checking for ar.h... yes
checking for err.h... yes
checking for fcntl.h... yes
checking for libgen.h... yes
checking for limits.h... yes
checking for paths.h... yes
checking for poll.h... yes
checking for ranlib.h... no
checking for regex.h... yes
checking for sys/mman.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... (cached) yes
checking for sys/uio.h... yes
checking for utime.h... yes
checking for sys/cdefs.h... yes
checking for __attribute__... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for int64_t... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uint32_t... yes
checking for gcc options needed to detect all undeclared functions... none needed
checking whether sys_siglist is declared... no
checking whether struct tm is in sys/time.h or time.h... time.h
checking for sig_atomic_t... yes
checking for fork... yes
checking for vfork... yes
checking for vprintf... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for wait3 that fills in rusage... yes
checking for err... yes
checking for errx... yes
checking for getcwd... yes
checking for getenv... yes
checking for getwd... yes
checking for killpg... yes
checking for putenv... yes
checking for select... yes
checking for setenv... yes
checking for setpgid... yes
checking for setrlimit... yes
checking for setsid... yes
checking for sigaddset... yes
checking for sigpending... yes
checking for sigprocmask... yes
checking for sigsetmask... yes
checking for sigsuspend... yes
checking for sigvec... no
checking for snprintf... yes
checking for strerror... yes
checking for stresep... no
checking for strftime... yes
checking for strsep... yes
checking for strtod... yes
checking for strtol... yes
checking for strtoll... yes
checking for strtoul... yes
checking for sysctl... no
checking for unsetenv... yes
checking for vsnprintf... yes
checking for wait3... yes
checking for wait4... yes
checking for waitpid... yes
checking for warn... yes
checking for warnx... yes
checking for getopt... yes
checking for realpath... yes
checking for dirname... yes
checking for sigaction... yes
checking for stresep... (cached) no
checking for strlcpy... no
checking for emalloc in -lutil... no
checking whether stat file-mode macros are broken... no
checking if compiler supports __func__
checking if diff -u works... yes
checking for MACHINE & MACHINE_ARCH...
defaults: MACHINE=x86_64, MACHINE_ARCH=x86_64
Using: MACHINE=x86_64, MACHINE_ARCH=x86_64
Using: MKSRC=${srcdir}/mk
configure: creating ./config.status
config.status: creating makefile
config.status: creating Makefile.config
config.status: creating unit-tests/Makefile.config
config.status: creating make-bootstrap.sh
config.status: creating config.h
config.status: config.h is unchanged

You can now run

        sh ./make-bootstrap.sh

to produce a fully functional bmake.

user@computer:/tmp/bmake$ sh ./make-bootstrap.sh
gcc -c -g -O2 -I. -I/tmp/bmake -DHAVE_CONFIG_H -DMAKE_NATIVE -DUSE_META -DBMAKE_PATH_MAX=1024 -DMAKE_VERSION="20240711" -DMACHINE="x86_64" -DMACHINE_ARCH="x86_64" -DMAKE_OS="" -D_PATH_DEFSYSPATH="/usr/local/share/mk" -o main.o /tmp/bmake/main.c
...
...
...
gcc -c -g -O2 -I. -I/tmp/bmake -DHAVE_CONFIG_H -DMAKE_NATIVE -DUSE_META -DBMAKE_PATH_MAX=1024 -o job.o /tmp/bmake/job.c
gcc -o bmake main.o job.o meta.o arch.o buf.o compat.o cond.o dir.o for.o hash.o lst.o make.o make_malloc.o metachar.o parse.o sigcompat.o str.o suff.o targ.o trace.o var.o util.o stresep.o strlcpy.o
user@computer:/tmp/bmake$ ./bmake -v
bmake: option requires an argument -- v
usage: bmake [-BeikNnqrSstWwX]
            [-C directory] [-D variable] [-d flags] [-f makefile]
            [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
            [-V variable] [-v variable] [variable=value] [target ...]
user@computer:/tmp/bmake$ 
LamerOk ★★★★★
()
Последнее исправление: LamerOk (всего исправлений: 1)

порой помогает:

-Wa,-mbig-obj

и линкеру тоже можно шепнуть про «большие объекты» (на вскидку не помню ключик)

PS это некоторые упарываются header-only, развёртывание циклов препроцессором, «я умею вставки gas» и тому подобное

MKuznetsov ★★★★★
()
Ответ на: комментарий от dataman

Раньше просто $ make срабатывал

Makefile из дистрибутива по синтаксису не совместим с GNU Make. У тебя отрабатывал какой-то другой make, который вероятно и жрал память / вис.

LamerOk ★★★★★
()

Больше 200 Мб gcc 10.2.1 не потребляет. Собирается последовательно (1 процесс) за несколько секунд на Core i5 8th gen.

Проблема не в памяти.

zx_gamer ★★★
()

Открой top перед этим, чтобы проверить, точно ли в один поток компилится

UVV ★★★★★
()
Для того чтобы оставить комментарий войдите или зарегистрируйтесь.