Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831291 - dev-db/ocp-0.3 calls ar directly
Summary: dev-db/ocp-0.3 calls ar directly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Max Satula
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: tc-directly
  Show dependency tree
 
Reported: 2022-01-16 10:24 UTC by Agostino Sarubbo
Modified: 2022-01-20 15:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,42.49 KB, text/plain)
2022-01-16 10:24 UTC, Agostino Sarubbo
Details
ocp-ar.patch (ocp-ar.patch,838 bytes, patch)
2022-01-16 11:29 UTC, Marco Genasci
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-01-16 10:24:24 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-db/ocp-0.3 calls ar directly.
Discovered on: amd64 (internal ref: ci)

NOTE:
As per QA policy, toolchain tools must not be called directly because they can cause issue in cross-compiling and because is not possible use a different AR implementation (like llvm-ar). To reproduce, please use sys-devel/gcc-config[-native-symlinks], sys-devel/binutils-config[-native-symlinks].
Comment 1 Agostino Sarubbo gentoo-dev 2022-01-16 10:24:26 UTC
CC'ing also the author of the commit (516ae59120b0656fb3c47e5a4631bef0cc7eef00)
Comment 2 Agostino Sarubbo gentoo-dev 2022-01-16 10:24:27 UTC
Created attachment 762287 [details]
build.log

build log and emerge --info
Comment 3 Agostino Sarubbo gentoo-dev 2022-01-16 10:24:29 UTC
Error(s) that match a know pattern:


make[2]: ar: No such file or directory
Comment 4 Marco Genasci 2022-01-16 11:29:37 UTC
Created attachment 762329 [details, diff]
ocp-ar.patch

The problem is not related to commit 516ae59120b0656fb3c47e5a4631bef0cc7eef00, but the patch seems to solve the problem.
Comment 5 Max Satula 2022-01-17 19:19:36 UTC
(In reply to Marco Genasci from comment #4)
> Created attachment 762329 [details, diff] [details, diff]
> ocp-ar.patch
> 
> The problem is not related to commit
> 516ae59120b0656fb3c47e5a4631bef0cc7eef00, but the patch seems to solve the
> problem.

Makefile.in is generated by automake based on Makefile.am

Do you know by the chance on how to tell automake to generate a good Makefile.in without having to patch it manually every time it is regenerated?
Comment 6 Max Satula 2022-01-17 19:29:40 UTC
Does not it sound as a bug in GNU automake?
Comment 7 Marco Genasci 2022-01-18 15:44:42 UTC
(In reply to Max Satula from comment #5)
> Do you know by the chance on how to tell automake to generate a good
> Makefile.in without having to patch it manually every time it is regenerated?

No, but another way is to inherit toolchain-funcs eclass and add src_compile function:

src_compile() {
    emake AR="$(tc-getAR)"
}

like commit 873d874069600e85391fd46206665c70751f0beb
Comment 8 Max Satula 2022-01-18 17:57:01 UTC
(In reply to Marco Genasci from comment #7)
> (In reply to Max Satula from comment #5)
> > Do you know by the chance on how to tell automake to generate a good
> > Makefile.in without having to patch it manually every time it is regenerated?
> 
> No, but another way is to inherit toolchain-funcs eclass and add src_compile
> function:
> 
> src_compile() {
>     emake AR="$(tc-getAR)"
> }
> 
> like commit 873d874069600e85391fd46206665c70751f0beb

I personally like this one better. Did this approach applied to dev-db/ocp work for you? If so, I'll submit a PR (unless you do a favor of taking care of it). Thank you!
Comment 9 Marco Genasci 2022-01-18 18:14:22 UTC
(In reply to Max Satula from comment #8)
> I personally like this one better. Did this approach applied to dev-db/ocp
> work for you? If so, I'll submit a PR (unless you do a favor of taking care
> of it). Thank you!

Yes it seems to work.
Comment 10 Larry the Git Cow gentoo-dev 2022-01-20 12:36:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f7653c57cf5f7d60c9d5c97c7d36887e3600f25

commit 7f7653c57cf5f7d60c9d5c97c7d36887e3600f25
Author:     Marco Genasci <fedeliallalinea@gmail.com>
AuthorDate: 2022-01-20 06:42:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-20 12:31:13 +0000

    dev-db/ocp: fix AR direct call
    
    Closes: https://bugs.gentoo.org/831291
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Marco Genasci <fedeliallalinea@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/23879
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/ocp/ocp-0.3.ebuild  | 11 ++++++++---
 dev-db/ocp/ocp-9999.ebuild | 11 ++++++++---
 2 files changed, 16 insertions(+), 6 deletions(-)
Comment 11 Larry the Git Cow gentoo-dev 2022-01-20 15:21:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffbe6ac5b5d4ccc29993e3d7ae68625afbf871df

commit ffbe6ac5b5d4ccc29993e3d7ae68625afbf871df
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-20 15:21:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-20 15:21:41 +0000

    dev-db/ocp: move common inherit out
    
    Bug: https://bugs.gentoo.org/831291
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/ocp/ocp-0.3.ebuild  | 5 +++--
 dev-db/ocp/ocp-9999.ebuild | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)