Re: Clearsilver on Mac OS X
Matthew Hixson <[email protected]>
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Message-ID | <[email protected]> |
I figured out how to get the jnilib to build, and its not pretty.
$ tar xzf clearsilver-0.10.4.tar.gz
$ patch -p0 < macosx.patch
patching file clearsilver-0.10.4/cgi/cgiwrap.c
patching file clearsilver-0.10.4/configure.in
patching file clearsilver-0.10.4/cs_config.h.in
patching file clearsilver-0.10.4/java-jni/Makefile
patching file clearsilver-0.10.4/python/setup.py
patching file clearsilver-0.10.4/rules.mk.in
$ ./configure --disable-ruby --disable-python --disable-perl --with-
java=/usr
That runs through configure normally.
$ make
./autogen.sh
autoheader: WARNING: Using auxiliary files such as `acconfig.h',
`config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for
`config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template
without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader: [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be
produced, see the
autoheader: WARNING: documentation.
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
...etc....
I don't know what's going wrong there, but running make causes
configure to run even though I already ran it. At the end of that
configure run, it immediately runs configure a second time.
....end of configure run above...
config.status: cs_config.h is unchanged
./configure
checking for gcc... gcc
... configure completes ...
At this point it actually starts building (this is where I would
expect it to start after running make). However, these extra runs
through configure were not given any arguments, so its not
configuring using the --with-java argument that I passed in when I
ran configure manually. So the jnilib doesn't get built.
Now 'make clean'.
Run configure again:
./configure --disable-ruby --disable-python --disable-perl --with-
java=/usr
make
This time make runs as it should and begins compiling. At the end of
this run you will see it run the Java test and you will have a
libclearsilver-jni.jnilib file.
So, in summary here are the commands I ran to get the jnilib to build.
1) ./configure --disable-ruby --disable-python --disable-perl --with-
java=/usr
2) make
3) make clean
4) ./configure --disable-ruby --disable-python --disable-perl --with-
java=/usr
5) make
I don't have time to fix this patch so that ClearSilver builds like
one would expect, but maybe these instructions could get added to the
README.
Now I'll see if I can figure out where to put this in order to get
it to run under Tomcat.
-M@
On Apr 2, 2007, at 11:08 AM, Brandon Long wrote:
> I'm worried that you ended up with a .so after applying my patch.
> There
> should have been code in java-jni/Makefile to do the right thing.
>
> You can also try running the test in java-jni by typing make test
> in the
> java-jni directory. If that works, then the library is fine, and then
> its a question of the right paths, and maybe differences between
> the run
> environment under apache/tomcat and the java version it found for the
> test.
>
> Brandon