Replies: 2 comments 2 replies
-
修改后的 Makefile.linux CFLAGS=-ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1
CLI_LDFLAGS=-Wl,--gc-sections -L/usr/lib -pthread -z relro -z now
GNB_ES_LDFLAGS=-Wl,--gc-sections -L/usr/lib -pthread -z relro -z now
ifeq ($(DEBUG),1)
CFLAGS += -g
else
CFLAGS += -O2
CLI_LDFLAGS += -s
GNB_ES_LDFLAGS += -s
endif
GNB_CRYPTO=gnb_crypto
GNB_CTL=gnb_ctl
GNB_ES=gnb_es
GNB_CLI=gnb
include Makefile.inc
GNB_CLI_OBJS = \
./src/cli/gnb.o \
./src/gnb_argv.o \
./src/unix/unix_platform.o \
./src/linux/gnb_drv_linux.o
GNB_ES_OBJS += ./src/unix/unix_platform.o
all:${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
$(GNB_CTL): $(GNB_CTL_OBJS)
${CC} -o ${GNB_CTL} ${GNB_CTL_OBJS} ${CLI_LDFLAGS}
$(GNB_ES): $(GNB_ES_OBJS) ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS}
${CC} -o ${GNB_ES} ${GNB_ES_OBJS} ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS} ${GNB_ES_LDFLAGS}
$(GNB_CRYPTO): $(CRYPTO_OBJS) ./src/cli/gnb_crypto.o
${CC} -o ${GNB_CRYPTO} ./src/cli/gnb_crypto.o ${CRYPTO_OBJS} ${CLI_LDFLAGS}
$(GNB_CLI): $(GNB_OBJS) $(GNB_CLI_OBJS) $(GNB_PF_OBJS) ${CRYPTO_OBJS} ${ZLIB_OBJS}
${CC} -o ${GNB_CLI} ${GNB_OBJS} ${GNB_CLI_OBJS} ${GNB_PF_OBJS} ${CRYPTO_OBJS} ${ZLIB_OBJS} ${CLI_LDFLAGS}
%.o:%.c
${CC} ${CFLAGS} -c -o $@ $<
install:${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
mkdir -p ./bin/
cp ${GNB_CLI} ./bin/
cp ${GNB_CTL} ./bin/
cp ${GNB_CRYPTO} ./bin/
cp ${GNB_ES} ./bin/
clean:
find . -name "*.o" -exec rm -f {} \;
rm -f ${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
rm -f core core.*
rm -f *.exe
详细编译日志 extra-x86_64-build
:: Synchronizing package databases...
core downloading...
extra downloading...
:: Starting full system upgrade...
there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [taotieren]...done
==> Making package: opengnb-git 1.4.5.b-4 (Mon Jan 22 14:51:44 2024)
==> Retrieving sources...
-> Updating opengnb-git git repo...
==> Validating source files with sha256sums...
opengnb-git ... Skipped
==> Making package: opengnb-git 1.4.5.b-4 (Mon Jan 22 14:51:49 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...
Package (7) New Version Net Change
extra/perl-error 0.17029-5 0.04 MiB
extra/perl-mailtools 2.21-7 0.10 MiB
extra/perl-timedate 2.33-5 0.08 MiB
extra/git 2.43.0-1 26.44 MiB
extra/libnatpmp 20230423-2 0.04 MiB
extra/miniupnpc 2.2.6-1 0.13 MiB
extra/patchelf 0.18.0-1 0.24 MiB
Total Installed Size: 27.06 MiB
:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing perl-error...
installing perl-timedate...
installing perl-mailtools...
installing git...
Optional dependencies for git
tk: gitk and git gui
openssh: ssh transport and crypto
perl-libwww: git svn
perl-term-readkey: git svn and interactive.singlekey setting
perl-io-socket-ssl: git send-email TLS support
perl-authen-sasl: git send-email TLS support
perl-mediawiki-api: git mediawiki support
perl-datetime-format-iso8601: git mediawiki support
perl-lwp-protocol-https: git mediawiki https support
perl-cgi: gitweb (web interface) support
python: git svn & git p4
subversion: git svn
org.freedesktop.secrets: keyring credential helper
libsecret: libsecret credential helper [installed]
installing libnatpmp...
installing patchelf...
installing miniupnpc...
:: Running post-transaction hooks...
(1/1) Warn about old perl modules
==> Retrieving sources...
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
-> Creating working copy of opengnb-git git repo...
Cloning into 'opengnb-git'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Starting build()...
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_core.o src/gnb_core.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_daemon.o src/gnb_daemon.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_worker.o src/gnb_worker.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_ctl_block.o src/gnb_ctl_block.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_address.o src/gnb_address.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_primary_worker.o src/gnb_primary_worker.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_pf_worker.o src/gnb_pf_worker.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_node_worker.o src/gnb_node_worker.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_index_worker.o src/gnb_index_worker.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_index_service_worker.o src/gnb_index_service_worker.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_detect_worker.o src/gnb_detect_worker.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_conf.o src/gnb_conf.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_conf_file.o src/gnb_conf_file.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_config_lite.o src/gnb_config_lite.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_node.o src/gnb_node.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_udp.o src/gnb_udp.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_payload16.o src/gnb_payload16.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_ring_buffer_fixed.o src/gnb_ring_buffer_fixed.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_time.o src/gnb_time.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_lru32.o src/gnb_lru32.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_fixed_pool.o src/gnb_fixed_pool.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_doubly_linked_list.o src/gnb_doubly_linked_list.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_alloc.o src/gnb_alloc.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_mmap.o src/gnb_mmap.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_dir.o src/gnb_dir.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_arg_list.o src/gnb_arg_list.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_log.o src/gnb_log.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_hash32.o src/gnb_hash32.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_keys.o src/gnb_keys.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/hash/murmurhash.o libs/hash/murmurhash.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_mod_register.o src/gnb_mod_register.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/cli/gnb.o src/cli/gnb.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_argv.o src/gnb_argv.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/unix/unix_platform.o src/unix/unix_platform.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/linux/gnb_drv_linux.o src/linux/gnb_drv_linux.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_pf.o src/gnb_pf.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_unified_forwarding.o src/gnb_unified_forwarding.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/packet_filter/gnb_pf_route.o src/packet_filter/gnb_pf_route.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/packet_filter/gnb_pf_crypto_xor.o src/packet_filter/gnb_pf_crypto_xor.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/packet_filter/gnb_pf_crypto_arc4.o src/packet_filter/gnb_pf_crypto_arc4.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/packet_filter/gnb_pf_zip.o src/packet_filter/gnb_pf_zip.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/packet_filter/gnb_pf_dump.o src/packet_filter/gnb_pf_dump.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/add_scalar.o libs/ed25519/add_scalar.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/fe.o libs/ed25519/fe.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/ge.o libs/ed25519/ge.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/key_exchange.o libs/ed25519/key_exchange.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/keypair.o libs/ed25519/keypair.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/sc.o libs/ed25519/sc.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/seed.o libs/ed25519/seed.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/sha512.o libs/ed25519/sha512.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/sign.o libs/ed25519/sign.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/ed25519/verify.o libs/ed25519/verify.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_binary.o src/gnb_binary.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/crypto/arc4/arc4.o src/crypto/arc4/arc4.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/crypto/random/gnb_random.o src/crypto/random/gnb_random.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/zlib/adler32.o libs/zlib/adler32.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/zlib/deflate.o libs/zlib/deflate.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/zlib/inffast.o libs/zlib/inffast.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/zlib/inflate.o libs/zlib/inflate.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/zlib/inftrees.o libs/zlib/inftrees.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/zlib/trees.o libs/zlib/trees.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/zlib/zutil.o libs/zlib/zutil.c
cc -o gnb ./src/gnb_core.o ./src/gnb_daemon.o ./src/gnb_worker.o ./src/gnb_ctl_block.o ./src/gnb_address.o ./src/gnb_primary_worker.o ./src/gnb_pf_worker.o ./src/gnb_node_worker.o ./src/gnb_index_worker.o ./src/gnb_index_service_worker.o ./src/gnb_detect_worker.o ./src/gnb_conf.o ./src/gnb_conf_file.o ./src/gnb_config_lite.o ./src/gnb_node.o ./src/gnb_udp.o ./src/gnb_payload16.o ./src/gnb_ring_buffer_fixed.o ./src/gnb_time.o ./src/gnb_lru32.o ./src/gnb_fixed_pool.o ./src/gnb_doubly_linked_list.o ./src/gnb_alloc.o ./src/gnb_mmap.o ./src/gnb_dir.o ./src/gnb_arg_list.o ./src/gnb_log.o ./src/gnb_hash32.o ./src/gnb_keys.o ./libs/hash/murmurhash.o ./src/gnb_mod_register.o ./src/cli/gnb.o ./src/gnb_argv.o ./src/unix/unix_platform.o ./src/linux/gnb_drv_linux.o ./src/gnb_pf.o ./src/gnb_unified_forwarding.o ./src/packet_filter/gnb_pf_route.o ./src/packet_filter/gnb_pf_crypto_xor.o ./src/packet_filter/gnb_pf_crypto_arc4.o ./src/packet_filter/gnb_pf_zip.o ./src/packet_filter/gnb_pf_dump.o ./libs/ed25519/add_scalar.o ./libs/ed25519/fe.o ./libs/ed25519/ge.o ./libs/ed25519/key_exchange.o ./libs/ed25519/keypair.o ./libs/ed25519/sc.o ./libs/ed25519/seed.o ./libs/ed25519/sha512.o ./libs/ed25519/sign.o ./libs/ed25519/verify.o ./src/gnb_binary.o ./src/crypto/arc4/arc4.o ./src/crypto/random/gnb_random.o ./libs/zlib/adler32.o ./libs/zlib/deflate.o ./libs/zlib/inffast.o ./libs/zlib/inflate.o ./libs/zlib/inftrees.o ./libs/zlib/trees.o ./libs/zlib/zutil.o -Wl,--gc-sections -L/usr/lib -pthread -z relro -z now -s
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/cli/gnb_crypto.o src/cli/gnb_crypto.c
cc -o gnb_crypto ./src/cli/gnb_crypto.o ./libs/ed25519/add_scalar.o ./libs/ed25519/fe.o ./libs/ed25519/ge.o ./libs/ed25519/key_exchange.o ./libs/ed25519/keypair.o ./libs/ed25519/sc.o ./libs/ed25519/seed.o ./libs/ed25519/sha512.o ./libs/ed25519/sign.o ./libs/ed25519/verify.o ./src/gnb_binary.o ./src/crypto/arc4/arc4.o ./src/crypto/random/gnb_random.o -Wl,--gc-sections -L/usr/lib -pthread -z relro -z now -s
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/cli/gnb_es.o src/cli/gnb_es.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/es/gnb_environment_service.o src/es/gnb_environment_service.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/es/gnb_es_dump.o src/es/gnb_es_dump.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/es/gnb_es_broadcast_address.o src/es/gnb_es_broadcast_address.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/es/gnb_es_resolv.o src/es/gnb_es_resolv.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/es/gnb_es_upnp.o src/es/gnb_es_upnp.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/es/gnb_discover_in_lan.o src/es/gnb_discover_in_lan.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/es/gnb_es_platform.o src/es/gnb_es_platform.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/miniwget.o libs/miniupnpc/miniwget.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/minixml.o libs/miniupnpc/minixml.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/igd_desc_parse.o libs/miniupnpc/igd_desc_parse.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/minisoap.o libs/miniupnpc/minisoap.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/miniupnpc.o libs/miniupnpc/miniupnpc.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/upnpreplyparse.o libs/miniupnpc/upnpreplyparse.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/upnpcommands.o libs/miniupnpc/upnpcommands.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/upnperrors.o libs/miniupnpc/upnperrors.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/connecthostport.o libs/miniupnpc/connecthostport.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/portlistingparse.o libs/miniupnpc/portlistingparse.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/receivedata.o libs/miniupnpc/receivedata.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/upnpdev.o libs/miniupnpc/upnpdev.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/miniupnpc/minissdpc.o libs/miniupnpc/minissdpc.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/libnatpmp/natpmp.o libs/libnatpmp/natpmp.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/libnatpmp/getgateway.o libs/libnatpmp/getgateway.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o libs/libnatpmp/wingettimeofday.o libs/libnatpmp/wingettimeofday.c
cc -o gnb_es ./src/cli/gnb_es.o ./src/es/gnb_environment_service.o ./src/gnb_daemon.o ./src/es/gnb_es_dump.o ./src/es/gnb_es_broadcast_address.o ./src/es/gnb_es_resolv.o ./src/es/gnb_es_upnp.o ./src/es/gnb_discover_in_lan.o ./src/gnb_ctl_block.o ./src/gnb_time.o ./src/gnb_address.o ./src/gnb_payload16.o ./src/gnb_udp.o ./src/gnb_log.o ./src/gnb_alloc.o ./src/gnb_mmap.o ./src/gnb_dir.o ./src/gnb_hash32.o ./src/gnb_conf.o ./src/gnb_arg_list.o ./libs/hash/murmurhash.o ./src/es/gnb_es_platform.o ./src/unix/unix_platform.o ./libs/ed25519/add_scalar.o ./libs/ed25519/fe.o ./libs/ed25519/ge.o ./libs/ed25519/key_exchange.o ./libs/ed25519/keypair.o ./libs/ed25519/sc.o ./libs/ed25519/seed.o ./libs/ed25519/sha512.o ./libs/ed25519/sign.o ./libs/ed25519/verify.o ./src/gnb_binary.o ./src/crypto/arc4/arc4.o ./src/crypto/random/gnb_random.o ./libs/miniupnpc/miniwget.o ./libs/miniupnpc/minixml.o ./libs/miniupnpc/igd_desc_parse.o ./libs/miniupnpc/minisoap.o ./libs/miniupnpc/miniupnpc.o ./libs/miniupnpc/upnpreplyparse.o ./libs/miniupnpc/upnpcommands.o ./libs/miniupnpc/upnperrors.o ./libs/miniupnpc/connecthostport.o ./libs/miniupnpc/portlistingparse.o ./libs/miniupnpc/receivedata.o ./libs/miniupnpc/upnpdev.o ./libs/miniupnpc/minissdpc.o ./libs/libnatpmp/natpmp.o ./libs/libnatpmp/getgateway.o ./libs/libnatpmp/wingettimeofday.o -Wl,--gc-sections -L/usr/lib -pthread -z relro -z now -s
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/cli/gnb_ctl.o src/cli/gnb_ctl.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/ctl/gnb_ctl_dump.o src/ctl/gnb_ctl_dump.c
cc -ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1 -O2 -c -o src/gnb_ctl_block_set.o src/gnb_ctl_block_set.c
cc -o gnb_ctl ./src/cli/gnb_ctl.o ./src/ctl/gnb_ctl_dump.o ./src/gnb_ctl_block.o ./src/gnb_ctl_block_set.o ./src/gnb_binary.o ./src/gnb_time.o ./src/gnb_address.o ./src/gnb_payload16.o ./src/gnb_udp.o ./src/gnb_mmap.o ./libs/ed25519/sha512.o -Wl,--gc-sections -L/usr/lib -pthread -z relro -z now -s
==> Entering fakeroot environment...
==> Starting package()...
mkdir -p ./bin/
cp gnb ./bin/
cp gnb_ctl ./bin/
cp gnb_crypto ./bin/
cp gnb_es ./bin/
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "opengnb-git"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Creating package "opengnb-git-debug"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: opengnb-git 1.4.5.b-4 (Mon Jan 22 14:52:02 2024)
==> Installing package opengnb-git with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...
Package (2) New Version Net Change
opengnb-git 1.4.5.b-4 0.55 MiB
opengnb-git-debug 1.4.5.b-4 0.01 MiB
Total Installed Size: 0.57 MiB
:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing opengnb-git...
installing opengnb-git-debug...
resolving dependencies...
looking for conflicting packages...
Package (9) New Version Net Change
core/elfutils 0.190-1 3.57 MiB
core/libnsl 2.0.1-1 0.07 MiB
core/licenses 20240115-1 1.51 MiB
extra/pyalpm 0.10.6-5 0.20 MiB
core/python 3.11.6-1 75.27 MiB
extra/python-boolean.py 4.0-2 0.39 MiB
extra/python-license-expression 30.2.0-1 1.13 MiB
extra/python-pyelftools 0.30-1 2.13 MiB
extra/namcap 3.5.2-1 0.98 MiB
Total Installed Size: 85.26 MiB
:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing elfutils...
installing licenses...
installing libnsl...
installing python...
Optional dependencies for python
python-setuptools: for building Python packages using tooling that is usually bundled with Python
python-pip: for installing Python packages using tooling that is usually bundled with Python
python-pipx: for installing Python software not packaged on Arch Linux
sqlite: for a default database integration [installed]
mpdecimal: for decimal
xz: for lzma [installed]
tk: for tkinter
installing pyalpm...
installing python-boolean.py...
installing python-license-expression...
installing python-pyelftools...
installing namcap...
Checking PKGBUILD
Checking opengnb-git-1.4.5.b-4-x86_64.pkg.tar.zst
opengnb-git W: ELF file ('usr/bin/gnb') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
opengnb-git W: ELF file ('usr/bin/gnb_crypto') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
opengnb-git W: ELF file ('usr/bin/gnb_ctl') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
opengnb-git W: ELF file ('usr/bin/gnb_es') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
opengnb-git W: Directory (etc/opengnb) is empty
Checking opengnb-git-debug-1.4.5.b-4-x86_64.pkg.tar.zst
opengnb-git-debug W: Directory (usr/src/debug/opengnb-git) is empty
==> Running checkpkg
error: target not found: opengnb-git
==> WARNING: Skipped checkpkg due to missing repo packages |
Beta Was this translation helpful? Give feedback.
1 reply
-
sed -i -e 's| -pthread| -pthread -z relro -z now -z shstk |g' Makefile.linux 修改后的 makefile.linux CFLAGS=-ffunction-sections -fdata-sections -Wno-unused-result -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -D GNB_LINUX_BUILD=1
CLI_LDFLAGS=-Wl,--gc-sections -L/usr/lib -pthread -z relro -z now -z shstk
GNB_ES_LDFLAGS=-Wl,--gc-sections -L/usr/lib -pthread -z relro -z now -z shstk
ifeq ($(DEBUG),1)
CFLAGS += -g
else
CFLAGS += -O2
CLI_LDFLAGS += -s
GNB_ES_LDFLAGS += -s
endif
GNB_CRYPTO=gnb_crypto
GNB_CTL=gnb_ctl
GNB_ES=gnb_es
GNB_CLI=gnb
include Makefile.inc
GNB_CLI_OBJS = \
./src/cli/gnb.o \
./src/gnb_argv.o \
./src/unix/unix_platform.o \
./src/linux/gnb_drv_linux.o
GNB_ES_OBJS += ./src/unix/unix_platform.o
all:${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
$(GNB_CTL): $(GNB_CTL_OBJS)
${CC} -o ${GNB_CTL} ${GNB_CTL_OBJS} ${CLI_LDFLAGS}
$(GNB_ES): $(GNB_ES_OBJS) ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS}
${CC} -o ${GNB_ES} ${GNB_ES_OBJS} ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS} ${GNB_ES_LDFLAGS}
$(GNB_CRYPTO): $(CRYPTO_OBJS) ./src/cli/gnb_crypto.o
${CC} -o ${GNB_CRYPTO} ./src/cli/gnb_crypto.o ${CRYPTO_OBJS} ${CLI_LDFLAGS}
$(GNB_CLI): $(GNB_OBJS) $(GNB_CLI_OBJS) $(GNB_PF_OBJS) ${CRYPTO_OBJS} ${ZLIB_OBJS}
${CC} -o ${GNB_CLI} ${GNB_OBJS} ${GNB_CLI_OBJS} ${GNB_PF_OBJS} ${CRYPTO_OBJS} ${ZLIB_OBJS} ${CLI_LDFLAGS}
%.o:%.c
${CC} ${CFLAGS} -c -o $@ $<
install:${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
mkdir -p ./bin/
cp ${GNB_CLI} ./bin/
cp ${GNB_CTL} ./bin/
cp ${GNB_CRYPTO} ./bin/
cp ${GNB_ES} ./bin/
clean:
find . -name "*.o" -exec rm -f {} \;
rm -f ${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
rm -f core core.*
rm -f *.exe |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
进入 elf 测试
增加
-z relro -z now
修改后sed -i -e 's| -pthread| -pthread -z relro -z now |g' Makefile.linux
测试结果
这个
lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK
警告暂时没排除出是什么原因影响的?Beta Was this translation helpful? Give feedback.
All reactions