[Libwebsockets] Configure error

Jack Mitchell ml at communistcode.co.uk
Tue Jan 15 15:08:08 CET 2013


On 15/01/13 13:57, "Andy Green (林安廸)" wrote:
> On 15/01/13 21:27, the mail apparently from Jack Mitchell included:
>> I am the maintainer of the ArchLinux libwebsockets package and I have an
>> error on configure as follows:
>>
>> ==> Determining latest git revision...
>>    -> Version found: 20130115
>> ==> Making package: libwebsockets-git 20130115-0 (Tue 15 Jan 13:24:10
>> GMT 2013)
>> ==> Checking runtime dependencies...
>> ==> Checking buildtime dependencies...
>> ==> Retrieving Sources...
>> ==> Extracting Sources...
>> ==> Starting build()...
>> ==> Building libwebsockets-git...
>>    -> Cloning git://git.warmcat.com/libwebsockets repository...
>> Cloning into 'libwebsockets'...
>> remote: Counting objects: 2752, done.
>> remote: Compressing objects: 100% (2112/2112), done.
>> remote: Total 2752 (delta 2086), reused 818 (delta 622)
>> Receiving objects: 100% (2752/2752), 1.17 MiB | 1.06 MiB/s, done.
>> Resolving deltas: 100% (2086/2086), done.
>> Already on 'master'
>> Preparing the libwebsockets build system...please wait
>>
>> Found GNU Autoconf version 2.69
>> Found GNU Automake version 1.13.1
>> Found GNU Libtool version 2.4.2
>>
>> Automatically preparing build ... Warning: autoreconf failed
>> Attempting to run the preparation steps individually
>>
>> Preparing build ... ERROR: aclocal failed
>> ==> ERROR: A failure occurred in build().
>>      Aborting...
>>
>> I have had a report saying that if the m4 directory is created then the
>> build works OK.
>
> I can't reproduce, sorry
>
> [agreen at kaiji libwebsockets]$ mv m4 m4-dead
> [agreen at kaiji libwebsockets]$ ./autogen.sh
> Preparing the libwebsockets build system...please wait
>
> Found GNU Autoconf version 2.69
> Found GNU Automake version 1.12.2
> Found GNU Libtool version 2.4.2
>
> Automatically preparing build ... done
>
> The libwebsockets build system is now prepared.  To build here, run:
>   ./configure
>   make
> [agreen at kaiji libwebsockets]$
>
> I guess it's some difference in either autotools or libtool?
>
> I added a small workaround patch that creates ./m4/ in the repo, see 
> if that helps
>
> http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=fa17ca722544c9cdb14b87ca8a09fbcdc49d8cb5 
>
>
> -Andy
>
>> Do you hava any idea what the route cause could be? The PKGBUILD file is
>> paste below and should be fairly obvious what it is doing.
>>
>> # Maintainer: Jack Mitchell <jack at embed.me.uk>
>>
>> pkgname=libwebsockets-git
>> pkgver=20130115
>> pkgrel=0
>>
>> pkgdesc="C Websockets Server Library"
>> arch=(i686 x86_64)
>> url='http://git.warmcat.com/cgi-bin/cgit/libwebsockets'
>> license=(LGPL)
>>
>> depends=()
>> makedepends=(git)
>> provides=('libwebsockets')
>>
>> _gitroot="git://git.warmcat.com/libwebsockets"
>> _gitbranch="master"
>> _gitname="libwebsockets"
>>
>> source=()
>> md5sums=()
>>
>> build() {
>>
>>    msg "Building ${pkgname}..."
>>
>>    if [ -d "$_gitname" ] ; then
>>      warning 'Repository directory already exists!'
>>      cd "$_gitname"
>>      git checkout master
>>      msg2 "Pulling..."
>>      git pull "$_gitroot" master
>>    else
>>      msg2 "Cloning $_gitroot repository..."
>>      git clone "$_gitroot" "$_gitname"
>>      cd "$_gitname"
>>      git checkout "$_gitbranch"
>>    fi
>>
>>    ./autogen.sh
>>
>>    ./configure --prefix=/usr
>>
>>    make
>> }
>>
>> package(){
>>
>>    msg "Packaging ${pkgname}..."
>>    cd "$_gitname"
>>    make DESTDIR="$pkgdir" install
>>
>> }
>>
>>
>

I think it is probably autotools 2.13, it introduces quite a few changes 
and makes a few things obsolete. I have recently seen '-I m4' cropping 
up here and there, however the new change fixes it.

I know run into a new build error however:

make  all-recursive
make[1]: Entering directory `/home/jack/libwebsockets-git/src/libwebsockets'
Making all in lib
make[2]: Entering directory 
`/home/jack/libwebsockets-git/src/libwebsockets/lib'
../scripts/kernel-doc -html \
                 libwebsockets.c \
     parsers.c \
     client-handshake.c \
                 libwebsockets.h \
         > ../libwebsockets-api-doc.html
Warning(parsers.c:5442): No description found for parameter 'context'
make[2]: Leaving directory 
`/home/jack/libwebsockets-git/src/libwebsockets/lib'
Making all in test-server
make[2]: Entering directory 
`/home/jack/libwebsockets-git/src/libwebsockets/test-server'
gcc -DHAVE_CONFIG_H -I. -I..     -DEXTERNAL_POLL  -Werror -Wall 
-std=gnu99 -pedantic -DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -MT 
libwebsockets_test_server_extpoll-test-server.o -MD -MP -MF 
.deps/libwebsockets_test_server_extpoll-test-server.Tpo -c -o 
libwebsockets_test_server_extpoll-test-server.o `test -f 'test-server.c' 
|| echo './'`test-server.c
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -Werror -Wall -std=gnu99 
-pedantic -DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1,--sort-common,--as-needed,-z,relro 
-o libwebsockets-test-server libwebsockets_test_server-test-server.o 
-L../lib -lwebsockets -lz
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -Werror -Wall -std=gnu99 
-pedantic -DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1,--sort-common,--as-needed,-z,relro 
-o libwebsockets-test-client libwebsockets_test_client-test-client.o 
-L../lib -lwebsockets -lz
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -Werror -Wall -std=gnu99 
-pedantic -DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1,--sort-common,--as-needed,-z,relro 
-o libwebsockets-test-fraggle libwebsockets_test_fraggle-test-fraggle.o 
-L../lib -lwebsockets -lz
/bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -Werror -std=gnu99 
-pedantic -DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1,--sort-common,--as-needed,-z,relro 
-o libwebsockets-test-ping libwebsockets_test_ping-test-ping.o -L../lib 
-lwebsockets
libtool: link: gcc -Wall -Werror -std=gnu99 -pedantic 
-DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1 -Wl,--sort-common -Wl,--as-needed 
-Wl,-z -Wl,relro -o .libs/libwebsockets-test-ping 
libwebsockets_test_ping-test-ping.o -L../lib 
/home/jack/libwebsockets-git/src/libwebsockets/lib/.libs/libwebsockets.so -lz
libtool: link: gcc -Werror -Wall -std=gnu99 -pedantic 
-DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1 -Wl,--sort-common -Wl,--as-needed 
-Wl,-z -Wl,relro -o .libs/libwebsockets-test-fraggle 
libwebsockets_test_fraggle-test-fraggle.o  -L../lib 
/home/jack/libwebsockets-git/src/libwebsockets/lib/.libs/libwebsockets.so -lz
test-server.c: In function ‘callback_http’:
test-server.c:243:50: error: array subscript is above array bounds 
[-Werror=array-bounds]
test-server.c:244:47: error: array subscript is above array bounds 
[-Werror=array-bounds]
libtool: link: gcc -Werror -Wall -std=gnu99 -pedantic 
-DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1 -Wl,--sort-common -Wl,--as-needed 
-Wl,-z -Wl,relro -o .libs/libwebsockets-test-client 
libwebsockets_test_client-test-client.o  -L../lib 
/home/jack/libwebsockets-git/src/libwebsockets/lib/.libs/libwebsockets.so -lz
libtool: link: gcc -Werror -Wall -std=gnu99 -pedantic 
-DINSTALL_DATADIR=\"/usr/share\" 
-DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 -D_DEBUG -Wl,-O1 -Wl,--sort-common -Wl,--as-needed 
-Wl,-z -Wl,relro -o .libs/libwebsockets-test-server 
libwebsockets_test_server-test-server.o  -L../lib 
/home/jack/libwebsockets-git/src/libwebsockets/lib/.libs/libwebsockets.so -lz
cc1: all warnings being treated as errors
make[2]: *** [libwebsockets_test_server_extpoll-test-server.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory 
`/home/jack/libwebsockets-git/src/libwebsockets/test-server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jack/libwebsockets-git/src/libwebsockets'
make: *** [all] Error 2


-- 

   Jack Mitchell (jack at embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--




More information about the Libwebsockets mailing list