Il 30/04/22 14:50, kefu chai ha scritto: > hi Mattia, > > On Sat, Apr 30, 2022 at 6:09 PM Mattia Verga via devel > <devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote: >> Hello folks, >> >> while updating package wcstools to the latest release, I've been trying >> to clean up the specfile. I could use some help from someone with better >> gcc knowledge to resolve a build problem when trying to use >> '%make_build' instead of plain 'make'. Can someone take a look at the >> build logs [1] and give me some advice? Is the failure due to parallel >> build usage or can be fixed by patching out the code somewhere? > the failure was due to the missing wcstools library when the linker > was trying to link simpos. > > === quote begin === > gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g > -grecord-gcc-switches -pipe -Wall -Werror=format-security > -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 > -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 > -m64 -mtune=generic -fasynchronous-unwind-tables > -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed > -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 > -Wl,-dT,/builddir/build/BUILD/wcstools-3.9.7/.package_note-wcstools-3.9.7-1.fc37.x86_64.ld > -o bin/simpos simpos.c -L libwcs -lwcstools -lm > simpos.c: In function 'main': > simpos.c:86:20: warning: suggest parentheses around assignment used as > truth value [-Wparentheses] > 86 | while (c = *++str) { > | ^ > simpos.c:186:13: warning: ignoring return value of 'fgets' declared > with attribute 'warn_unused_result' [-Wunused-result] > 186 | fgets (newobj, 32, flist); > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/bin/ld: cannot find -lwcstools: No such file or directory > === quote end === > > but at the end of the log, it seems GNU make was actually building > libwcstools.a and libwcstools.so.1 > === quote begin === > ranlib libwcstools.a > make[1]: Leaving directory '/builddir/build/BUILD/wcstools-3.9.7/libwcs' > ar: creating libwcstools.a > ... > ln -s libwcstools.so.1.0.0 libwcstools.so.1 > ln -s > libwcstools.so.1.0.0 libwcstools.so > === quote end === > > so my guess is that the upstream makefile just fails to explain the > build dependency correctly. and we should disable the parallel build > to workaround this. probably a better way is to fix the Makefile > though. > > HTH. > > > cheers. > > -- > Regards > Kefu Chai Thanks. Indeed, the upstream makefile is patched using a patch from Debian [1], which is needed to build the shared library, rename it to avoid a conflict with another package and honor build flags. I suppose that patch doesn't behave well with parallel build, but I have zero knowledge to try to fix that so I'm going to just disable the parallelization. At this regard, what's the recommended way to disable parallel build? Packaging Guidelines doesn't say how to do that in the relevant chapter [2]. Should I set `global %_smp_mflags -j1` on top of the specfile, use `%make_build -j1` or just use plain `make`? Mattia [1] https://salsa.debian.org/debian-astro-team/wcstools/-/blob/master/debian/patches/Rename-libwcs-to-libwcstools-to-avoid-conflicts-with-Mark.patch [2] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure