Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Build System
-
Labels:None
-
Environment:x86_64 (Quad Core) arch Fedora Core Linux PC, plenty of RAM and HDD space
-
Platform:Linux x86_64/gcc
-
Uname:Linux test1.my.net 3.2.6-3.fc16.x86_64 #1 Wed Feb 1 19:08:46 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux
-
CPU Info:Intel Quad Core
-
GCC Version:4.4.5
-
FreeSWITCH GIT Revision:as of 12 Feb 2012 (tried with newest HEAD as well)
-
Reproduced with GIT HEAD?:yes
Description
A couple of issues I experience during building FS - they are separated below as "normal" (i.e. no cross-compilation takes place) and "cross" (i.e. when cross compilation is in effect - build=x86_64, host=i686)
1. "normal" - as part of the build process I use mock - a tool designed for building in a separate (chrooted) environment, therefore the destination arch (and all dependencies) is isolated from the host machine. I am experiencing 2 issues:
1.1 build stops without being completed - this only happens when mock is used (i.e. when I just use the host machine all is well - no "stutters") - the build after I run ./bootstrap.sh & configure -C and them make stops without any apparent error, but the actual build is not complete. When I then run make again from that point the build continues, until it stops again at some further point. In other words, it "stutters" for some reason.
If you need logs/screen dumps to see what is going on, please let me know - I will gladly provide those. The commands I am executing are as follows (from the build tree root dir):
./bootstrap.sh
export LDFLAGS='-m64 -Wl,--as-needed,--library-path=/usr/lib64'
export CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -march=native -mtune=native -Werror-implicit-function-declaration'
./configure -C --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --with-openssl --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
make -j5
1.2 The second issue I am experiencing is when I use --with-zrtp during configure (i.e. enable ZRTP during the build) - configure fails with an error that it cannot find my ZRTP libraries.
This can't be right as I have both libzrtpcpp as well as libzrtpcpp-devel packages installed (this is how this package is called in Fedora) and all zrtp-related .so files are in /usr/lib64. The version I have deployed is 1.4.3.
2. "cross" build - this is where it gets very hairy, even with my long-standing experience with cross builds. There are 2 fundamental problems with the ./configure (build fails completely soon as it is started)
2.1 During the ./configure process variety of modules (in libs subdir) use a) direct file checking, which, apparently, is not allowed, so autoconf tells me (for example, checking that /dev/random exists) and b) running a test program to determine a condition - that also apparently is not allowed during cross-compilation. What I had to do in this case is prepare config.cache file with the pre-defined answers, so that configure could pass (I used previous "normal" build to gather those).
The following modules/variables had to be adjusted:
ac_cv_file__dev_ptmx=yes
ac_cv_file__dev_zero=yes
ac_cv_func_setpgrp_void=yes
apr_cv_tcp_nodelay_with_cork=yes
ac_cv_file_dbd_apr_dbd_mysql_c=no
ac_cv_file___dev_urandom_=yes
ac_cv_va_copy=yes
In addition to that, I had to further adjust libs/sqlite/configure (line 10534) and to remove the following 3 lines, which caused sqlite to bail out if cross-compilation takes place:
if test "$cross_compiling" = "yes"; then
as_fn_error "unable to find a compiler for building build tools" "$LINENO" 5
fi
All this gets me pass through ./configure,
2.2 make, though, also fails with the following error:
./tool/lemon.c:3011: error: implicit declaration of function 'access'
and then
./include/apr.h:347:2: error: #error Can not determine the proper size for ssize_t
I cannot pass beyond that point!
The sequence of commands I execute is as follows (assuming "clean" dist tree):
./bootstrap.sh
export LDFLAGS='-m32 -Wl,--as-needed,--library-path=/usr/lib'
export CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=pentium4 -Werror-implicit-function-declaration'
./configure -C --build=x86_64-redhat-linux-gnu --host=i686-redhat-linux-gnu --with-openssl --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
make -j5
1. "normal" - as part of the build process I use mock - a tool designed for building in a separate (chrooted) environment, therefore the destination arch (and all dependencies) is isolated from the host machine. I am experiencing 2 issues:
1.1 build stops without being completed - this only happens when mock is used (i.e. when I just use the host machine all is well - no "stutters") - the build after I run ./bootstrap.sh & configure -C and them make stops without any apparent error, but the actual build is not complete. When I then run make again from that point the build continues, until it stops again at some further point. In other words, it "stutters" for some reason.
If you need logs/screen dumps to see what is going on, please let me know - I will gladly provide those. The commands I am executing are as follows (from the build tree root dir):
./bootstrap.sh
export LDFLAGS='-m64 -Wl,--as-needed,--library-path=/usr/lib64'
export CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -march=native -mtune=native -Werror-implicit-function-declaration'
./configure -C --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --with-openssl --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
make -j5
1.2 The second issue I am experiencing is when I use --with-zrtp during configure (i.e. enable ZRTP during the build) - configure fails with an error that it cannot find my ZRTP libraries.
This can't be right as I have both libzrtpcpp as well as libzrtpcpp-devel packages installed (this is how this package is called in Fedora) and all zrtp-related .so files are in /usr/lib64. The version I have deployed is 1.4.3.
2. "cross" build - this is where it gets very hairy, even with my long-standing experience with cross builds. There are 2 fundamental problems with the ./configure (build fails completely soon as it is started)
2.1 During the ./configure process variety of modules (in libs subdir) use a) direct file checking, which, apparently, is not allowed, so autoconf tells me (for example, checking that /dev/random exists) and b) running a test program to determine a condition - that also apparently is not allowed during cross-compilation. What I had to do in this case is prepare config.cache file with the pre-defined answers, so that configure could pass (I used previous "normal" build to gather those).
The following modules/variables had to be adjusted:
ac_cv_file__dev_ptmx=yes
ac_cv_file__dev_zero=yes
ac_cv_func_setpgrp_void=yes
apr_cv_tcp_nodelay_with_cork=yes
ac_cv_file_dbd_apr_dbd_mysql_c=no
ac_cv_file___dev_urandom_=yes
ac_cv_va_copy=yes
In addition to that, I had to further adjust libs/sqlite/configure (line 10534) and to remove the following 3 lines, which caused sqlite to bail out if cross-compilation takes place:
if test "$cross_compiling" = "yes"; then
as_fn_error "unable to find a compiler for building build tools" "$LINENO" 5
fi
All this gets me pass through ./configure,
2.2 make, though, also fails with the following error:
./tool/lemon.c:3011: error: implicit declaration of function 'access'
and then
./include/apr.h:347:2: error: #error Can not determine the proper size for ssize_t
I cannot pass beyond that point!
The sequence of commands I execute is as follows (assuming "clean" dist tree):
./bootstrap.sh
export LDFLAGS='-m32 -Wl,--as-needed,--library-path=/usr/lib'
export CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=pentium4 -Werror-implicit-function-declaration'
./configure -C --build=x86_64-redhat-linux-gnu --host=i686-redhat-linux-gnu --with-openssl --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
make -j5
Also do not use the ZRTP system libs as these are out of date. the canonical source of libzrtp is now the main FreeSWITCH git repository.
there has been a fair bit of reworking on many things in the last 3 months getting ready for 1.2