Thread history

Fragment of a discussion from User talk:Voidious
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
No results

I get the following error with the Linux 64 bit version:

[andrew@host-110-86 berrybots]$ ./bbgui ./bbgui: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory [andrew@host-110-86 berrybots]$ sh berrybots.sh ./bbgui: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

AW15:21, 6 March 2013

Great, thanks for testing this! What Linux distro/version is this?

I think the cleanest solution is probably just to ask people to install libpng (and/or check that it's installed from an install or run script first). Maybe testing a few other distros to figure out what needs installing would be a good idea before release. I know it doesn't require anything on the last two Ubuntu's.

Voidious15:42, 6 March 2013
 

Sweet, was able to duplicate this on Mageia 2. Will try to either get to the bottom of it or maybe just building it on non-Ubuntu will solve the problem. Right now looking to test on Ubuntu / Mageia / Fedora - still curious to hear what you're using.

Voidious16:10, 7 March 2013
 

Oops, I forgot I didn't say. I'm using fedora 18. I installed libpng, but then hit more libraries that I was missing. I'll try it on Windows today.

AW16:35, 7 March 2013
 

After some research, I think the problem is that you have a newer version of libpng (like libpng14 or libpng15), not that you don't have libpng at all. My Mageia 2 install has libpng15. I know what libpng is but this whole problem is pretty new to me, so I have to figure out what's the right way to address it.

Thanks man!

Voidious16:42, 7 March 2013
 

Versions after libpng12 broke compatability with libpng12 in notable ways. For this reason, libpng12 still has maintnance release, and many distributions (i.e. Arch Linux, Ubuntu, Debian, and after checking, Fedora 18 too) have pakages for both libpng12 and the newst version of libpng, which can be installed simuntaneously without conflict.

AW: You should be able to install a "libpng12" package from your package manager I believe.

Rednaxela17:05, 7 March 2013

I have no attachment to any libpng versions, so I guess the best move is to compile against whichever version works most commonly across default installs of Ubuntu / Mageia / Fedora, probably libpng14. Is that what you'd recommend?

Voidious18:01, 7 March 2013
 

No clue about Mageia, but Fedora and Arch provide both libpng15 and libpng12 (libpng12 isn't installed by default, but should be easy to install). Ubuntu and Debian however only provide libpng12. To me libpng12 looks like the safest for binary releases of software for now. Well, safer still is statically linking libpng, but yeah.

Rednaxela18:43, 7 March 2013
 

Thanks Rednaxela, this has been really helpful. If installing libpng12 is simple on most distros that don't ship with it, that sounds like the way to go.

I could still have a problem, though. wxWidgets will dynamically link to GTK, which dynamically links to system libpng. So I could then be linking to libpng12 and libpng15, which seems bad, but maybe it's not. I'll do some tests. Maybe I just have to build a separate binary release for Ubuntu/Debian and Fedora/Arch/Mageia, which isn't really a big deal.

Voidious19:47, 7 March 2013
 

Yeah, I installed libpng 1.2 and now I need libGLEW 1.8 (fedora's package mannager only has 1.7) It runs fine on Windows though!

AW21:58, 7 March 2013
 

Cool, thanks AW! Funny, Windows was the platform I was most worried about. :-) Btw are you on Windows 7?

I guess offering binaries compiled on several common Linux distros is probably a fairly safe way to go. Packaging as an RPM may help in defining/managing these dependencies, too, though.

Voidious23:13, 7 March 2013
 

It works here as well. But does seem to have an unused console window. Windows tends to be fairly straight forward once you know what it needs to have. Namely dlls.

On a side note, I have noticed random bot hitting itself with its own laser shots.

Chase04:11, 8 March 2013
 

Woot, thanks! And yeah, he's dumb like that. Chaser's even worse. :-)

Voidious04:12, 8 March 2013
 

Compiled on Fedora 18 64-bit, if you want it: [1] (It does give a harmless warning about receiving unicode text input that I am not sure I can fix.)

But hopefully I can figure out a way not to have to offer per-distro Linux binaries...

Voidious01:43, 8 March 2013

Bah, I'm not finding much to indicate I can make this any easier than separate binaries for a few major Linux distros and providing source / good build instructions (which I have) for anyone else to compile it themselves.

Still very open to advice from any resident Linux gurus tho. :-)

Voidious04:11, 8 March 2013
 

Mainly what I have seen lately is many programs have moved to being managed by a package manager. I have opinions on that. But other programs such as audacity offer a few different packages for a few major distro's and the source code.

Chase04:22, 8 March 2013
 

If you statically link libpng and libglew, I'd expect that to work better across distros probably Voidious.

Rednaxela17:35, 8 March 2013
 

Aren't the odds high that those each link to the system specific version of something else which has the same problem? I'm also concerned about ending up linking in two versions of libpng and libglew, since something like GTK would dynamically link them in.

Voidious17:38, 8 March 2013
 

Those two would link to other things yes, but those (libc, zlib and and OpenGL itself) have a very stable ABI so far as I know, and likely would not have the same problem. If really worried though, one could probably staticly link everything except OpenGL and wxWidgets. GTK dynamically linking a different one in shouldn't be a problem I think, it should coexist just fine.

Rednaxela17:52, 8 March 2013
 

I tried out the fedora binary and it works now. Thanks!

AW21:50, 9 March 2013