Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644286 - sys-devel/crossdev fails sh4-unknown-linux-gnu/glibc compile
Summary: sys-devel/crossdev fails sh4-unknown-linux-gnu/glibc compile
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-12 09:22 UTC by Mykhailo
Modified: 2018-01-22 23:08 UTC (History)
2 users (show)

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


Attachments
log (cross-sh4-unknown-linux-gnu-glibc.log.xz,109.61 KB, application/x-xz)
2018-01-12 09:22 UTC, Mykhailo
Details
log2 (cross-sh4-unknown-linux-gnu-info.log,19.28 KB, text/x-log)
2018-01-12 09:22 UTC, Mykhailo
Details
log3 (glibc-config.logs.tar.xz,7.74 KB, application/x-xz)
2018-01-12 09:22 UTC, Mykhailo
Details
emerge-info.txt (emerge-info.txt,6.86 KB, text/plain)
2018-01-12 09:27 UTC, Mykhailo
Details
build.log (build.log,445.98 KB, text/x-log)
2018-01-12 09:30 UTC, Mykhailo
Details
cross-sh4-unknown-linux-gnu-glibc.log.xz (cross-sh4-unknown-linux-gnu-glibc.log.xz,109.59 KB, application/x-xz)
2018-01-17 10:38 UTC, Mykhailo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mykhailo 2018-01-12 09:22:18 UTC
Created attachment 514440 [details]
log

strobil-pc ~ # crossdev -S -t sh4
-                                                                                                                                                                                                                                                                                         
 * crossdev version:      20180105
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   sh
 * Target System:         sh4-unknown-linux-gnu
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * headers:               linux-headers-[stable]
 * libc:                  glibc-[stable]

 * CROSSDEV_OVERLAY:      /usr/local/portage-crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:         
                                                                                                                                                                                                                                                                                          
 * leaving sys-devel/binutils in /usr/local/portage-crossdev
 * leaving sys-devel/gcc in /usr/local/portage-crossdev
 * leaving sys-kernel/linux-headers in /usr/local/portage-crossdev
 * leaving sys-devel/gdb in /usr/local/portage-crossdev
 * leaving metadata/layout.conf alone in /usr/local/portage-crossdev
                                                                                                                                                                                                                                                                                          
 * Log: /var/log/portage/cross-sh4-unknown-linux-gnu-binutils.log
 * Emerging cross-binutils ...                                                                                                                                                                                                                                                      [ ok ]
 * Log: /var/log/portage/cross-sh4-unknown-linux-gnu-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...                                                                                                                                                                                                                                           [ ok ]
 * Log: /var/log/portage/cross-sh4-unknown-linux-gnu-glibc-headers.log
 * Emerging cross-glibc-headers ...                                                                                                                                                                                                                                                 [ ok ]
 * Log: /var/log/portage/cross-sh4-unknown-linux-gnu-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                                                                                                                                                                                    [ ok ]
 * Log: /var/log/portage/cross-sh4-unknown-linux-gnu-linux-headers.log
 * Emerging cross-linux-headers ...                                                                                                                                                                                                                                                 [ ok ]
 * Log: /var/log/portage/cross-sh4-unknown-linux-gnu-glibc.log
 * Emerging cross-glibc ...

 * error: glibc failed :(
 * 
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-sh4-unknown-linux-gnu-info.log
 * /var/log/portage/cross-sh4-unknown-linux-gnu-glibc.log.xz
 * /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc*/temp/glibc-config.logs.tar.xz
Comment 1 Mykhailo 2018-01-12 09:22:43 UTC
Created attachment 514442 [details]
log2
Comment 2 Mykhailo 2018-01-12 09:22:55 UTC
Created attachment 514444 [details]
log3
Comment 3 Mykhailo 2018-01-12 09:27:42 UTC
Created attachment 514446 [details]
emerge-info.txt
Comment 4 Mykhailo 2018-01-12 09:30:55 UTC
Created attachment 514448 [details]
build.log
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2018-01-16 22:06:58 UTC
Is it a complete build log? It does not see to have an error in the end. Just stops abruptly.
Comment 6 Mykhailo 2018-01-17 10:38:04 UTC
(In reply to Sergei Trofimovich from comment #5)
> Is it a complete build log? It does not see to have an error in the end.
> Just stops abruptly.

Attached last build log
Comment 7 Mykhailo 2018-01-17 10:38:48 UTC
Created attachment 515146 [details]
cross-sh4-unknown-linux-gnu-glibc.log.xz
Comment 8 Mykhailo 2018-01-17 10:39:30 UTC
mv -f /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/rtld-libc.aT /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/rtld-libc.a
make[3]: Leaving directory '/var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/glibc-2.25/elf'
sh4-unknown-linux-gnu-gcc  -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -r -o /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/librtld.os '-Wl,-(' /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/dl-allobjs.os /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/rtld-libc.a -lgcc '-Wl,-)' \
          -Wl,-Map,/var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/librtld.os.map
sh4-unknown-linux-gnu-gcc  -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -shared -o /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/ld.so.new           \
          -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,-z,now  \
          /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/librtld.os -Wl,--version-script=/var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/ld.map          \
          -Wl,-soname=ld-linux.so.2                     \
          -Wl,-defsym=_begin=0
/var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/librtld.os: In function `strcspn':
(.text+0x1462c): undefined reference to `__strchrnul'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:456: /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl/elf/ld.so] Error 1
make[2]: Leaving directory '/var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/glibc-2.25/elf'
make[1]: *** [Makefile:216: elf/subdir_lib] Error 2
make[1]: Leaving directory '/var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/glibc-2.25'
make: *** [Makefile:9: all] Error 2
make: Leaving directory '/var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-default-sh4-unknown-linux-gnu-nptl'
 * ERROR: cross-sh4-unknown-linux-gnu/glibc-2.25-r9::crossdev failed (compile phase):
 *   emake failed
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2018-01-20 14:28:11 UTC
(In reply to strobil from comment #8)
> /var/tmp/portage/cross-sh4-unknown-linux-gnu/glibc-2.25-r9/work/build-
> default-sh4-unknown-linux-gnu-nptl/elf/librtld.os: In function `strcspn':
> (.text+0x1462c): undefined reference to `__strchrnul'
> collect2: error: ld returned 1 exit status

Interesting. I can't reproduce it locally.

Looking at your glibc build log I see a few issues:

- quite old binutils is used:
  """checking version of /usr/libexec/gcc/sh4-unknown-linux-gnu/as... 2.25.1, ok"""
  Consider switching to 2.29.1 via 'binutils-config sh4-unknown-linux-gnu-2.29.1'.

- make sure you are using gcc-5.4.0 as sh4 cross-compiler and not something older via 'gcc-config sh4-unknown-linux-gnu-5.4.0'
Comment 10 Mykhailo 2018-01-22 09:12:40 UTC
Thank you! Switching to the last binutils and gcc helped for me!
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2018-01-22 23:08:41 UTC
Woohoo! Let's ignore older binutils then. Closing as OBSOLETE.