Re: gcc: RPM_ARCH not defined

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

 



Lukas Javorsky wrote on 2023/01/23 21:39:
Hi,

I've been looking at our upstreamed test [1] for libarchive package and it
started to fail since Fedora 37.

The error is: "gcc: fatal error: environment variable 'RPM_ARCH' not defined
"

Prior to the Fedora 37 the test was passing without any issue.

Did anyone here had a similar problem?
Or could anyone help me find out what has changed so it's causing this
issue?

[1]
https://src.fedoraproject.org/tests/libarchive/blob/main/f/Sanity/Basic-sanity-test-for-libarchive

Thank you so much for your help

Most possibly due to "package note".

`rpmbuild -bc` defines  %{_package_note_flags}, embeds "-specs=/usr/lib/rpm/redhat/redhat-package-notes"
to LDFLAGS, which needs "RPM_ARCH" environment. During rpmbuild process, this environment is provided,
but then later "make" process does not define this automatically (because this process is not under
"rpmbuild"), so embedded "-specs=/usr/lib/rpm/redhat/redhat-package-notes" LDFLAGS complains about
missing environment.

(Yes, I think this is annoying - sometimes rpmbuild fails with some reason, I try to fix compilation error
 then try executing "make" locally, then I see linker complains about "'RPM_ARCH' not defined"...)

I usually write "%_package_note_flags %nil" to ~/.rpmmacros, not sure if rpmbuild command line can
undefine macros.

Regards,
Mamoru
_______________________________________________
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, report it: https://pagure.io/fedora-infrastructure/new_issue




[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