error building package (samba and new package)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

error building package (samba and new package)

2,631 Views
snirnisim
Contributor III

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 *****
+ CONFIG_SITE=samba-3.0.32-default.site
+ ./configure --prefix=/usr --host=arm-linux --build=i686-pc-linux-gnu --target=arm-linux --with-sendfile-support --disable-cups
configure: loading site script samba-3.0.32-default.site
./configure: line 1785: .: samba-3.0.32-default.site: file not found
SAMBA VERSION: 3.0.32
LIBREPLACE_LOCATION_CHECKS: START
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu
LIBREPLACE_LOCATION_CHECKS: END
LIBREPLACE_CC_CHECKS: START
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
LIBREPLACE_CC_CHECKS: END
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
traceback:
 main:560

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)?

thanks,

snir

Labels (1)
5 Replies

1,469 Views
snirnisim
Contributor III

hey again,

i'm my project clock ticks really fast now and i hope someone would beable to answer my last questions asap...

 

1. where is the smb.conf file after installing samba under ltib? it's not in in etc/... (no samba dir) and same in usr/local whats wrong here? i tried reinstalling... after changing the spec file as suggested.

 

2. what i need to update on my uSD if I'm installing new package? i need to update all the uSD (bootloader, kernel, fs) or just dd one of them? (what is the write syntax for that operation? dd...)

 

3. how do i add a totally new package like winexe to cross compile with ltib for my rootfs?

 

4. what i need to add to a C++ project in order to  create it a package that i can add same as the process that is needed in question (3)?

 

thanks in advance,

snir

0 Kudos
Reply

1,469 Views
snirnisim
Contributor III

another question is where is the important smb.conf file?

thanks again,

snir

Randy Krakora said:

I fixed the build error, by modifying the samba.spec file, adding the "./" before "samba-3.0.32-default.site":

echo "***** Using default site file for cross build settings *****"
CONFIG_SITE=./samba-3.0.32-default.site ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} --target=$CFGHOST --with-sendfile-support --disable-cups
fi

( my samba.spec is attached )

-Randy

0 Kudos
Reply

1,469 Views
snirnisim
Contributor III

WOW that really worked! thanks a lot!

i have a few more questions please:

1) what i need to update on my uSD if I'm installing new package? i need to update all the uSD (bootloader, kernel, fs) or just dd one of them? (what is the write syntax for that operation? dd...)

2) how do i add a totally new package like winexe to cross compile with ltib for my rootfs?

3)what i need to add to a C++ project in order to  create it a package that i can add same as the process that is needed in question (2)?

thanks a lot!

snir


Randy Krakora said:

I fixed the build error, by modifying the samba.spec file, adding the "./" before "samba-3.0.32-default.site":

echo "***** Using default site file for cross build settings *****"
CONFIG_SITE=./samba-3.0.32-default.site ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} --target=$CFGHOST --with-sendfile-support --disable-cups
fi

( my samba.spec is attached )

-Randy

0 Kudos
Reply

1,469 Views
RandyKrakora
NXP Employee
NXP Employee

I fixed the build error, by modifying the samba.spec file, adding the "./" before "samba-3.0.32-default.site":

echo "***** Using default site file for cross build settings *****"
CONFIG_SITE=./samba-3.0.32-default.site ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} --target=$CFGHOST --with-sendfile-support --disable-cups
fi

( my samba.spec is attached )

-Randy

1,469 Views
snirnisim
Contributor III


can anyone please answer my second question?

 

I answer myself to the first quwstion. but now o can't find smb.conf file in etc dir...

 

 I hope this can be useful

if this error displayed:

 go to ltib/rpm/BUILD/samba-3.0.32/source/configure

searcg (ctrl+f) for "CC_NEGATIVE_ENUM_VALUES"

look about 4 rows down to the line says: "if test "$cross_compile" = yes; then"

and cahange the "yes" to "no" and then run ./ltib -m scbuild -p samba again.

this will let the build run self test even for cross compiling. worked for me, i'm now having samba in my rootfs.

0 Kudos
Reply