I emerged mips-sources (2.6.9-r4), fixed the symlink problem mentioned in another bug; ran make menuconfig and configured; then --- from the tail end of the make output: AR arch/mips/lib-32/lib.a GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 fs/built-in.o(.text+0x30af8): In function `bm_entry_read': : undefined reference to `strcpy' fs/built-in.o(.text+0x30cb0): In function `bm_entry_read': : undefined reference to `strcpy' make: *** [.tmp_vmlinux1] Error 1 Reproducible: Always Steps to Reproduce: 1. emerge mips-sources; fix symlink 2. make menuconfig 3. make Actual Results: See the details above. Expected Results: It should have built cleanly. Keep up the fantastic work Kumba & all! I appreciate the amount of work it has taken to get to this point, and it seems like we are really close to seeing a self hosted Gentoo mips system. other linux # emerge info Portage 2.0.51-r3 (default-linux/mips/2004.2, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.4.22-mipscvs-20030825 mips) ================================================================= System uname: 2.4.22-mipscvs-20030825 mips R4600 V2.0 FPU V2.0 Gentoo Base System version 1.6.6 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.91.0.2 Headers: sys-kernel/mips-headers-2.4.22-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="mips ~mips" AUTOCLEAN="yes" CFLAGS="-O2 -mips3 -mabi=32 -pipe" CHOST="mips-unknown-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mips3 -mabi=32 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://fizban:8730/gentoo-portage" USE="mips berkdb bitmap-fonts gdbm gpm libwww ncurses nls nomultilib pam perl python readline sdl ssl tcpd zlib"
Well, I'm not sure how you want us to fix this. If I had to make a guess, I'd say your kernel config isn't quite right. You might try doing a "make ip22_defconfig" and then only adding the essentials that you need, and then recompiling. Kumba, you haven't run into anything like this with mips-sources have you? I can't say, since I always use latest cvs sources on my indys. On an unrelated note, why do you actually have mips in your USE flags?
Ok - I'll try the ip22_defconfig. I think that's pretty much all I need anyways, nothing particular about this Indy. But, I'm now trying to make 2.6.9-r6 which I just emerged this morning. Trying with the same r4 config I used previously. I'll let you know what happens. Also - mips in USE. Interesting. In my make.conf, I don't set USE at all. So, I'm not sure how USE picks up mips. Also, I'm not sure where my setting of USE went to either... I know it was in there at one point in time. Probably got lost during an etc-update I suppose.
hrm, that error again. This *might* be a case of the rogue gcc-3.4 issue where there's an sprintf call in a specific fashion. gcc, being the optimizing thing it is, tries its best to optimize that sprinf, and winds up dropping a strcpy call in the resulting output code, which thus creates an error. The kernels got its own strcpy function, but I'll have to go back through my patches later and find out what the fix was that I snagged off LKML a few months back that fixed the issue. It's possible there's still a few of these floating around in kernel code. Dan, since it's occuring in the fs/ dir, that's implying a specific fs is doing this. Can you list what fs drivers you enabled (built-in or module)? AFAIK, XFS, ReiserFS, JFS, ext2, ext3, NFS, smbfs, CIFS, EFS, & UFS aren't affected, because I've built those before in palying around w/ the livecd kernel (but it's possible one of them is funny). Also, post your kernel .config as an attachment if/when you get that error again. //-------- On the 'mips' in USE; that's normal. The profile is doing that. `emerge info` is displaying the portage environment from portages point of view, and this includes after having parsed profiles, /etc/portage/* material, make.conf, etc.., so you're seeing the settings it sees. Hence why it's useful debug output. It's safe to see 'mips' in USE on an emerge info.
Ok, so I tracked it down to the fs/binfmt_misc.o module. This is what has strcpy calls in it. It looks like your hunch about gcc converting sprintf calls to strcpy is correct. I disabled CONFIG_BINFMT_MISC from my config, and am now rebuilding. I'm not sure why I had this enabled in the first place. I'll let you know in a bit what the outcome is.
Yeah, misc bin format isn't really too terribly useful on mips unless you really really want to compile java binaries with gcj or something. And I was having a brainfart about the mips keyword thing. For some reason I had it in my head it was dumping USE from make.conf instead of the USE that portage was compiled with (duh).
Beautiful. The 2.6.9-r6 mips-sources built fine now, and produced a vmlinux. I put this on the disk using dvhtool, rebooted; booted the new kernel and it came up and ran just fine. (Is it just me, or did it seem to run significantly faster than 2.4?) I'm now going back to the prom to set it as the default file to boot. Thanks for the help with strcpy and keep up the great work you all are doing! Go ahead and close this bug.
Good to hear. I'll keep this bug open for a short time until I can track down the offending sprintf call and fix it (if that's the true issue), cause that kind of patch might need to find its way back upstream.
2.6.13.4 should be in portage by now, though this bug was fixed back in ~2.6.10 or .11. Closing.