snir nisim

error building package (samba and new package)

Discussion created by snir nisim on Feb 27, 2012
Latest reply on Feb 29, 2012 by snir nisim

hello everyone,

recently i successfully compile build and deployed a new rootfs including kernel and u-boot.

after build finished successfully i tried adding some packages to the file system but encountered a couple of errors:

1) i tried:

./ltib -m prep -p samba --> succeeded

./ltib -m scbuild -p samba --> build failed

the scbuild failed with this error:


snir@snir-linux:~/ltib$ ./ltib -m scbuild -p samba

Processing: samba
Build path taken because: directory build, build key set, no prebuilt rpm,

rpmbuild --dbpath /home/snir/ltib/rootfs//var/lib/rpm --target arm --define '_unpackaged_files_terminate_build 0' --define '_target_cpu arm' --define '__strip strip' --define '_topdir /home/snir/ltib/rpm' --define '_prefix /usr' --define '_tmppath /home/snir/ltib/tmp' --define '_rpmdir /home/snir/ltib/rpm/RPMS'  --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bc --short-circuit  /home/snir/ltib/dist/lfs-5.1/samba/samba.spec
Building target platforms: arm
Building for target arm
Executing(%build): /bin/sh -e /home/snir/ltib/tmp/rpm-tmp.48920
+ umask 022
+ cd /home/snir/ltib/rpm/BUILD
+ cd samba-3.0.32
+ cd source
+ '[' = MPC8315E ']'
/home/snir/ltib/tmp/rpm-tmp.48920: line 23: [: =: unary operator expected
+ '[' = MPC837xE ']'
/home/snir/ltib/tmp/rpm-tmp.48920: line 23: [: =: unary operator expected
+ '[' arm = m68knommu ']'
+ echo '***** Using default site file for cross build settings *****'
***** Using default site file for cross build settings *****
+ ./configure --prefix=/usr --host=arm-linux --build=i686-pc-linux-gnu --target=arm-linux --with-sendfile-support --disable-cups
configure: loading site script
./configure: line 1785: .: file not found
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking for arm-linux-gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for version of gcc... 4.4.4
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for AIX... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for C99 designated initializers... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for library containing strerror... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking standards.h usability... no
checking standards.h presence... no
checking for standards.h... no
checking for long long... yes
checking for uint_t... no
checking for int8_t... yes
checking for uint8_t... yes
checking for int16_t... yes
checking for uint16_t... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for int... yes
checking size of int... 4
checking for char... yes
checking size of char... 1
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 4
checking for long long... (cached) yes
checking size of long long... 8
checking for off_t... yes
checking size of off_t... 8
checking for size_t... (cached) yes
checking size of size_t... 4
checking for ssize_t... (cached) yes
checking size of ssize_t... 4
checking for intptr_t... yes
checking for ptrdiff_t... yes
checking for immediate structures... yes
checking whether to use profiling... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking for perl... /usr/bin/perl
checking for arm-linux-ar... ar
checking if the linker (ld) is GNU ld... yes
checking GNU ld release date... 20100303
checking whether gcc and cc understand -c and -o together... yes
checking that the C compiler understands -Werror... cross
checking that the C compiler understands -w2... cross
checking that the C compiler understands volatile... yes
checking that the C compiler understands negative enum values... configure: error: cannot run test program while cross compiling
See `config.log' for more details.
error: Bad exit status from /home/snir/ltib/tmp/rpm-tmp.48920 (%build)

RPM build errors:
    Bad exit status from /home/snir/ltib/tmp/rpm-tmp.48920 (%build)
Build time for samba: 11 seconds

Failed building samba

f_scbuild() returned an error, exiting

Exiting on error or interrupt



- i've added the * in the beginning and in the end so it will be more easy for you to continue read the question.

so i tried entering ./ltib --c and choose start smb daemons and choose the package in ltib after running "ccache -C" but got the same error. how can i add samba package?


2) in addition to Q.1 i would like to add winexe package to my rootfs. this is an external package. i tried following the Ltibfaq page with no success can you please help me with instruction of how to add it? is it possible to add samba4 instead of the provided samba package (samba- 3.0.32)?