Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653914 - sys-apps/diffutils-3.6: error: dereferencing pointer to incomplete type 'const struct rpl_option'
Summary: sys-apps/diffutils-3.6: error: dereferencing pointer to incomplete type 'cons...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.26-stable
  Show dependency tree
 
Reported: 2018-04-23 17:53 UTC by Joe Harvell
Modified: 2018-06-12 20:50 UTC (History)
0 users

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


Attachments
output of sudo armv7a-pip-linux-gnueabi-emerge --info (pip-emerge-info.txt,4.72 KB, text/plain)
2018-04-23 17:53 UTC, Joe Harvell
Details
output of sudo emerge --info (emerge-info.txt,6.39 KB, text/plain)
2018-04-23 17:53 UTC, Joe Harvell
Details
build.log (build.log,97.79 KB, text/plain)
2018-04-23 17:55 UTC, Joe Harvell
Details
eclass-debug.log (eclass-debug.log,2.01 KB, text/plain)
2018-04-23 17:55 UTC, Joe Harvell
Details
environment (environment,82.20 KB, text/plain)
2018-04-23 17:55 UTC, Joe Harvell
Details
config.log (config.log,652.34 KB, text/plain)
2018-04-23 17:56 UTC, Joe Harvell
Details
configure (configure.gz,178.32 KB, application/gzip)
2018-04-23 17:56 UTC, Joe Harvell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Harvell 2018-04-23 17:53:08 UTC
Created attachment 528306 [details]
output of sudo armv7a-pip-linux-gnueabi-emerge --info

I am building a Gentoo system for my ARM based Beaglebone Black from scratch using a toolchain setup with crossdev.  Most packages in @system build fine, but a handful fail, including this one.  More detailed error message below:

armv7a-pip-linux-gnueabi-gcc  -I.      -march=armv7-a -mtune=cortex-a8 -mfpu=neon-vfpv3 -mfloat-abi=hard -Os -pipe -fomit-frame-pointer -ftree-vectorize -flto=10 -c -o xstrtol.o  xstrtol.c

[snip] // Note, multiple files are being compiled in parallel. So not all output below is from the compile for xstrtol.c


In file included from ./getopt.h:85:0,
                 from xstrtol.h:22,
                 from xstrtol.c:31,
                 from xstrtoul.c:6:
./config.h:2070:25: warning: 'struct rpl_option' declared inside parameter list will not be visible outside of this definition or declaration
 #define __GETOPT_PREFIX rpl_
                         ^
./getopt-pfx-core.h:38:44: note: in expansion of macro '__GETOPT_PREFIX'
 #  define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
                                            ^~~~~~~~~~~~~~~
In file included from ./getopt.h:85:0,
                 from xstrtol.h:22,
                 from xstrtol.c:31:
./config.h:2070:25: warning: 'struct rpl_option' declared inside parameter list will not be visible outside of this definition or declaration
 #define __GETOPT_PREFIX rpl_
                         ^
./getopt-pfx-core.h:38:44: note: in expansion of macro '__GETOPT_PREFIX'
 #  define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
                                            ^~~~~~~~~~~~~~~
armv7a-pip-linux-gnueabi-gcc  -I.      -march=armv7-a -mtune=cortex-a8 -mfpu=neon-vfpv3 -mfloat-abi=hard -Os -pipe -fomit-frame-pointer -ftree-vectorize -flto=10 -c -o asnprintf.o  asnprintf.c
In file included from ./getopt.h:85:0,
                 from xstrtol.h:22,
                 from xstrtol-error.c:20:
./config.h:2070:25: warning: 'struct rpl_option' declared inside parameter list will not be visible outside of this definition or declaration
 #define __GETOPT_PREFIX rpl_
                         ^
./getopt-pfx-core.h:38:44: note: in expansion of macro '__GETOPT_PREFIX'
 #  define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
                                            ^~~~~~~~~~~~~~~
armv7a-pip-linux-gnueabi-gcc  -I.      -march=armv7-a -mtune=cortex-a8 -mfpu=neon-vfpv3 -mfloat-abi=hard -Os -pipe -fomit-frame-pointer -ftree-vectorize -flto=10 -c -o fcntl.o  fcntl.c
In file included from ./getopt.h:85:0,
                 from xstrtol.h:22,
                 from xstrtol.c:31,
                 from xstrtoumax.c:6:
./config.h:2070:25: warning: 'struct rpl_option' declared inside parameter list will not be visible outside of this definition or declaration
 #define __GETOPT_PREFIX rpl_
                         ^
./getopt-pfx-core.h:38:44: note: in expansion of macro '__GETOPT_PREFIX'
 #  define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
                                            ^~~~~~~~~~~~~~~
./config.h:2070:25: warning: 'struct rpl_option' declared inside parameter list will not be visible outside of this definition or declaration
 #define __GETOPT_PREFIX rpl_
                         ^
./getopt-pfx-core.h:38:44: note: in expansion of macro '__GETOPT_PREFIX'
 #  define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
                                            ^~~~~~~~~~~~~~~
xstrtol-error.c: In function 'xstrtol_error':
xstrtol-error.c:84:26: error: invalid use of undefined type 'struct rpl_option'
     option = long_options[opt_idx].name;
                          ^
xstrtol-error.c:84:26: error: dereferencing pointer to incomplete type 'const struct rpl_option'
In file included from ./getopt.h:85:0,
                 from xstrtol.h:22,
                 from xstrtol-error.c:20:
xstrtol-error.c: At top level:
./config.h:2070:25: warning: 'struct rpl_option' declared inside parameter list will not be visible outside of this definition or declaration
 #define __GETOPT_PREFIX rpl_
                         ^
./getopt-pfx-core.h:38:44: note: in expansion of macro '__GETOPT_PREFIX'
 #  define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
                                            ^~~~~~~~~~~~~~~
xstrtol-error.c:92:1: error: conflicting types for 'xstrtol_fatal'
 xstrtol_fatal (enum strtol_error err,
 ^~~~~~~~~~~~~
In file included from xstrtol-error.c:20:0:
xstrtol.h:69:16: note: previous declaration of 'xstrtol_fatal' was here
 _Noreturn void xstrtol_fatal (enum strtol_error,
                ^~~~~~~~~~~~~
xstrtol-error.c: In function 'xstrtol_fatal':
xstrtol-error.c:96:35: warning: passing argument 4 of 'xstrtol_error' from incompatible pointer type [-Wincompatible-pointer-types]
   xstrtol_error (err, opt_idx, c, long_options, arg, exit_failure);
                                   ^~~~~~~~~~~~
xstrtol-error.c:47:1: note: expected 'const struct rpl_option *' but argument is of type 'const struct rpl_option *'
 xstrtol_error (enum strtol_error err,
 ^~~~~~~~~~~~~
make[2]: *** [Makefile:1828: xstrtol-error.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/usr/armv7a-pip-linux-gnueabi/tmp/portage/sys-apps/diffutils-3.6/work/diffutils-3.6/lib'
make[1]: *** [Makefile:1577: all] Error 2
make[1]: Leaving directory '/usr/armv7a-pip-linux-gnueabi/tmp/portage/sys-apps/diffutils-3.6/work/diffutils-3.6/lib'
make: *** [Makefile:1337: all-recursive] Error 1
 * ERROR: sys-apps/diffutils-3.6::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-apps/diffutils-3.6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/diffutils-3.6::gentoo'`.
 * The complete build log is located at '/usr/armv7a-pip-linux-gnueabi/tmp/portage/sys-apps/diffutils-3.6/temp/build.log'.
 * The ebuild environment file is located at '/usr/armv7a-pip-linux-gnueabi/tmp/portage/sys-apps/diffutils-3.6/temp/environment'.
 * Working directory: '/usr/armv7a-pip-linux-gnueabi/tmp/portage/sys-apps/diffutils-3.6/work/diffutils-3.6'
 * S: '/usr/armv7a-pip-linux-gnueabi/tmp/portage/sys-apps/diffutils-3.6/work/diffutils-3.6'


Reproducible: Always

Steps to Reproduce:
1.Create cross toolcain (crossdev -t armv7a-pip-linux-gnueabi)
2.Unpack latest portage snapshot into /usr/armv7a-pip-linux-gnueabi/usr
3.Update /usr/armv7a-pip-linux-gnueabi/etc/portage/make.profile symlink to point to ../../usr/portage/profiles/default/linux/arm/13.0/armv7a
4. sudo armv7a-pip-linux-gnueabi-emerge -a1v --noreplace --keep-going @system
5. repeat step 4 as necessary until emerge actually attempts to build sys-apps/diffutils-3.6

Actual Results:  
sys-apps/diffutils-3.6 compile fails

Expected Results:  
sys-apps/diffutils-3.6 succeeds

I have successfully installed 110 of the 134 packages in @system.  There are 5 failing compile and the remaining 19 cannot be compiled due to dependencies on the 5 failing ones.

sys-apps/diffutils-3.6 was the first package to fail compile

joey@akita ~$ eix --installed cross-armv7a-pip-linux-gnueabi/\*
[I] cross-armv7a-pip-linux-gnueabi/binutils [1]
     Available versions:  
     (2.25.1) 2.25.1-r1
     (2.26.1) 2.26.1
     (2.27) (~)2.27-r1
     (2.28.1) 2.28.1
     (2.29.1) 2.29.1-r1
     (2.30) (~)2.30 (~)2.30-r1
     (git)  **9999
       {(+)cxx doc multitarget (+)nls static-libs test vanilla zlib}
     Installed versions:  2.30-r1(2.30)(18:38:46 22/04/2018)(cxx nls -doc -multitarget -static-libs -test)
     Homepage:            https://sourceware.org/binutils/
     Description:         Tools necessary to build programs

[I] cross-armv7a-pip-linux-gnueabi/gcc [1]
     Available versions:  
     (2.95.3) ~*2.95.3-r10^s
     (3.3.6) ~3.3.6-r1^s
     (3.4.6) 3.4.6-r2^s
     (4.0.4) **4.0.4^s
     (4.1.2) 4.1.2^s
     (4.2.4) (~)4.2.4-r1^s
     (4.3.6) 4.3.6-r1^s
     (4.4.7) 4.4.7^s
     (4.5.4) 4.5.4^s
     (4.6.4) 4.6.4^s
     (4.7.4) 4.7.4-r1^s
     (4.8.5) 4.8.5-r1^s
     (4.9.4) 4.9.4^s
     (5.4.0) 5.4.0-r4^s
     (6.4.0) 6.4.0^s 6.4.0-r1^s
     (7.2.0) (~)7.2.0^s (~)7.2.0-r1^s
     (7.3.0) (~)7.3.0^s (~)7.3.0-r1^s **7.3.0-r2^s
       {altivec awt boundschecking cilk +cxx d debug doc fixed-point +fortran gcj go graphite hardened jit libssp mpx mudflap multilib +nls nopie nossp +nptl objc objc++ objc-gc +openmp +pch pgo +pie regression-test +sanitize +ssp vanilla +vtv}
     Installed versions:  7.3.0-r1(7.3.0)^s(18:53:05 22/04/2018)(cxx fortran nls nptl openmp pch pie ssp -altivec -awt -cilk -debug -doc -fixed-point -gcj -go -graphite -hardened -jit -libssp -mpx -multilib -objc -objc++ -objc-gc -pgo -regression-test -sanitize -vanilla -vtv)
     Homepage:            https://gcc.gnu.org/
     Description:         The GNU Compiler Collection

[I] cross-armv7a-pip-linux-gnueabi/glibc [1]
     Available versions:  (2.2) (~)2.18-r1^s 2.19-r1^s **2.19-r2^s 2.20-r2^s 2.21-r2^s 2.22-r4^s 2.23-r4^s (~)2.24-r4^s 2.25-r10^s 2.25-r11^s (~)2.26-r6^s **2.27-r1^s **9999^s
       {audit caps compile-locales debug doc gd hardened headers-only multilib nscd profile +rpc selinux suid systemtap vanilla}
     Installed versions:  2.26-r6(2.2)^s(18:47:14 22/04/2018)(caps -audit -debug -doc -gd -hardened -headers-only -multilib -nscd -profile -selinux -suid -systemtap -vanilla)
     Homepage:            https://www.gnu.org/software/libc/
     Description:         GNU libc C library

[I] cross-armv7a-pip-linux-gnueabi/linux-headers [1]
     Available versions:  (*)2.4.33.3^bs (~*)2.4.36^bs 3.18^bs 4.4^bs (~)4.9^bs 4.13^bs (~)4.14^bs (~)4.15^bs (~)4.16^bs (~)4.16-r1^bs {headers-only}
     Installed versions:  4.16-r1^bs(18:44:15 22/04/2018)(-headers-only)
     Homepage:            https://www.kernel.org/ https://www.gentoo.org/
     Description:         Linux system headers

[1] "crossdev" /mnt/striped/opt/portage/crossdev

Found 4 matches
Comment 1 Joe Harvell 2018-04-23 17:53:29 UTC
Created attachment 528308 [details]
output of sudo emerge --info
Comment 2 Joe Harvell 2018-04-23 17:55:00 UTC
Created attachment 528310 [details]
build.log
Comment 3 Joe Harvell 2018-04-23 17:55:19 UTC
Created attachment 528312 [details]
eclass-debug.log
Comment 4 Joe Harvell 2018-04-23 17:55:40 UTC
Created attachment 528314 [details]
environment
Comment 5 Joe Harvell 2018-04-23 17:56:04 UTC
Created attachment 528316 [details]
config.log
Comment 6 Joe Harvell 2018-04-23 17:56:55 UTC
Created attachment 528318 [details]
configure
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2018-06-12 13:23:24 UTC
This isn't a cross compile error, this is caused by glibc 2.26.
Comment 8 Larry the Git Cow gentoo-dev 2018-06-12 20:49:27 UTC
The bug has been referenced in the following commit(s):

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

commit 430733d66882ebd89cad7b81783713b02d7f44bb
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-06-12 20:47:00 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-06-12 20:49:18 +0000

    sys-apps/diffutils: fix build with glibc 2.26
    
    Aside fix for building with glibc 2.26, ebuild was bumped
    to EAPI=6.
    
    Bug: https://bugs.gentoo.org/653914
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-apps/diffutils/diffutils-3.6-r1.ebuild | 44 ++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2018-06-12 20:50:36 UTC
@ Joe: Please confirm the fix so that we can proceed with stabilization.