# Emerging Samba Error...(SOLVED)

## whitesouls

Greetings...

```
 * Dir conf:

Samba will be installed into:

  basedir:     /usr

  bindir:      /usr/bin

  sbindir:     /usr/sbin

  libdir:      /usr/lib/samba

  vardir:      /var

  mandir:      /usr/man

  privatedir:  /var/lib/samba/private

  configdir:   /etc/samba

  lockdir:     /var/cache/samba

  piddir:      /var/run/samba

  swatdir:     /usr/share/doc/samba-3.0.10/swat

make delheaders; \

make smbd/build_options.c; \

make include/proto.h; \

make include/build_env.h; \

make include/wrepld_proto.h; \

make nsswitch/winbindd_proto.h; \

make web/swat_proto.h; \

make client/client_proto.h; \

make utils/net_proto.h

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

Removing prototype headers

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

Generating smbd/build_options.c

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

Building include/proto.h

creating /var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source/include/proto.h

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

Building include/build_env.h

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

Building include/wrepld_proto.h

creating /var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source/include/wrepld_proto.h

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

creating /var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source/nsswitch/winbindd_proto.h

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

creating /var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source/web/swat_proto.h

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

creating /var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source/client/client_proto.h

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

make[1]: Entering directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

creating /var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source/utils/net_proto.h

make[1]: Leaving directory `/var/tmp/portage/samba-3.0.10/work/samba-3.0.10/source'

 * LD: BIND_NOW: bin/smbmnt

Compiling lib/version.c

Compiling client/smbmnt.c

In file included from include/smb.h:1674,

                 from include/includes.h:818,

                 from lib/version.c:23:

include/popt_common.h:25: error: array type has incomplete element type

include/popt_common.h:26: error: array type has incomplete element type

include/popt_common.h:27: error: array type has incomplete element type

include/popt_common.h:28: error: array type has incomplete element type

make: *** [lib/version.o] Error 1

make: *** Waiting for unfinished jobs....

In file included from include/smb.h:1674,

                 from include/includes.h:818,

                 from client/smbmnt.c:10:

include/popt_common.h:25: error: array type has incomplete element type

include/popt_common.h:26: error: array type has incomplete element type

include/popt_common.h:27: error: array type has incomplete element type

include/popt_common.h:28: error: array type has incomplete element type

make: *** [client/smbmnt.o] Error 1

!!! ERROR: net-fs/samba-3.0.10 failed.

!!! Function src_compile, Line 208, Exitcode 2

!!! LD: BIND_NOW: bin/smbmnt compile error

```

I got this when i did 

 *Quote:*   

> emerge -uDeva world

 

I've just upgraded my toolkit to 4.0.1 so i did emerge -uDeva system twice which went on succesfully. So i decided to emerge world my world since most of my apps are seg faultings...

----------

## jmbsvicetto

Hi.

If you rebuilt your toolkit for gcc 4.0, I would expect that you do need to update your system and world. Has gcc 4.0 evolved from its beta state? I thought it was unusable or unstable yet.

You might try to emerge popt and see if you can emerge samba afterwards. But are you sure that samba can be built with gcc 4.0?

----------

## whitesouls

thank you for your fast reply Sir jmbsvicetto . i will try to emerge poptand emerge samba later. I'm not sure wheter GCC 4.0 has evolved fomr its beta state or not but i'm sure that GCC 4.1 is still in beta. Emerging the system and my toolkit twice went on smooth but only this samba is giving me problems.

----------

## whitesouls

 :Sad: ..I'm still receiving the same problem...

```
VaderX ~ # emerge --info

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-4.0.1, glibc-2.3.5.20050722-r0, 2.6.12-nitro5 i686)

=================================================================

System uname: 2.6.12-nitro5 i686 Intel(R) Pentium(R) M processor 1.60GHz

Gentoo Base System version 1.6.13

ccache version 2.3 [enabled]

dev-lang/python:     2.3.5

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.5

sys-devel/binutils:  2.15.92.0.2-r1, 2.15.92.0.2-r10, 2.16-r1, 2.16.1, 2.16.91.0.1

sys-devel/libtool:   1.5.18-r1

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O3 -march=pentium-m -mtune=pentium-m -pipe -mfpmath=sse -mmmx -msse -msse2 -momit-leaf-frame-pointer -funit-at-a-time -fweb -floop-optimize2 -fforce-addr -ftracer -fno-ident -minline-all-stringops -foptimize-sibling-calls -fcaller-saves -falign-functions=32 -falign-jumps=32 -falign-loops=32 -finline-functions -funroll-loops -ftree-vectorize"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-O3 -march=pentium-m -mtune=pentium-m -pipe -mfpmath=sse -mmmx -msse -msse2 -momit-leaf-frame-pointer -funit-at-a-time -fweb -floop-optimize2 -fforce-addr -ftracer -fno-ident -minline-all-stringops -foptimize-sibling-calls -fcaller-saves -falign-functions=32 -falign-jumps=32 -falign-loops=32 -finline-functions -funroll-loops -ftree-vectorize -fvisibility-inlines-hidden"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"

GENTOO_MIRRORS="http://mirror.averse.net/pub/gentoo/ ftp://gentoo.ccccom.com http://194.117.143.69"

LANG="en_EN.UTF-8"

LC_ALL="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--sort-common -z combreloc -Wl,--enable-new-dtags"

LINGUAS="en_US.UTF-8"

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 16bit 3dnow 3dnowex X aac acpi acpi4linux ada alsa ansi apm avi bash-completion berkdb bigger-fonts bitmap-fonts blender-game bluetooth bzip2 bzlib c++ calendar caps ccache cdda cddb cdparanoia cdr cdrom chipcard chroot clamav crypt css cups curl dhcp dillo divx4linux dvd dvdread encode escreen esd ethereal fam flac foomaticdb fortran ftp gcc-libffi gd gdbm gif gimp gkrellm gmail gnustep gpm gstreamer gtk gtk2 i8x0 icq ieee1394 imagemagick imlib ipv6 irc irda jabber java javacomm javadoc javamail javascript jcs jikes jpeg jpeg2k lcd libg++ libwww logitech-mouse mad mikmod mixer mjpeg mmx mmx2 motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mpeg4 mplayer msn ncurses nls nptl ogg oggvorbis opengl oscar oss pam pdf pdflib perl png python qt quicktime readline real samba screenshot sdl spell sse sse2 ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode uptimed usb v4l v4l2 vcd vcdimager videos vim vim-pager vim-with-x virus-scan visualization vorbis wifi wma123 wxwindows xml2 xmms xv xvid xvmc yahoo zlib video_cards_radeon linguas_en_US.UTF-8 userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CTARGET

```

This is my emerge --info for you guys to refer..Could this problem caused by my CFLAGS or anything else?

----------

## jmbsvicetto

Now that you've called my attention to it, can you try using a more conservative CFLAGS for emerging Samba. The following could work

```
CFLAGS="-O3 -march=pentium-m -mtune=pentium-m -fforce-address -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"

CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"

```

----------

## whitesouls

aight..i will try that..will report soon...thank you sir..

----------

## whitesouls

no sir....i dont think my cflags has caused that thing...it still gives me the same problem...

----------

## jmbsvicetto

Have you looked at https://bugs.gentoo.org and checked if this isn't a bug? Have you checked in the SAMBA site whether it's possible to compile it with GCC 4.0?

----------

## whitesouls

nope sir...I'm checking it now...will report if its a bug... Thank you for the info and a fast reply..

EDIT : but i dont think its a bug..coz i can't find a similiar one.. I dont have any other option other than to unmerge the samba package. Please..hope other can help.

----------

## jmbsvicetto

If that's the case, I'm sorry for not being able to help you!  :Sad: 

----------

## whitesouls

Atlast i managed to compile samba. I used the version net-fs/samba-3.0.14a-r2. I did this b adding this package into my package.keywords

```
~net-fs/samba-3.0.14a-r2 ~x86
```

later I emerged the package. This is my emerge --info

```
VaderX etc # emerge --info

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-4.0.1, glibc-2.3.5.20050722-r0, 2.6.12-nitro5 i686)

=================================================================

System uname: 2.6.12-nitro5 i686 Intel(R) Pentium(R) M processor 1.60GHz

Gentoo Base System version 1.6.13

ccache version 2.3 [enabled]

dev-lang/python:     2.3.5

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.5

sys-devel/binutils:  2.15.92.0.2-r1, 2.15.92.0.2-r10, 2.16-r1, 2.16.1, 2.16.91.0.1

sys-devel/libtool:   1.5.18-r1

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O3 -march=pentium-m -mtune=pentium-m -pipe -mfpmath=sse -mmmx -msse -msse2 -momit-leaf-frame-pointer -funit-at-a-time -fweb -floop-optimize2 -fforce-addr -ftracer -fno-ident -minline-all-stringops -foptimize-sibling-calls -fcaller-saves -falign-functions=4 -falign-jumps=4 -falign-loops=4 -finline-functions -ftree-vectorize -ffast-math"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-O3 -march=pentium-m -mtune=pentium-m -pipe -mfpmath=sse -mmmx -msse -msse2 -momit-leaf-frame-pointer -funit-at-a-time -fweb -floop-optimize2 -fforce-addr -ftracer -fno-ident -minline-all-stringops -foptimize-sibling-calls -fcaller-saves -falign-functions=4 -falign-jumps=4 -falign-loops=4 -finline-functions -ftree-vectorize -ffast-math -fvisibility-inlines-hidden"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"

GENTOO_MIRRORS="http://mirror.averse.net/pub/gentoo/ ftp://gentoo.ccccom.com http://194.117.143.69"

LANG="en_EN.UTF-8"

LC_ALL="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--sort-common -z combreloc -Wl,--enable-new-dtags"

LINGUAS="en_US.UTF-8"

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 16bit 3dnow 3dnowex X aac acpi acpi4linux ada alsa ansi apm avi bash-completion berkdb bigger-fonts bitmap-fonts blender-game bluetooth bzip2 bzlib c++ calendar caps ccache cdda cddb cdparanoia cdr cdrom chipcard chroot clamav crypt css cups curl dhcp dillo divx4linux dvd dvdread encode escreen esd ethereal fam flac foomaticdb fortran ftp gcc-libffi gdbm gif gimp gkrellm gmail gnustep gpm gstreamer gtk gtk2 i8x0 icq ieee1394 imagemagick imlib ipv6 irc irda jabber java javacomm javadoc javamail javascript jcs jikes jpeg jpeg2k lcd libg++ libwww logitech-mouse mad mikmod mixer mjpeg mmx mmx2 motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mpeg4 mplayer msn ncurses nls nptl ogg oggvorbis opengl oscar oss pam pdf pdflib perl png python qt quicktime readline real samba screenshot sdl spell sse sse2 ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode uptimed usb v4l v4l2 vcd vcdimager videos vim vim-pager vim-with-x virus-scan visualization vorbis wifi wma123 wxwindows xml2 xmms xv xvid xvmc yahoo zlib video_cards_radeon linguas_en_US.UTF-8 userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CTARGET

```

----------

