You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Karl Lehenbauer <ka...@sc.com> on 2004/09/29 14:37:39 UTC

Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

(Background info for anyone new to the issue:  configure.tcl used to 
silently punt and generate empty target variables for any variables it 
couldn't substitute.  For example, in tclConfig.sh is a definition: 
TCL_SHLIB_LD='cc -dynamiclib ${LDFLAGS}'  When configure.tcl processes 
this, LDFLAGS isn't found.  I caused configure to complain out loud 
about it, which I think is what brought it to David's attention.)

The problem is that these variables are substituted into the Makefile 
from Makefile.in, but are not substituted, or not substituted with 
these names, into tclConfig.sh.

configure did a lot of work to figure this stuff out.  These values 
ought to be there, I think.

We can probably get this fixed in Tcl, if we come up with a good 
solution.

One thing I see right away is that all the variables in tclConfig.sh 
start with TCL_.  If we put in TCL_LDFLAGS=@LDFLAGS@ into 
tclConfig.sh.in, it wouldn't solve the problem, because the references 
like TCL_SHLIB_LD still reference LDFLAGS.

So the fix in the core would be to fix configure.in, tclConfig.sh.in 
and Makefile.in to make TCL_LDFLAGS, TCL_AR, TCL_LIBS, and TCL_VERSION 
and generate and use those.  Then after a shell script imports 
tclConfig.sh, for example, it *really* knows the linker command for 
shared libraries, etc.

These are arguably broken in Tcl, because you can't use some of the 
things propagated into tclConfig.sh as it stands now.  Although there 
is value in getting this fixed, it will take a while and require Rivet 
to work only with the absolute newest version of Tcl, if we adopt this 
approach.

Or we can go to autoconf, as David mentioned.  That'd be the most 
standard and the least surprising to people building the software.  
I've messed with it.  I'm not expert, but I migrated TclX to it and 
libpgtcl.  It's a pain but, you know.

apxs is also interesting and useful.  I was able to use it to figure 
out how to link the mod_rivet.so file on Mac OS X, when Rivet's build 
generated something that Apache couldn't load.  Maybe we can use it to 
do more of the work (simplifying ours) or, I don't know, or it might 
lead us to something.



Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by Pat Thoyts <pa...@zsplat.freeserve.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----

Karl Lehenbauer wrote:
| On Sep 30, 2004, at 7:53 AM, David N. Welton wrote:
|
|> Stubs are for extensions, and Rivet itself isn't one, or so the core
|> folks tell me...
|
|
| mod_rivet.so isn't, but librivet.so and librivetparser.so are.

In fact it is possible to utilize the stubs code to make an application
version agnostic. See http://mini.net/tcl/2074 for some details on this
but the basic plan is you try to dynamically load a tcl shared library,
call Tcl_CreateInterp and then Tcl_InitStubs. The rest of your
application got compiled to use the stubs table so it doesnt matter if
you got tcl 8.5, 8.4....

I have a demo someplace.

Pat Thoyts
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQCVAwUBQV9B3WB90JXwhOSJAQElKAP/WbUpx2F5N4vU6ZbL5u8JRY/DQbhfkbBq
cCWTJ/Q3wjIVLVG8ARKtiKuhmsqAsgSDhYA49GKPeMvvCnBrB7qSKWdYPfeWb5aP
9Dbk3FOlW+EgyCbJQ3uFp2viBy5YDbhUMnoMhVwYZd/wZECMfyr14s0wjN031pwm
c9bCMLjUw40=
=/GYs
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by Tom Krehbiel <to...@freescale.com>.
Pat,

It's true that autoconf has a huge amount of knowledge and experience 
captured from its many years of use, but if you limit the problem to the 
set of platforms actually supported by the latest version of Tcl/Tk the 
problem is significantly reduce. The autoconf commands used to compile 
Tcl/Tk is also a small subset of all possible commands. You might find that 
the problem isn't as difficult as you first thought. I built an autoconf 
like system in tcl to do my builds and it turned out not to be as much work 
as I expected.

Tom K.

> -----BEGIN PGP SIGNED MESSAGE-----
> 
> David N. Welton wrote:
> | Tcl would really make for a beautiful 'auto*' style system.  What it's
> | missing is the "knowledge" of how to do all of what the auto* stuff
> | does.
> 
> Thats why everyone uses the autoconf system. It has an immense amount of
> knowlege of all sorts of corner cases.
> 
> Pat Thoyts
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3-nr1 (Windows XP)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iQCVAwUBQV9CW2B90JXwhOSJAQHwcAP+Nzv2YvmLhB4axCQhbJopNUeqkyyZkcbF
> d0af7w8Lz/FnfmXGiQEUnL/qMplzFQDYgiXpkWyOstyjK3UxKvmNXRJ3JUv5TS0z
> 0aUNXP099NwfQb0MI8+bf7y/5p/AZHXBwAQ8TRJ4xu4knLLHt8HHGHmtDKKZyyJL
> H8KGLlN8HYY=
> =OwvK
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by Pat Thoyts <pa...@zsplat.freeserve.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----

David N. Welton wrote:
| Tcl would really make for a beautiful 'auto*' style system.  What it's
| missing is the "knowledge" of how to do all of what the auto* stuff
| does.

Thats why everyone uses the autoconf system. It has an immense amount of
knowlege of all sorts of corner cases.

Pat Thoyts
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQCVAwUBQV9CW2B90JXwhOSJAQHwcAP+Nzv2YvmLhB4axCQhbJopNUeqkyyZkcbF
d0af7w8Lz/FnfmXGiQEUnL/qMplzFQDYgiXpkWyOstyjK3UxKvmNXRJ3JUv5TS0z
0aUNXP099NwfQb0MI8+bf7y/5p/AZHXBwAQ8TRJ4xu4knLLHt8HHGHmtDKKZyyJL
H8KGLlN8HYY=
=OwvK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:

> On Sep 30, 2004, at 7:53 AM, David N. Welton wrote:

> > Stubs are for extensions, and Rivet itself isn't one, or so the
> > core folks tell me...

> mod_rivet.so isn't, but librivet.so and librivetparser.so are.

Sure... although you have to define the USE_STUBS in configure.ac - it
doesn't seem to be a configure time option:-/

> > I've got it compiling mod_rivet.so, but we're still stuck with
> > making it install all the Tcl files, the init.tcl file, docs, and
> > so on.

> Using Tcl for moving the files around makes perfect sense.
> Installing is more straightforward and the code we have already
> works (or almost)... it's much less tricky or weird than trying to
> get all the compiler and linker flags right.

Right, that makes sense.

> This is probably going to be good.

> I think it's interesting that Apple/Jordan Hubbard went with a Tcl
> build system for darwinports.  FreeBSD's port tree is amazing, but
> it puts Make through incredible contortions.

Tcl would really make for a beautiful 'auto*' style system.  What it's
missing is the "knowledge" of how to do all of what the auto* stuff
does.

-- 
David N. Welton
Personal:                   http://www.dedasys.com/davidw/
Apache Tcl:                 http://tcl.apache.org/
Free Software:              http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by Karl Lehenbauer <ka...@sc.com>.
On Sep 30, 2004, at 7:53 AM, David N. Welton wrote:
> Stubs are for extensions, and Rivet itself isn't one, or so the core
> folks tell me...

mod_rivet.so isn't, but librivet.so and librivetparser.so are.
>

> I've got it compiling mod_rivet.so, but we're still stuck with making
> it install all the Tcl files, the init.tcl file, docs, and so on.
>
Using Tcl for moving the files around makes perfect sense.  Installing 
is more straightforward and the code we have already works (or 
almost)... it's much less tricky or weird than trying to get all the 
compiler and linker flags right.

This is probably going to be good.

I think it's interesting that Apple/Jordan Hubbard went with a Tcl 
build system for darwinports.  FreeBSD's port tree is amazing, but it 
puts Make through incredible contortions.

Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by "David N. Welton" <da...@dedasys.com>.
davidw@dedasys.com (David N. Welton) writes:

> Karl Lehenbauer <ka...@sc.com> writes:

> > Another advantage to using autoconf, if we were TEA-compliant,
> > then Rivet would be loadable with versions of Tcl it wasn't
> > compiled against, etc.

Stubs are for extensions, and Rivet itself isn't one, or so the core
folks tell me...

> > I'm willing to help work on it.  I'm even willing to take the
> > first stab at it.

> I committed some files that I created for TclMagick, as an initial
> starting point.  They don't work yet...

I've got it compiling mod_rivet.so, but we're still stuck with making
it install all the Tcl files, the init.tcl file, docs, and so on.

-- 
David N. Welton
Personal:                   http://www.dedasys.com/davidw/
Apache Tcl:                 http://tcl.apache.org/
Free Software:              http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Sessions

Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:

> David or someone also requested sessions that work with flat files,
> but they're not on my radar at this time.  We (the Rivet dweebs),
> have had some conversation about supporting a super-simple SQL
> database like Metakit,

SQLite - Metakit isn't SQL.

It would require a DIO backend, I guess.  I took a stab at it but
didn't have much luck.

I'm beginning to wonder if maybe it isn't time to have a look at using
nstcl.  It supports:

ns_db (Oracle)		Oratcl 3.x/4.x	http://oratcl.sf.net
ns_db (Postgres)	libpgtcl.so	http://ftp.postgresql.org
ns_db (Solid)		Soltcl 0.2.1	http://bolts.guam.net/soltcl
ns_db (Sybase)		Sybtcl 3.x	http://sybtcl.sf.net
ns_db (SQLite)		tclsqlite.so	http://www.hwaci.com/sw/sqlite
ns_db (MySQL)		mysqltcl	http://www.xdobry.de/mysqltcl
ns_db (ODBC)

and seems to have a greater demand-side economy of scale... more
users, more backends = positive feedback.

-- 
David N. Welton
Personal:                   http://www.dedasys.com/davidw/
Apache Tcl:                 http://tcl.apache.org/
Free Software:              http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Sessions

Posted by Tom Krehbiel <to...@freescale.com>.
Karl,

...snip...
> David or someone also requested sessions that work with flat files, but
> they're not on my radar at this time.  We (the Rivet dweebs), have had 
> some conversation about supporting a super-simple SQL database like 
> Metakit,
...snip...

I'm the person that asked for flat file support for sessions. However I 
would consider a Metakit interface an even better interface particularly if 
it enabled the distribution of a single shared object as the Rivet module.

Tom K.

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Sessions

Posted by Karl Lehenbauer <ka...@sc.com>.
On Sep 29, 2004, at 10:55 AM, GoMp @ tcl.no wrote:

> Any examples on using sessions? Like earlier stated, I need it for a 
> login
> form, and it using flatfile databases. No *SQL databases, which are
> mentioned in the manpages for sessions. If someone has some concrete
> examples, I would be very thankful.
>
I apologize for the delay in responding.

The session package does require a SQL database.  It has two tables, 
rivet_session, and rivet_session_cache.

Rivet_session is indexed by session_id and IP address.  
rivet_session_cache is indexed by session_id, package
and key.

The fanciest bit of SQL is...

delete from $sessionTable where timestamp 'now' - session_update_time > 
interval '$gcMaxLifetime seconds';

Anyway the existing session package does require SQL as of right now, 
and has only actually been tested with PostgreSQL, as far as I know.

David or someone also requested sessions that work with flat files, but 
they're not on my radar at this time.  We (the Rivet dweebs), have had 
some conversation about supporting a super-simple SQL database like 
Metakit,

Adding usage examples to the documentation is a really good idea.

If you're willing to keep going with PostgreSQL, I'll help you along in 
getting sessions up.

Sessions

Posted by "GoMp @ tcl.no" <Go...@tcl.no>.
Any examples on using sessions? Like earlier stated, I need it for a login
form, and it using flatfile databases. No *SQL databases, which are
mentioned in the manpages for sessions. If someone has some concrete
examples, I would be very thankful.

Sincerely
    GoMp
    www.tcl.no
    www.g0mp.org


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:

> Another advantage to using autoconf, if we were TEA-compliant, then
> Rivet would be loadable with versions of Tcl it wasn't compiled
> against, etc.
> 
> I'm willing to help work on it.  I'm even willing to take the first
> stab at it.

I committed some files that I created for TclMagick, as an initial
starting point.  They don't work yet... 

-- 
David N. Welton
Personal:                   http://www.dedasys.com/davidw/
Apache Tcl:                 http://tcl.apache.org/
Free Software:              http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by Karl Lehenbauer <ka...@sc.com>.
I came across a bug report for this problem, from 1999.

http://sourceforge.net/tracker/? 
group_id=10894&atid=110894&func=detail&aid=218294

Hobbs closed it saying  "This is the desired behavior as the necessary  
substitutions will be made later when they are used by things like Tk  
or other extensions."

No extension would ever use a different ar, I don't think.  LDFLAGS?   
Again unlikely that you'd want something other than what Tcl used.   
VERSION?  I don't think it will work if it's different.  And LIBS, too,  
you might want libs to be supported, but an app isn't going to NOT need  
what was in the LIBS variable.

I think Jeff might have closed this without...  wait a minute...  for  
things using autoconf, this is probably totally reasonable, because  
configure will have generated these variables.

Another advantage to using autoconf, if we were TEA-compliant, then  
Rivet would be loadable with versions of Tcl it wasn't compiled  
against, etc.

I'm willing to help work on it.  I'm even willing to take the first  
stab at it.


On Sep 29, 2004, at 8:27 AM, David N. Welton wrote:

> Karl Lehenbauer <ka...@sc.com> writes:
>
>> Or we can go to autoconf, as David mentioned.  That'd be the most
>> standard and the least surprising to people building the software.
>> I've messed with it.  I'm not expert, but I migrated TclX to it and
>> libpgtcl.  It's a pain but, you know.
>
> Hrm, maybe I will take a stab at it:-/ Help much appreciated though.
> I mostly got TclMagick to work using that stuff, although it was not
> fun at all.
>
> I still think we are going to run into troubles like 'where do we put
> the stuff', so we'd best decide that.
>
>> apxs is also interesting and useful.  I was able to use it to figure
>> out how to link the mod_rivet.so file on Mac OS X, when Rivet's
>> build generated something that Apache couldn't load.  Maybe we can
>> use it to do more of the work (simplifying ours) or, I don't know,
>> or it might lead us to something.
>
> I try and merge what apxs and tcl give me.  If Tcl had something like
> apxs, it would make things really pretty easy, I think.  But they
> don't, and aren't likely to, so I guess we can have a look at the auto
> crud.
>
> -- 
> David N. Welton
> Personal:                   http://www.dedasys.com/davidw/
> Apache Tcl:                 http://tcl.apache.org/
> Free Software:              http://www.dedasys.com/freesoftware/
> Linux Incompatibility List: http://www.leenooks.com/
>

Re: Here's why LDFLAGS, AR, LIBS, and VERSION aren't found

Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:

> Or we can go to autoconf, as David mentioned.  That'd be the most
> standard and the least surprising to people building the software.
> I've messed with it.  I'm not expert, but I migrated TclX to it and
> libpgtcl.  It's a pain but, you know.

Hrm, maybe I will take a stab at it:-/ Help much appreciated though.
I mostly got TclMagick to work using that stuff, although it was not
fun at all.

I still think we are going to run into troubles like 'where do we put
the stuff', so we'd best decide that.

> apxs is also interesting and useful.  I was able to use it to figure
> out how to link the mod_rivet.so file on Mac OS X, when Rivet's
> build generated something that Apache couldn't load.  Maybe we can
> use it to do more of the work (simplifying ours) or, I don't know,
> or it might lead us to something.

I try and merge what apxs and tcl give me.  If Tcl had something like
apxs, it would make things really pretty easy, I think.  But they
don't, and aren't likely to, so I guess we can have a look at the auto
crud.

-- 
David N. Welton
Personal:                   http://www.dedasys.com/davidw/
Apache Tcl:                 http://tcl.apache.org/
Free Software:              http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org