freecwmp
[Top] [All Lists]

Re: freeacs build error

To: Khaled Ben Amor <khaled.benamor@gmail.com>
Subject: Re: freeacs build error
From: Luka Perkov <freecwmp@lukaperkov.net>
Date: Mon, 20 May 2013 10:25:53 +0200
Cc: freecwmp@linux-mips.org
In-reply-to: <CAAhnz5ipTiHFm7SX67bwi7nfZcNbmOLk967NkhuFySw4_hLE7w@mail.gmail.com>
Mail-followup-to: Khaled Ben Amor <khaled.benamor@gmail.com>, freecwmp@linux-mips.org
Original-recipient: rfc822;freecwmp@linux-mips.org
References: <CAAhnz5ipTiHFm7SX67bwi7nfZcNbmOLk967NkhuFySw4_hLE7w@mail.gmail.com>
Sender: freecwmp-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
Hi Khaled,

On Thu, May 16, 2013 at 04:13:19PM +0100, Khaled Ben Amor wrote:
> I get freeacs and all its dependency code by  git.

Please install patches for the dependencies that can be found in this
git repository:

git clone git://dev.freecwmp.org/packages-arch-tr069/

> I manually copied .so and .h files into /usr/include and /usr/lib for the
> following libraries :
> 
>    - cscgi
>    - cnetstring
> 
> because no make install is defined.

Like said above look at that git repository to see how to install the
packages. The patches you should install are:

packages-arch-tr069/cscgi/001-cmake-fixes.patch
packages-arch-tr069/cnetstring/001-shared-library-and-installer-support.patch

> When I tried to make freeacs code I obtain following error :
> 
> Making all in bin
> make[1]: Entering directory
> `/media/LinuxDisk/projects/pan_router/src/tr69_work/freeacs-ng/bin'
> gcc -std=gnu99 -DPACKAGE_NAME=\"freeacs-ng\"
> -DPACKAGE_TARNAME=\"freeacs-ng\" -DPACKAGE_VERSION=\"0.1\"
> -DPACKAGE_STRING=\"freeacs-ng\ 0.1\" -DPACKAGE_BUGREPORT=\"
> freeacs-ng@lukaperkov.net\" -DPACKAGE_URL=\"\" -DPACKAGE=\"freeacs-ng\"
> -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1 -I.          -I/usr/include/libxml2
> -I/usr/include/json-c    -g -O2 -MT freeacs_ng-freeacs-ng.o -MD -MP -MF
> .deps/freeacs_ng-freeacs-ng.Tpo -c -o freeacs_ng-freeacs-ng.o `test -f
> '../src/freeacs-ng.c' || echo './'`../src/freeacs-ng.c
> ../src/freeacs-ng.c: In function ‘read_cb’:
> ../src/freeacs-ng.c:584: warning: passing argument 1 of ‘scgi_consume’ from
> incompatible pointer type
> /usr/include/scgi.h:275: note: expected ‘const struct scgi_limits *’ but
> argument is of type ‘struct scgi_parser *’
> ../src/freeacs-ng.c:584: warning: passing argument 2 of ‘scgi_consume’ from
> incompatible pointer type
> /usr/include/scgi.h:275: note: expected ‘struct scgi_parser *’ but argument
> is of type ‘char *’
> ../src/freeacs-ng.c:584: warning: passing argument 3 of ‘scgi_consume’
> makes pointer from integer without a cast
> /usr/include/scgi.h:275: note: expected ‘const char *’ but argument is of
> type ‘size_t’
> *../src/freeacs-ng.c:584: error: too few arguments to function
> ‘scgi_consume’*
> make[1]: *** [freeacs_ng-freeacs-ng.o] Error 1
> make[1]: Leaving directory
> `/media/LinuxDisk/projects/pan_router/src/tr69_work/freeacs-ng/bin'
> make: *** [all-recursive] Error 1

Something is not right with your setup. Here is partial output of 
/usr/include/scgi.h
where you can see that scgi_consume is in fact size_t:

289 /*!
290  * @brief Feed data to the parser.
291  * @param data Pointer to first byte of data.
292  * @param size Size of @a data, in bytes.
293  * @return Number of bytes consumed.  Normally, this value is equal to
294  *  @a size.  However, the parser may choose to interrupt parser early or 
stop
295  *  processing data because of an error.
296  *
297  * You should @e always check the parser's @c error field after a call to 
this
298  * method.  In particular, all data may be consumed before an error is
299  * reported, so a return value equal to @a size is not a reliable indicator 
of
300  * success.
301  */
302 size_t scgi_consume (struct scgi_parser * parser,
303                      const char * data, size_t size);


Reinstall all the dependencies using archlinux PKGBUILD files as a
guide.

Luka

<Prev in Thread] Current Thread [Next in Thread>