Forum OpenACS Development: Re: JSON problem

Collapse
2: Re: JSON problem (response to 1)
Posted by Michael Aram on
We recently switched to YAIL-Tcl within one of our apps because its json2dict was by orders of magnitude faster than the tcllib pendant:

http://flightaware.github.io/yajl-tcl/

Collapse
3: Re: JSON problem (response to 2)
Posted by Mattia Righetti on
Thank you Michael, that really seems what I was looking for.
I red the readme and I'm trying to install it... But when I launch the ./configure --with-tcl=/usr/lib/tcl8.6 command, I get this:
checking for correct TEA configuration... ok (TEA 3.9)
checking for Tcl configuration... found /usr/lib/tcl8.6/tclConfig.sh
checking for existence of /usr/lib/tcl8.6/tclConfig.sh... loading
configure: --prefix defaulting to TCL_PREFIX /usr
configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /usr
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
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 if the compiler understands -pipe... yes
checking whether byte ordering is bigendian... no
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking net/errno.h usability... no
checking net/errno.h presence... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for Tcl public headers... /usr/include/tcl8.6
checking for pthread_mutex_init in -lpthread... yes
checking for building with threads... yes (default)
checking how to build libraries... shared
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking if compiler supports visibility "hidden"... yes
checking if rpath support is requested... yes
checking system version... Linux-3.16.0-30-generic
checking for ar... ar
checking for required early compiler flags... _LARGEFILE64_SOURCE
checking for 64-bit integer type... using long
checking for build with symbols... no
checking for tclsh... /usr/bin/tclsh8.6
checking for pkg-config... no
checking for YAJL... no
configure: error: Cannot find yajl



Where did I go wrong?
Collapse
4: Re: JSON problem (response to 3)
Posted by Michael Aram on
You have to install http://lloyd.github.io/yajl/ first, i suppose!
Collapse
5: Re: JSON problem (response to 4)
Posted by Mattia Righetti on
Through a git clone? I did :/
Collapse
6: Re: JSON problem (response to 5)
Posted by Michael Aram on
I have found the following snippets in my "archives":

apt-get install libyajl-dev
cd yajl-tcl
autoconf
./configure --enable-threads --with-tcl=/usr/local/naviserver-4.99.6/lib
make
sudo make install

I hope this helps a bit; I have not tested it now...
Collapse
7: Re: JSON problem (response to 6)
Posted by Mattia Righetti on
Okay, I went trough the makefile program, I found out it's using pkg-config package that wasn't installed. So I had to launch an apt-get install pkg-config.
Now it works! Thank you!