Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 586444

Summary: sys-apps/file-5.28: src/magic.c:611:7: error: 'MAGIC_PARAM_BYTES_MAX' undeclared
Product: Gentoo Linux Reporter: Paramonov Valeriy <asm64>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo, sanjee.yogeswaran, slyfox
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log

Description Paramonov Valeriy 2016-06-20 03:17:58 UTC
Created attachment 438068 [details]
emerge --info

Hello.

sys-apps/file-5.28/work/file-5.28/src/magic.c: In function 'magic_setparam':
sys-apps/file-5.28/work/file-5.28/src/magic.c:611:7: error: 'MAGIC_PARAM_BYTES_MAX' undeclared (first use in this function)
  case MAGIC_PARAM_BYTES_MAX:
Comment 1 Paramonov Valeriy 2016-06-20 03:18:36 UTC
Created attachment 438070 [details]
build.log
Comment 2 Torsten Kurbad 2016-06-20 20:45:52 UTC
Same for me.
Comment 3 nvinson234 2016-06-25 02:19:02 UTC
The problem lies in the multilib_src_compile() function that's defined in the ebuild.  When 'multilib_is_native_abi' is false, 'emake -C src libmagic.la' is called instead of 'emake'.  The end result is that a needed header file, magic.h, is not created.

That said,  I had some difficulty reproducing this as /usr/include/magic.h was being substituted for the missing magic.h during the build.
Comment 4 SpanKY gentoo-dev 2016-06-25 03:09:41 UTC
(In reply to nvinson234 from comment #3)

nice debug work.  should be fixed here:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b60e6814ea6c95cedac4e03c2a1ce574207dea30
Comment 5 Coacher 2016-09-10 14:35:06 UTC
*** Bug 593334 has been marked as a duplicate of this bug. ***
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2016-09-18 12:41:15 UTC
I've applied the same for cross-compiled case: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc034c82b286e891d50f2c1e516640ee3107104c

Reported by n05 user on #gentoo-embedded as a failure on armv7a target.