Re: F36 mock rebuild failure: cannot open linker script file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 21, 2022 at 08:16:22AM -0400, Sam Varshavchik wrote:
> I'm taking a rather boring F35 SRPM and attempting to rebuild it in mock for
> F36.
> 
> Its stock configure script, that tries to test-compile conftest.c fails
> thusly:
> 
> 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/.package_note-courier-unicode-2.2.3.20220416-1.fc36.x86_64.ld
> conftest.c  >&5
> 
> /usr/bin/ld: cannot open linker script file/builddir/build/BUILD/.package_note-courier-unicode-2.2.3.20220416-1.fc36.x86_64.ld:
> No such file or directory
> 
> Looking at the output of rpm -q --showrc, this is apparently coming from a
> bunch of _package_note macros, including a -Wl,-dT flag that's referencing
> this .ld file that's nowhere to be found.
> 
> I can't immediately make heads or tails of these new macros, anyone know
> what this is all about, and what's missing from the spec file? Randomly, I
> added
> 
> %{_generate_package_note_file}
> 
> after %setup, in %prep, and that seem to get passed this error, is this
> really needed in every package that runs the linker?

The issue is that in %prep, %buildsubdir is not defined, so the definition
of %_package_note_file, which uses %buildsubdir, has a different value than
in %build and later. Generally the best solution is to move the step that
tries to make use of the package notes file in %prep to %build.
But looking at https://src.fedoraproject.org/rpms/courier-unicode/blob/rawhide/f/courier-unicode.spec,
I don't see anything in %prep that'd cause an issue. Can you post the
spec file that is causing problems?

Zbyszek
_______________________________________________
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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux