Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  lwjgl & linux & webstart question  (Read 2847 times)
0 Members and 1 Guest are viewing this topic.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Posted 2003-03-16 20:44:59 »

Hi,

Sooner or later I guess I'll have to make my game linux compatible too. Now I saw that there are 2 linux versions of the native part of lwjgl; a suse and a redhat. Now I know how to link the windows dll in the webstart launch file, but is there any way to distinguish between the 2 linux varieties in webstart?
Being a linux clewbie, I'm also wondering why there are 2 version for 2 linuxes. What about other linux varieties?

Greetings,
Erik

Hmmm... maybe this is more a webstart question than a lwjgl question after all Roll Eyes but I couldn't find the answer from the webstart doc and I'm not using linux (yet).

Offline elias

Senior Member





« Reply #1 - Posted 2003-03-18 10:27:39 »

There are two libs because the glibc major version is different on (at least) those two platforms, and the lwjgl lib depends on that. I don't know how to specify which lib should be loaded by webstart, though, but I suspect that it possible _somehow_, because every other native lib will suffer from the same problem.

- elias

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2003-03-18 11:20:50 »

Is it not possible to use a lowest common denominator Elias? ie. are the old versions always present on a particular distro?

Or can you dynamically link against the bits that aren't common?

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline elias

Senior Member





« Reply #3 - Posted 2003-03-18 11:37:02 »

Dunno.

In fact, I'm not doing anything in different ways depending on the distro, so the only problem is the naming of the standard C lib, because library names include version numbers on linux. And I don't know if it's easy to dynamically load standard libc.

One might be able to link to some common name for it, but that's beyond my current linux C/C++ (linker) knowledge. It might even be impossible, knowing that C uses early linking.

No, the old libc's are not always present on the distros, e.g. if you're lucky, redhat only includes one older version than the current.

- elias

Offline Grom

Junior Member




Rats...


« Reply #4 - Posted 2003-03-18 16:26:13 »

Quote
There are two libs because the glibc major version is different on (at least) those two platforms,

Why not provide a statically linked version?

Another alternative is to have 2 separate JNLP files -
one for RedHat and one for Suse.
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #5 - Posted 2003-03-18 17:05:54 »

Quote
Dunno.

In fact, I'm not doing anything in different ways depending on the distro, so the only problem is the naming of the standard C lib, because library names include version numbers on linux. And I don't know if it's easy to dynamically load standard libc.


Maybe I'm whacked in the head here, but I thought that you weren't supposed to link against version numbers? Instead, there's supposed to be a symlink to the latest lib file. So libc.so might be linked to libc.so.2 and you can use the -Llibc option in the compiler. I'm probably oversimplifying it, but I do think this is possible.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline elias

Senior Member





« Reply #6 - Posted 2003-03-18 17:14:37 »

That's right, but I'm not linking at all to libc - that's done automagically by the compiler. So I think it's doing it right. And besides - the symlink stuff is only to mask minor versions - so libc.6 is linked to, say, libc.6.1 and libc.5 is linked to something else. And that's okay I think, there's a reason major versions change...

- elias

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #7 - Posted 2003-03-18 17:58:06 »

Hmm, major incompatible versions are supposed to change their name like this:

libc.so.1
libc2.so.1
libc3.so.1

The only part I don't get is, why does libc have a major revision? It is after all supposed to be "the standard C library". New functions perhaps, but incompatible changes? Sometimes I don't get these Linux guys.

<anecdote>
A week or two ago, I was trying to install the NVidia drivers for Linux. So I went to their download site and was greeted by a bazillion files to choose from. Choose the wrong one and it wouldn't work (nice). Where did all the files come from? Different variations of distro and kernel revision. There wasn't a version for my Redhat kernel, so I downloaded the latest and figured I'd use Red Carpet to update my kernel. And I did. Only problem is, that now my kernel was newer than the patch! ARRRGGGHHH!!! Worse yet, I couldn't find a package for the version I actually needed.  Surfice it to say, the damn thing still isn't installed.

Just out of curiousity, I looked at the FreeBSD stuff. Does anyone want to guess how many files there were for the various versions of FreeBSD? Anyone? There was.... wait for it.... ONE!!! That's right, ONE frigging file. Pretty quickly here, I'm going to start telling Linus what he can do with his kernel design...
</anecdote>

Java Game Console Project
Last Journal Entry: 12/17/04
Offline elias

Senior Member





« Reply #8 - Posted 2003-03-18 18:10:03 »

On my system, it's

[elias@ip172 elias]$ ll /lib/libc.so.6
lrwxrwxrwx    1 root     root           14 Oct  5 14:24 /lib/libc.so.6 -> libc-2.2.93.so

the name before .so should only include library name, not version (unless it's a complete rewrite of api or something, in which case it's still a completely different library).

- elias

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #9 - Posted 2003-03-18 18:27:50 »

If I'm reading this thing correctly:

http://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html#SONAMES

That means that it should be compatible with previous releases.

Java Game Console Project
Last Journal Entry: 12/17/04
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline elias

Senior Member





« Reply #10 - Posted 2003-03-18 18:39:53 »

[elias@ip172 elias]$ objdump -p /lib/libc.so.6 | grep SONAME
 SONAME      libc.so.6

Is what my system says about libc.so.6 - so a libc (so)named libc.so.5 is not compatible according to the link you gave, because the number immediately after .so. is a part of the SONAME. At least that's how I'm reading it.

- elias

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #11 - Posted 2003-03-18 18:59:15 »

Hmm... maybe you're correct. However, this part of the document:

http://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html#UPSTREAMBROKENSONAME

shows the symlinking I was referring to. I don't know if that's a viable option, but it's something to consider.

BTW, to the original poster, you could try having separate JARs for the two versions and setting them to manual download. Once your code is running, it would do a quick check of the system and then tell WebStart (using the webstart APIs) which version to download and use.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #12 - Posted 2003-03-19 01:08:41 »

Quote
The only part I don't get is, why does libc have a major revision? It is after all supposed to be "the standard C library". New functions perhaps, but incompatible changes? Sometimes I don't get these Linux guys.


Ah, the trick I believe is that while source compatability is usually maintained over major versions, binary compatibility is broken every time. Wink

Hellomynameis Charlie Dobbie.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #13 - Posted 2003-03-19 07:30:46 »

Quote
BTW, to the original poster, you could try having separate JARs for the two versions and setting them to manual download. Once your code is running, it would do a quick check of the system and then tell WebStart (using the webstart APIs) which version to download and use.


Smart  Smiley

Thanks,
Erik

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #14 - Posted 2003-03-19 07:36:06 »

Quote
Ah, the trick I believe is that while source compatability is usually maintained over major versions, binary compatibility is broken every time.


This (and the other issues mentioned in the thread) is probably a good reason why linux will not ever be a real success on the desktop, isn't it?
It all seems very awkward to me. (Man, I'll never complain about a 15Mb driver download again Wink)

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #15 - Posted 2003-03-19 10:33:40 »

Quote
This (and the other issues mentioned in the thread) is probably a good reason why linux will not ever be a real success on the desktop, isn't it?


Well, since you asked, no - in my opinion. Grin

Don't you remember library hell on Win3.1?  "Oh, this application needs vbrun300.dll" etc., and I'm sorry but there are things Windows does on the desktop that are easily as evil as needing a specific C runtime library. Wink

Due to the way Linux is developed, you can expect the technology to be cutting edge, but the user-friendlyness will usually be behind.  But I don't worry - I believe all problems will be worked out in time.  The advantages for me outweigh the disadvantages even now. Grin

Hellomynameis Charlie Dobbie.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #16 - Posted 2003-03-27 17:35:29 »

Well, everything looks good compared to the vbrun.dll uglyness doesn't it?  Grin
And windows 3.1??? I think most people (well at least me) are *unwilling* to remember that. ;-)

Other that, you're probably right.
I'm just terribly lazy.  Grin

Anyway bottomline seems to be: there's no one unified way to install for linux since it is apparently not really *one* platform.

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #17 - Posted 2003-03-27 18:20:30 »

Yeah, I guess that's it.  If you're a sufficient wizard with automake/autoconf/libtool you can generate a source tarball that will compile itself using the installation libraries and install itself in the installation's preferred directory, without the user doing anything more than running ./do_stuff.sh and entering the root password when requested.

Generally people don't bother, and just provide a SuSE and RedHat binary RPM and a Debian binary DEB, and leave people to customise the build scripts themselves for the source package.

I don't think it really matters either way, at least for the moment.  Most people both running Linux and wanting to install LWJGL will not be fazed.  Expect this to change in the future though!  I don't know what the solution will be then - I'm sure something will come along.

Hellomynameis Charlie Dobbie.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (15 views)
2014-07-30 21:08:39

Riven (21 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!