Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

starpack - portability problem with shared libraries needed by expect

46 views
Skip to first unread message

ben.c...@gmail.com

unread,
Nov 12, 2012, 6:05:47 AM11/12/12
to
I am writing a TCL/expect app using a starpack with the goal of making a single fairly portable executable. I have expect included as a package and my app works fine on my dev platform which is linux. However I run into a problem when I run it on an older version of the same distribution:

couldn't load file "/tmp/tclKx5fFk": /lib/libc.so.6: version `GLIBC_2.7' not found (required by /tmp/tclKx5fFk)

My version of libc is actually 2.12, old version is 2.5. I would hazard a guess the 2.7 comes from a requirement of expect 5.45 not the machine it was compiled on but I'm not sure how to check this (limited knowledge of C here).

So what in general are my options and what is best practice?
- Compile expect on an as old a platform as practical?
- Include the dependant libraries in the starpack? i.e. by modifying expect's pkgindex to 'preload' the dependant libraries before loading expect
- Build a 'monolithic' expect library that includes all dependencies?

Robert Heller

unread,
Nov 12, 2012, 7:14:21 AM11/12/12
to
At Mon, 12 Nov 2012 03:05:47 -0800 (PST) "b...@spam.com" <ben.c...@gmail.com> wrote:

>
> I am writing a TCL/expect app using a starpack with the goal of making a si=
> ngle fairly portable executable. I have expect included as a package and my=
> app works fine on my dev platform which is linux. However I run into a pro=
> blem when I run it on an older version of the same distribution:
>
> couldn't load file "/tmp/tclKx5fFk": /lib/libc.so.6: version `GLIBC_2.7' no=
> t found (required by /tmp/tclKx5fFk)
>
> My version of libc is actually 2.12, old version is 2.5. I would hazard a g=
> uess the 2.7 comes from a requirement of expect 5.45 not the machine it was=
> compiled on but I'm not sure how to check this (limited knowledge of C her=
> e).
>
> So what in general are my options and what is best practice?
> - Compile expect on an as old a platform as practical?=20

Yes. Pick a platform as your 'minimumal' supported version. Maybe do
a survey of distros / releases to find a reasonable version cutoff
point.

> - Include the dependant libraries in the starpack? i.e. by modifying expec=
> t's pkgindex to 'preload' the dependant libraries before loading expect

This might be problematical for some libraries, like GLIBC, which is
already loaded and 'bound'.

> - Build a 'monolithic' expect library that includes all dependencies?=20

Again this might be problematical for some libraries, like GLIBC, (see above).

>

--
Robert Heller -- 978-544-6933 / hel...@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments



ben.c...@gmail.com

unread,
Nov 12, 2012, 8:55:52 PM11/12/12
to

> > - Compile expect on an as old a platform as practical?=20
>
> Yes. Pick a platform as your 'minimumal' supported version. Maybe do
> a survey of distros / releases to find a reasonable version cutoff
> point.
>
> > - Include the dependant libraries in the starpack? i.e. by modifying expec=
> > t's pkgindex to 'preload' the dependant libraries before loading expect
>
> This might be problematical for some libraries, like GLIBC, which is
> already loaded and 'bound'.
>
> > - Build a 'monolithic' expect library that includes all dependencies?=20
>
> Again this might be problematical for some libraries, like GLIBC, (see above).

Well that works with minimal effort. I just had to compile on the old machine and copy over the libraries.

Was initially surprised that is the preferred option but I guess starpacks were never intended to incorporate these common system libraries.

cheers
0 new messages