When I emerge samba I get this error: no rule to make target smbd/files.o The smbd/files.c file exists, and there is a rule in the Makefile .c.o. Why can't make find that rule and build it? I also tried manually running make, and it still gave the same error. I tried with MAKEOPTS="-j1", but still the same error. Reproducible: Always Steps to Reproduce: 1.emerge samba Actual Results: Compiling param/params.c make: *** No rule to make target `smbd/files.o', needed by `bin/smbd'. Stop. Expected Results: compile smbd/files.c to smbd/files.o, and build samba Gentoo Base System version 1.6.13 Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6. 13-ck7 i686) ================================================================= System uname: 2.6.13-ck7 i686 AMD Athlon(tm) XP 2100+ ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.1-r1 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe -fforce-addr -momit- leaf-frame-pointer -ftracer -fno-ident -funroll-loops -maccumulate-outgoing-args -fprefetch-loop-arrays -malign-double -ffast-math" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/ share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb / usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe -fforce-addr -momit- leaf-frame-pointer -ftracer -fno-ident -funroll-loops -maccumulate-outgoing-args -fprefetch-loop-arrays -malign-double -ffast-math -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.roedu.net/pub/mirrors/gentoo.org/ http://ftp.lug.ro/ gentoo/" LDFLAGS="" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X Xaw3d acpi alsa apm arts avi bash-completion berkdb bitmap- fonts bzip2 caps cdr clamav crypt cups curl curlwrappers dbus dga dio directfb dlloader dri eds emacs emacs-w3 emboss encode esd exif expat fam fbcon foomaticdb fortran ftp gb gdbm geoip gif ginac glut gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal icq idn imagemagick imap imlib ipv6 jabber java jpeg kde lesstif libg++ libwww lm_sensors mad mikmod mime mmap mmx motif mozilla mp3 mpeg ncurses nls nocd nptl nptlonly nsplugin ogg oggvorbis openal opengl oscar oss pam pcntl pcre pdflib perl plotutils png posix python qt quicktime readline sdl session sharedmem skey slang sockets socks5 spell sse ssl symlink sysvipc tcltk tcpd threads tiff truetype truetype-fonts type1-fonts vcd vorbis xine xml2 xmms xosd xprint xv yahoo zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS
About which samba version do we speak?
The samba version I tried to emerge is: [ebuild N ] net-fs/samba-3.0.14a-r2 Sorry for not mentioning this in the first place.
from what I see, your toolchain is using some old components (sandbox), while the compiler is unstable (gcc-3.3.x is the choiche for your arch). Try to 1) upgrade sandbox, and if it isn't sufficient, 2) downgrade the compiler, but look at the forums for this: although you have a stable glibc version, it should be done with care (revdep-rebuild is a must, for instance)
I succeeded in building samba. The problem was, that "make" was broken, because I compiled it with excessive CFLAGS. I recompiled it with safe flags, and now it compiled. So my toolchain was broken, not samba. Thanks for the tip. Now who's fault is that make is broken with certain CFLAGS: make's or gcc's? Should I submit a separate bugreport? If yes consider this bug as closed.
(In reply to comment #4) > So my toolchain was broken, not samba. Thanks for the tip. > Now who's fault is that make is broken with certain CFLAGS: make's or gcc's? It's your fault. Just because you can use all flags you want, it's not always safe. Especially -ftracer and -ffastmath break a lot of code that wasn't written for it. We don't support that. See also http://funroll-loops.org/