You are not logged in.

#1 2022-12-14 17:02:14

wowblvck
Member
Registered: 2022-10-15
Posts: 6

nvidia-470xx-settings build problem

Error in build nvidia-470xx-settings version 470.161.03-2

XF86Config-parser/Util.c:129:41: warning: format string is not a string literal [-Wformat-nonliteral]
        len = vsnprintf(b, current_len, fmt, ap);
                                        ^~~
1 warning generated.
   CC           XF86Config-parser/Video.c
   CC           XF86Config-parser/Write.c
   LD           out/antialias.png.o
   LD           out/background.png.o
   LD           out/background_tall.png.o
   LD           out/bnc_cable.png.o
ld.lld: error: target emulation unknown: -m or at least one .o file required
ld.lld: error: target emulation unknown: -m or at least one .o file required
ld.lld: error: target emulation unknown: -m or at least one .o file required
ld.lld: error: target emulation unknown: -m or at least one .o file required
make[1]: *** [Makefile:318: out/background_tall.png.o] Error 1
make[1]: *** Waiting for jobs to complete…
make[1]: *** [Makefile:318: out/bnc_cable.png.o] Error 1
make[1]: *** [Makefile:318: out/antialias.png.o] Error 1
make[1]: *** [Makefile:318: out/background.png.o] Error 1
make[1]: exit directory «/home/wowblvck/.cache/yay/nvidia-470xx-settings/src/nvidia-settings-470.161.03/src»
make: *** [Makefile:23: all] Error 2
==> ERROR: An error has occurred in build().

makepkg.conf

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

export CC=clang
export CXX=clang++
export LD=ld.lld
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export RANLIB=llvm-ranlib
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export HOSTLD=ld.lld

#-- Compiler and Linker Flags
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-fdiagnostics-color=always -pipe -O2 -march=native -fstack-protector-strong --param ssp-buffer-size=4 -fstack-clash-protection"
CXXFLAGS="-fdiagnostics-color=always -pipe -O2 -march=native -fstack-protector-strong --param ssp-buffer-size=4 -fstack-clash-protection"

LDFLAGS="-Wl,-O1 -Wl,-z,now -Wl,-z,relro -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,--sort-common -Wl,--hash-style=gnu"
LTOFLAGS="-flto=auto"
RUSTFLAGS="-C opt-level=3"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"
NINJAFLAGS="-j$(nproc)"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
DEBUG_RUSTFLAGS="-C debuginfo=2"

Offline

#2 2022-12-15 08:54:57

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: nvidia-470xx-settings build problem

Building in a clean chroot using extra-x86_64-build give no errors.

This looks like a case where the llvm/clang linker does things different then the gnu linker, but more investigation is needed.

Try building with make -j1 to ensure everything is build sequentially to (hopefully) clarify the actual cause of the error.
Post full log from that build.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-12-18 14:43:58

yochananmarqos
Member
Registered: 2020-02-05
Posts: 197

Re: nvidia-470xx-settings build problem

Repo packages are built in a chroot with devtools. It's makepkg.conf has LTO enabled, but pacman does not yet.

You'll either need to either build in a chroot as @Lone_Wolf mentioned or add 'lto' to options() in the PKGBUILD if you want to use makepkg.

Offline

Board footer

Powered by FluxBB