Summary: | net-proxy/squid fails to compile | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Mikle Kolyada (RETIRED) <zlogene> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | idl0r |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=668002 https://bugs.gentoo.org/show_bug.cgi?id=720806 https://github.com/gentoo/gentoo/pull/15705 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 721344, 719046 | ||
Attachments: | build.log |
Description
Agostino Sarubbo
2020-04-26 15:12:13 UTC
Created attachment 634710 [details]
build.log
build log and emerge --info
can confirm.
configure.ac has the check if libatomic needed.
> ## check for atomics library before anything that might need it
> # AC_SEARCH_LIBS pollutes LIBS
> SQUID_STATE_SAVE(LIBATOMIC)
> AC_SEARCH_LIBS([__atomic_load_8],[atomic],[
> test "$ac_res" = "none required" || ATOMICLIB=$ac_res],[])
> SQUID_STATE_ROLLBACK(LIBATOMIC)
> AC_SUBST(ATOMICLIB)
but check misfires
checking for library containing __atomic_load_8... no
since I'm compiling in a ppc32 chroot with 64bit kernel it makes me wonder if this is somehow related?
part of config.log
configure:21154: powerpc-unknown-linux-gnu-g++ -o conftest -O2 -pipe -Wl,-O1 -Wl,--as-needed conftest.cpp -latomic >&5
conftest.cpp:56:6: error: new declaration 'char __atomic_load_8()' ambiguates built-in declaration 'long long unsigned int __atomic_load_8(const volatile void*, int)' [-fpermissive]
56 | char __atomic_load_8 ();
| ^~~~~~~~~~~~~~~
conftest.cpp: In function 'int main()':
conftest.cpp:60:25: error: too few arguments to function 'long long unsigned int __atomic_load_8(const volatile void*, int)'
60 | return __atomic_load_8 ();
| ^
configure:21154: $? = 1
looks like autotools is to blame https://www.mail-archive.com/bug-autoconf@gnu.org/msg04294.html AC_SEARCH_LIBS is broken with gcc8 and up for some libs and generates incorrect conftest and check is always false. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907277 I think doing something like
> inherit .. flag-o-matic ..
> use ppc && append-ldflags '-latomic'
is acceptable as long as -as-needed is passed.
this will link atomic only into objects that actually use it.
I can confirm it builds that way.
fixing autoconf is a bit more involved.
It should be reported upstream, yes. If someone is able to fix that, a patch would be great, for the ebuild as well as upstream. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9083ec9e0bc6508dad28ae211d8e3647a1f08e5 commit c9083ec9e0bc6508dad28ae211d8e3647a1f08e5 Author: Sam James (sam_c) <sam@cmpct.info> AuthorDate: 2020-05-08 03:00:53 +0000 Commit: Mikle Kolyada <zlogene@gentoo.org> CommitDate: 2020-05-18 13:43:53 +0000 net-proxy/squid: Fix 32-bit build Links against libatomic on 32-bit non-x86 arches. Bug: https://bugs.gentoo.org/719662 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sam James (sam_c) <sam@cmpct.info> Closes: https://github.com/gentoo/gentoo/pull/15705 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org> net-proxy/squid/squid-4.11.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) |