Re: Clearsilver on Mac OS X

Brandon Long <[email protected]>
Newsgroups gmane.text.clearsilver.general
Organization Fiction L Networks
Message-ID <20070403005127.GA17034@bl1>
The problem must be with some timestamps somewhere.  As I said when I
posted the patch, you need to re-run autogen.sh because configure.in has
changed.

Instead of the "standard" thing, where there is no Makefile until you
run configure, there is always a Makefile, and configure generates a
rules.mk file.  This is because the code used to live in a build tree
without configure, and is still used by some people without configure.

So, the Makefile has rules to re-run autogen.sh if configure.in is
newere than configure, and to re-run configure if its newer than
rules.mk, or to run configure if rules.mk doesn't exist.

So, you can get away with just typing make, and it will run configure
for you.

On some machines, when it runs configure for you, it runs it twice.

So, in theory, the correct thing to do would have been:

$ tar xzf clearsilver-0.10.4.tar.gz
$ patch -p0 < macosx.patch
$ ./autogen.sh --disable-ruby --disable-python --disable-perl --with-java=/usr
$ make
$ make install

This will only run configure once.

I'd love to "fix" this, though I'm not sure the best mechanism.  I could
probably just make the Makefile error out if the configure is out of
date or hasn't been run yet, telling you to do so manually.

Brandon

On 04/02/07 Matthew Hixson uttered the following other thing:
> 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
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 

-- 
  "Cynic, n.: A blackguard whose faulty vision sees things as they are, not
	      as they ought to be.  Hence the custom among the Scythians 
	      of plucking out a cynic's eyes to improve his vision."
                                -- Ambrose Bierce, "The Devil's Dictionary"
                                       http://www.fiction.net/blong/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.