Dynamic vs. Static linking (was Re: RE:Why GPL)

What’s the big problem with dynamically linking libraries anyhow? Not only
does it make your executable smaller, but it also means you don’t need to do
a rebuild of your code if a bugfixed ver. of the library comes out.

I don’t see why it’d be a “pain” – other than for debugging, but then you
can just statically link while debugging, and then switch over to dynamic
linking for release. No problem, eh?> ----- Original Message -----

From: nbs@sonic.net (Bill Kendrick)
To:
Sent: Friday, April 19, 2002 11:54 AM
Subject: Re: [SDL] RE:Why GPL

On Fri, Apr 19, 2002 at 02:25:21PM -0400, Kent Quirk wrote:

So I’m using SDL to make a game. It’s a bit of a pain, because while
I’d like to statically link the libraries, at least under Windows, I
can’t. I have to dynamically link them. Poor me.

I beleive you CAN statically link to SDL, as long as you make .o versions
of your game itself available to be re-linked against other versions of
SDL.

-bill!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Well for some libraries, you just don’t get the choice. OpenGL for
example, is one thing that would be suicidal to statically link. On the
other hand, some things like zlib or various graphics loaders or whatever
else are easier to compile in so that you are assured that they work
right. Never underestimate the power of various vendors to screw up the
OS the people using your software happen to run. And I’m not just talking
about the one in Redmond either. Even with OpenGL, several Linux vendors
have managed to screw it up beyond belief.

How anyone can manage to screw up OpenGL given the ABI document is a big
question I’ve not got an answer for, but that they’ve done so is one of my
pet rants I usually restate every few months - more often than not on this
list. ;)On Fri, Apr 19, 2002 at 12:21:38PM -0700, Eron Hennessey wrote:

What’s the big problem with dynamically linking libraries anyhow? Not only
does it make your executable smaller, but it also means you don’t need to do
a rebuild of your code if a bugfixed ver. of the library comes out.

I don’t see why it’d be a “pain” – other than for debugging, but then you
can just statically link while debugging, and then switch over to dynamic
linking for release. No problem, eh?


Joseph Carter I N33D MY G4M3Z, D00D!!!111!!
(Just … don’t ask)

Be warned, I have a keyboard I can use to beat luser’s heads
in, and then continue to use… (=:]
Mercury: Oh, an IBM. :slight_smile:

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020419/0040f2df/attachment.pgp

It’s a pain for the end user generally. For Windows users especially, they
don’t like having to track down various different libraries and install the
runtime stuff for it. They just want the program to be stand-alone and easy
to run.> ----- Original Message -----

From: eronh@nanoknight.com (Eron Hennessey)
To:
Sent: Friday, April 19, 2002 3:21 PM
Subject: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

What’s the big problem with dynamically linking libraries anyhow? Not
only
does it make your executable smaller, but it also means you don’t need to
do
a rebuild of your code if a bugfixed ver. of the library comes out.

I don’t see why it’d be a “pain” – other than for debugging, but then you
can just statically link while debugging, and then switch over to dynamic
linking for release. No problem, eh?

I found the problem more with linux than windows… usually the libs are
included in windows…

In linux once I had something like this:

Lib Foo 3.5 needs RPM 4.0.1 to install…
go to install RPM 4.0.1, RPM 4.0.1 needs Foo 3.5 to install…

libs are much more of a nightmare in linux I think… They are what made me
give up using it… (once I had a chain of 6 libs to install before getting
what I wanted to work)

-Jim

Ah, yes. See, I’m so used to installing necessary libs from ports (or
portage). :slight_smile: No tracking down necessary.

Is there anything keeping you from including a redist of an SDL DLL with the
program?> ----- Original Message -----

From: jason@hoffoss.com (Jason Hoffoss)
To:
Sent: Friday, April 19, 2002 3:01 PM
Subject: Re: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

It’s a pain for the end user generally. For Windows users especially,
they
don’t like having to track down various different libraries and install
the
runtime stuff for it. They just want the program to be stand-alone and
easy
to run.

----- Original Message -----
From: “Eron Hennessey” <@Eron_Hennessey>
To:
Sent: Friday, April 19, 2002 3:21 PM
Subject: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

What’s the big problem with dynamically linking libraries anyhow? Not
only
does it make your executable smaller, but it also means you don’t need
to
do

a rebuild of your code if a bugfixed ver. of the library comes out.

I don’t see why it’d be a “pain” – other than for debugging, but then
you

can just statically link while debugging, and then switch over to
dynamic

linking for release. No problem, eh?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

That’s not a problem with Linux, but with the RPM system. :stuck_out_tongue:

RPMs will tell you they have failed dependencies, but won’t do anything
about it.
If you’re using any RPM-based system, I highly recommend using Ximian’s Red
Carpet – it really makes managing the RPMs much easier.> ----- Original Message -----

From: stapleton.41@osu.edu (Steven James Stapleton)
To:
Sent: Friday, April 19, 2002 3:06 PM
Subject: Re: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

I found the problem more with linux than windows… usually the libs are
included in windows…

In linux once I had something like this:

Lib Foo 3.5 needs RPM 4.0.1 to install…
go to install RPM 4.0.1, RPM 4.0.1 needs Foo 3.5 to install…

libs are much more of a nightmare in linux I think… They are what made
me
give up using it… (once I had a chain of 6 libs to install before
getting
what I wanted to work)

-Jim


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Then just throw the DLLs in together with the EXE. What’s the problem?

99.9% of all games use a bunch of data files anyway, so the Single File
Game doesn’t seem to be a real goal anyway…

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Saturday 20 April 2002 00:01, Jason Hoffoss wrote:

It’s a pain for the end user generally. For Windows users especially,
they don’t like having to track down various different libraries and
install the runtime stuff for it. They just want the program to be
stand-alone and easy to run.

I found the problem more with linux than windows… usually the libs are
included in windows…

In linux once I had something like this:

Lib Foo 3.5 needs RPM 4.0.1 to install…
go to install RPM 4.0.1, RPM 4.0.1 needs Foo 3.5 to install…

That’s why I’ve given up on RPM. It’s just getting on my nerves most of
the time.

What’s wrong with

./configure
make		(usually optional, actually)
make install

?

The success rate of that is much higher in my experience, and you can
also tweak the configuration while you’re at it.

libs are much more of a nightmare in linux I think… They are what
made me give up using it… (once I had a chain of 6 libs to install
before getting what I wanted to work)

Yeah, that’s still a real problem, indeed. One should probably try
Debian, but I’m going to try Gentoo first, being that I generally rebuild
vital parts of my systems from source anyway. (It’s kind of nice knowing
for sure that the compiler installed is actually one that generates
binaries that are compatibel with the rest of the system… heh)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Saturday 20 April 2002 00:06, Steven James Stapleton wrote:

That’s not a problem with Linux, but with the RPM system. :stuck_out_tongue:

RPMs will tell you they have failed dependencies, but won’t do anything
about it.

…and when it takes half an hour to figure out what to search for on
rpmfind, is about when I start using unprintable words, throw the crap
away and start downloading source tarballs instead. (They usually contain
more info on the dependencies than the RPMs…)

If you’re using any RPM-based system, I highly recommend using Ximian’s
Red Carpet – it really makes managing the RPMs much easier.

Hmm… Oh, well. It’s probably too late for me anyway. Mandrake has
killed whatever might have remained of my faith in RPM.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Saturday 20 April 2002 00:24, Eron Hennessey wrote:

David,

RPM has only one advantage (and only if RPM package was formed properly) -
it warranty to delete all files it installs and not more. For me it is a
problem to track down what files got onto my system and all software
dependent on the files which has been installed later.
I guess that it could not take much time to add RPM ability find on
Internet a package on which it depends - download and install it. But for
now we have only two options or hunting for a RPMs on rpmfind or use
tarballs. I would prefer second one if there was no problem with removing
installed files. Unfortunately not many developers bother add a section into
make file to remove all installed files. install-sh which is used in many
cases doesn’t create any “log file” to help with removing installed files.
If I would speak on behalf of Limux comunity I would propose add a few
sections into makefiles for package like:

  1. download (use external utility like wget)
  2. chkcompat (check compatibility with installed software + requirements)
  3. chkdepend (download missing packages and pass control to their make
    files)

in this case all what you need download is one makefile which initiate
"chain reaction". Yes it is a lot of work and require some standard here but
it could make the job well once been establish.
Unfortunately many companies wants to be “first” and create
software/hardware - a documentation for which is not available. For most
consumers it doesn’t matter till they will not face a problem like - the
company was not able to keep up with market and it doesn’t exist already,
but where get a driver for new version of OS.
Well I have some idea how to improve this situation but it will depends
on opinion of the people and companies. My experience shows that not that
many people think about global improvements and “good for everyone” (sorry
but even I myself catch myself on this thought sometime - it is personal
true confession) and I am not sure that I will get wide support. I would
move forward in this direction but I do not have enough experience (3 years
in Canada and English my second language - what make me difficult to
convince the people, financial and law part is dead end for me here) and I
still need to pay my bills as there is no support from my wife and family
(Originally I am from Kazakhstan and my relatives still there what makes me
worry about them). But I still keep hope because I know about two greate
stories - GNU/Stallman and Linux/Linus. I would like to stand close to them
one day but again they did what they did not along and they got a great
support from people around the world. If I will get same support - success
is not escapable - people will see advantage of the idea. Principle of the
idea is do it once, put a lot in development for compatibility, and make it
available for every one, one command which makes a magic.

andrey

David Olofson wrote:> On Saturday 20 April 2002 00:06, Steven James Stapleton wrote:

I found the problem more with linux than windows… usually the libs are
included in windows…

In linux once I had something like this:

Lib Foo 3.5 needs RPM 4.0.1 to install…
go to install RPM 4.0.1, RPM 4.0.1 needs Foo 3.5 to install…

That’s why I’ve given up on RPM. It’s just getting on my nerves most of
the time.

What’s wrong with

    ./configure
    make            (usually optional, actually)
    make install

?

The success rate of that is much higher in my experience, and you can
also tweak the configuration while you’re at it.

libs are much more of a nightmare in linux I think… They are what
made me give up using it… (once I had a chain of 6 libs to install
before getting what I wanted to work)

Yeah, that’s still a real problem, indeed. One should probably try
Debian, but I’m going to try Gentoo first, being that I generally rebuild
vital parts of my systems from source anyway. (It’s kind of nice knowing
for sure that the compiler installed is actually one that generates
binaries that are compatibel with the rest of the system… heh)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -’


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

What’s wrong with

./configure
make (usually optional, actually)
make install

in the dozens of times I tried with various things, it’s only worked once. I
gave up with the SDL configuration script and just used the preassembled
DLL.

-Jim

Depends. Seems like more and more software for windows now is starting to
develope requirements like this. Generally it’s software designed for both
linux and windows, and they decide to use a lot of external libraries in
their program, which requires the user to install a lot of libraries in
linux or in windows, unless they’ve linked them in statically. For some
libraries it makes sense, like SDL probably. But a lot of others it
doesn’t. If fact most probably it doesn’t, and for those I would personally
appreciate the ability to just link it in statically.> ----- Original Message -----

From: stapleton.41@osu.edu (Steven James Stapleton)
To:
Sent: Friday, April 19, 2002 6:06 PM
Subject: Re: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

I found the problem more with linux than windows… usually the libs are
included in windows…

In linux once I had something like this:

Lib Foo 3.5 needs RPM 4.0.1 to install…
go to install RPM 4.0.1, RPM 4.0.1 needs Foo 3.5 to install…

libs are much more of a nightmare in linux I think… They are what made
me
give up using it… (once I had a chain of 6 libs to install before
getting
what I wanted to work)

-Jim


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I’m not really talking about SDL. SDL isn’t very bad when it comes to this.
I suppose including DLLs isn’t all that bad, but I find the elegance of just
having 2 files (an executable and one big data file) stranging appealing as
well. :slight_smile: In any case, 10 or 20 DLL files that must go with your probably is
pretty out of hand I’d have to say. I haven’t seen anything that bad yet,
but I get the feeling it’s only a matter of time before I do.> ----- Original Message -----

From: eronh@nanoknight.com (Eron Hennessey)
To:
Sent: Friday, April 19, 2002 6:15 PM
Subject: Re: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

Ah, yes. See, I’m so used to installing necessary libs from ports (or
portage). :slight_smile: No tracking down necessary.

Is there anything keeping you from including a redist of an SDL DLL with
the
program?

----- Original Message -----
From: “Jason Hoffoss”
To:
Sent: Friday, April 19, 2002 3:01 PM
Subject: Re: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

It’s a pain for the end user generally. For Windows users especially,
they
don’t like having to track down various different libraries and install
the
runtime stuff for it. They just want the program to be stand-alone and
easy
to run.

----- Original Message -----
From: “Eron Hennessey”
To:
Sent: Friday, April 19, 2002 3:21 PM
Subject: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

What’s the big problem with dynamically linking libraries anyhow? Not
only
does it make your executable smaller, but it also means you don’t need
to
do

a rebuild of your code if a bugfixed ver. of the library comes out.

I don’t see why it’d be a “pain” – other than for debugging, but then
you

can just statically link while debugging, and then switch over to
dynamic

linking for release. No problem, eh?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Yes, but at least with windows, they usually include the libraries in
distros… In linux you have to search and search and search.

More libraries are better since they are space efficient and keep redundant
code off of your machine… unfortunately dependancys can be a pain…

Isn’t this getting MAJORLY off topic? I can’t resist a good discussion
though…

-Jim

And what developer who knows how win32 software development works does not
include copies of necessary DLLs with the program if they are not already
extremely common? I for one include SDL.DLL routinely with my Win32
releases and most of the people using them are very happy I do so, if they
even realize that I do at all. If I did not, you would not believe the
number of complaints I’d get! (I’ve gotten a few when someone built a
release without them one time…)

Just remember that you really do need to include the source code for the
version of SDL you include in or near the same place as the binary so that
nobody who wants it can’t find it. Sam may take down old versions of SDL
from the official website when they’re obsolete. If you’ve still got a
release floating around with an old version of SDL in it, you should make
sure the source to that version can be found too since the LGPL requires
you do so. (If there are nits, someone will pick them…)

To others who don’t have much experience with Win32 development, remember
that it is possible for several versions of a library to be installed even
without the unix soname method of telling them apart. The version in an
application’s directory will always be preferred. Replacing it with a
newer version or keeping an old version for a particular thing are very
easily done. Of course the lack of versioning which makes this necessary
introduces dependency hell, but that’s the price you pay for dealing with
an inferior OS. ;)On Fri, Apr 19, 2002 at 06:01:50PM -0400, Jason Hoffoss wrote:

It’s a pain for the end user generally. For Windows users especially, they
don’t like having to track down various different libraries and install the
runtime stuff for it. They just want the program to be stand-alone and easy
to run.


Joseph Carter This thing is an AI

DalNet is like the special olympics of IRC. There’s a lot of
drooling goin’ on and everyone is a ‘winner’.

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020419/b03dab99/attachment.pgp

This sounds like the sort of thing I’d expect to see from Mandrake. Has
any other RPM-based dist devolved to this level? ;)On Fri, Apr 19, 2002 at 06:06:59PM -0400, Steven James Stapleton wrote:

In linux once I had something like this:

Lib Foo 3.5 needs RPM 4.0.1 to install…
go to install RPM 4.0.1, RPM 4.0.1 needs Foo 3.5 to install…

libs are much more of a nightmare in linux I think… They are what made me
give up using it… (once I had a chain of 6 libs to install before getting
what I wanted to work)


Joseph Carter If this sig were funny…

I really don’t want much at all… Just a kind word, an
attractive woman, and UNLIMITED BANDWIDTH!!

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020419/c23bc693/attachment.pgp

This sounds like the sort of thing I’d expect to see from Mandrake. Has
any other RPM-based dist devolved to this level? :wink:

Redhat, a bit over a year ago… When I get a second comp and some time,
I’ll prolly play with linux again… but not right now.

Why do your mails appear as attached DAT and TXT files?

-Jim

Yes, but at least with windows, they usually include the libraries in
distros… In linux you have to search and search and search.

More libraries are better since they are space efficient and keep
redundant
code off of your machine… unfortunately dependancys can be a pain…

That is no longer a valid argument. When you can go and get a 20 gig hard
drive cheaply, and typical commercial games now installing about 1 gig worth
of data, code takes up an insignificant amount of space anymore.
Independent upgradability is really the only valid argument left, but it’s
just not practical for most libraries.

Isn’t this getting MAJORLY off topic? I can’t resist a good discussion
though…

Ya. Someone asked, so I answered. This really isn’t the right place to
carry this on, though.

----- Original Message -----
From: stapleton.41@osu.edu (Steven James Stapleton)
To:
Sent: Friday, April 19, 2002 9:17 PM
Subject: Re: Dynamic vs. Static linking (was Re: [SDL] RE:Why GPL)

On Fri, Apr 19, 2002 at 10:40:12PM -0400, Steven James Stapleton wrote :

This sounds like the sort of thing I’d expect to see from Mandrake. Has
any other RPM-based dist devolved to this level? :wink:

Redhat, a bit over a year ago… When I get a second comp and some time,
I’ll prolly play with linux again… but not right now.

Why do your mails appear as attached DAT and TXT files?

He thinks he has to sign every mail he sends with PGP ;-) and
due the content mime headers

    Content-Type: multipart/signed; micalg=pgp-sha1;
        protocol="application/pgp-signature"; boundary="rJwd6BRFiFCcLxzm"

Outlook doesn't know how to handle it. If you install PGP
properly this should not happen.

- Markus-- 

Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" “What QA did you do on it?” “the usual?” “ah… none :)”

libs are much more of a nightmare in linux I think… They are what
made me
give up using it… (once I had a chain of 6 libs to install before
getting
what I wanted to work)

That’s not a problem with Linux. It has more to do with the distribution
you are using. It made me give up RedHat. Try Debian. Installing
software is a doodle in Debian. Dependencies are solved, and the correct
packages are downloaded and installed automatically.

DanFrom: stapleton.41@osu.edu (Steven James Stapleton)