blong42 / clearsilver

Official repository for the ClearSilver templating language and webkit
http://www.clearsilver.net/
Other
57 stars 25 forks source link

ClearSilver doesn't compile #16

Closed sjlongland closed 5 years ago

sjlongland commented 6 years ago

On Gentoo Linux (security hardened with musl libc).

gallery ~/clearsilver-clearsilver-0.11.0 # ./autogen.sh
aclocal-1.15: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:511: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
configure.in:511: the top level
autoheader-2.69: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader-2.69: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader-2.69: WARNING: is deprecated and discouraged.
autoheader-2.69:
autoheader-2.69: WARNING: Using the third argument of `AC_DEFINE' and
autoheader-2.69: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a template without
autoheader-2.69: WARNING: `acconfig.h':
autoheader-2.69:
autoheader-2.69: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader-2.69:                [Define if a function `main' is needed.])
autoheader-2.69:
autoheader-2.69: WARNING: More sophisticated templates can also be produced, see the
autoheader-2.69: WARNING: documentation.
configure.in:511: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
configure.in:511: the top level
configure.in:511: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
configure.in:511: the top level
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 ln -s works... yes
checking for ar... ar
checking for ranlib... ranlib
checking whether make sets $(MAKE)... yes  
checking for a BSD-compatible install... /usr/bin/install -c
checking for Neotonic Paths... not found   
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
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/wait.h that is POSIX.1 compatible... 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 fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking varargs.h usability... no
checking varargs.h presence... no
checking for varargs.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking features.h usability... yes
checking features.h presence... yes
checking for features.h... yes
checking for an ANSI C-conforming const... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for vprintf... yes
checking for _doprnt... no
checking for wait3 that fills in rusage... yes
checking for gettimeofday... yes
checking for mktime... yes
checking for putenv... yes
checking for strerror... yes
checking for strspn... yes
checking for strtod... yes
checking for strtol... yes
checking for strtoul... yes
checking for random... yes
checking for rand... yes
checking for drand48... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for lockf... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for localtime_r... yes
checking whether localtime_r is declared... yes
checking for gmtime_r... yes
checking whether gmtime_r is declared... yes
checking for strtok_r... yes
checking whether strtok_r is declared... yes
checking for mkstemp... yes
checking for regexec... yes
checking for deflate in -lz... yes
checking for apache apxs... found /usr/bin/apxs
checking for apache 1.3.x... ./configure: line 5370: /usr/bin/httpd: No such file or directory
found  - disabling module build
checking for python includes... found /usr/include/python2.7
checking for perl >= 5.006... found /usr/bin/perl
checking for ruby... not found
checking for j2sdk path... not found
checking for csharp path... not found
configure: creating ./config.status
config.status: creating rules.mk
config.status: WARNING:  'rules.mk.in' seems to ignore the --datarootdir setting
config.status: creating cs_config.h
gallery ~/clearsilver-clearsilver-0.11.0 # make
*******************************************
** Building Dependencies
** OSNAME: Linux
** (done)
make[1]: Entering directory '/root/clearsilver-clearsilver-0.11.0/util'
*******************************************
** Building Dependencies
** OSNAME: Linux
** (done)
make[1]: Leaving directory '/root/clearsilver-clearsilver-0.11.0/util'
make[1]: Entering directory '/root/clearsilver-clearsilver-0.11.0/cs'
*******************************************
** Building Dependencies
** OSNAME: Linux
** (done)
make[1]: Leaving directory '/root/clearsilver-clearsilver-0.11.0/cs'
make[1]: Entering directory '/root/clearsilver-clearsilver-0.11.0/cgi'
*******************************************
** Building Dependencies
** OSNAME: Linux
** (done)
make[1]: Leaving directory '/root/clearsilver-clearsilver-0.11.0/cgi'
make[1]: Entering directory '/root/clearsilver-clearsilver-0.11.0/python'
*******************************************
** Building Dependencies
** OSNAME: Linux
** (done)
make[1]: Leaving directory '/root/clearsilver-clearsilver-0.11.0/python'
make -C /root/clearsilver-clearsilver-0.11.0/streamhtmlparser PREFIX=/usr/local || exit 1;
make[1]: *** /root/clearsilver-clearsilver-0.11.0/streamhtmlparser: No such file or directory.  Stop.
make: *** [Makefile:23: /root/clearsilver-clearsilver-0.11.0/streamhtmlparser/.libs/libstreamhtmlparser.a] Error 1
gallery ~/clearsilver-clearsilver-0.11.0 # make install
make -C /root/clearsilver-clearsilver-0.11.0/streamhtmlparser PREFIX=/usr/local || exit 1;
make[1]: *** /root/clearsilver-clearsilver-0.11.0/streamhtmlparser: No such file or directory.  Stop.
make: *** [Makefile:23: /root/clearsilver-clearsilver-0.11.0/streamhtmlparser/.libs/libstreamhtmlparser.a] Error 1

streamhtmlparser seems to be missing. Is there some step I missed?

mvaranda commented 6 years ago

Also tried to build and also error building "streamhtmlparser". I removed it from Makefile and got other errors even in heade files (sysntax): gcc -g -O2 -pthread -Wall -I.. -I/src -fPIC -o csparse.o -c csparse.c In file included from csparse.c:39:0: csparse.c: In function ‘read_auto_status’: ../util/neo_misc.h:216:75: error: expected expression before ‘)’ token ne_logf(PRETTY_FUNCTION,FILE,LINE,NE_LOG_WARN,f,VA_ARGS) ^ csparse.c:527:7: note: in expansion of macro ‘ne_warn’ ne_warn("Ignoring attempt to change value of Config.AutoEscape\n"); ^ ../rules.mk:154: recipe for target 'csparse.o' failed make: *** [csparse.o] Error 1

I guess this project is broken. Sad... it was very promising for my embedded application.

bkylerussell commented 6 years ago

@mvaranda, what's your gcc version? I hit a similar compile error a while back and proposed c55890f, but I was on clearsilver v0.10.5. I closed #12 because it looked like the newer version was doing something differently, but maybe it is still needed. I just now realized the same check I changed in c55890f still occurs in v0.11.0, but in util/neo_misc.h. Someone has added a defined (COMPILER_GCC4) condition in a775aac, but I'm not familiar with that define and I don't see where it comes from.

bkylerussell commented 6 years ago

@mvaranda I rebased my change and submitted PR #18. I tried building master on my Mac and still encountered the problem.

Apple LLVM version 9.1.0 (clang-902.0.39.2)

bkylerussell commented 6 years ago

To respond to @sjlongland's original issue, yes, streamhtmlparser is a hard dependency. Unless you specify a configure option pointing to streamhtmlparser's directory, it will automatically expect to find a clone of streamhtmlparser's source in clearsilver's top source directory, which is the error you were experiencing. This should probably be a configure error if the directory doesn't exist, instead of waiting for compile-time.

mvaranda commented 6 years ago

Thanks a lot Kyle. I had to move on with my project using different solutions. I am pretty sure more people will benefit of your fix. Best regards.

sjlongland commented 6 years ago

The INSTALL and README documentation makes no mention of this. Like @mvaranda I've now moved on, opting to re-write the photo gallery application I originally wrote in C with a replacement in Python (using Tornado) as it looked like clearsilver was no longer in development.

Plus my needs have changed, I'm no longer running my applications on a second-hand Pentium III 550MHz server, the modern frameworks aren't such a burden now on modern hardware, so re-writing the application in a new framework was an opportunity to try something newer.

blong42 commented 5 years ago

Updated INSTALL to refer to streamhtmlparser, sorry for the late response.