View previous topic :: View next topic |
Author |
Message |
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Tue Jun 06, 2006 9:46 am Post subject: Problem with libs and outputs |
|
|
I don't know if the lib problem is an ubuntu issue or one of duit. In my ubuntu installation the /usr/lib contains libs without the ending .so.
Quote: | /usr/lib/libgtk-x11-2.0.so.0.800.17
/usr/lib/libgtk-x11-2.0.so.0 -> /usr/lib/libgtk-x11-2.0.so.0.800.17
|
The workaround is easy. I create a symbolic link:
Quote: | /usr/lib/libgtk-x11-2.0.so -> /usr/lib/libgtk-x11-2.0.so.0.800.17
|
And now I have to do this for all requested libs. This works for my machine, but giving that instructions to a customer is not so nice
A typo in build/duit.d, line 350
Code: | private import lib.paths.d; // remove .d
private import lib.Loader.d; // remove .d
|
The verbose messages about loading libs can be deactivated and made a compile version.
lib/Loader.d:193 I added a version(DuitVerbose) |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Tue Jun 06, 2006 10:28 am Post subject: Re: Problem with libs and outputs |
|
|
on .so:
I'm not sure about the exact rules for the libs naming
anyone knows?
I already check for 1 alternate name when trying to load the lib. What should I look for?
on buid/duit.d:
this is generated automatically.
should those 2 lines be removed?
on duit message:
loading libs messages are displayed by the application (I think).
The application can choose to abort, display the failed ones or ignore every thing.
Which application did display the library messages?
Ant |
|
Back to top |
|
|
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Tue Jun 06, 2006 10:50 am Post subject: |
|
|
on buid/duit.d:
I mean that the '.d' in the import statement is wrong.
on duit message:
No the messages are coming from lib/Loader.d line 193. So I suggested to prepend a 'version(DuitVerbose)'. So it is possible to have these messages as compile version or not. |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Tue Jun 06, 2006 11:16 am Post subject: |
|
|
tionex wrote: | on buid/duit.d:
I mean that the '.d' in the import statement is wrong. |
! thanks...
tionex wrote: |
on duit message:
No the messages are coming from lib/Loader.d line 193. So I suggested to prepend a 'version(DuitVerbose)'. So it is possible to have these messages as compile version or not. |
funny, I thought that was now put into an array and given access to the aplication...
oh! no, maybe I typed all that into the wrong source, tested it and them through it away (by running the binding program)...
thank you, I'll redo it if necessary.
Ant |
|
Back to top |
|
|
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Tue Jun 06, 2006 1:43 pm Post subject: |
|
|
the lib thing.
I googled a bit, and ask few people.
Now it seams to me, that the number tells binary compatibility. So if it changes, you cannot link to it anyway. So it would be good, to change the strings in case of linux. The ones with '???' are libs I do not have on my system. But my application works, so perhaps they are not needed?
Here the changed code from lib/paths.d
Code: | version(linux) {
const char[][LIBRARY.max+1] importLibs =
[
LIBRARY.ATK: "libatk-1.0.so.0",
LIBRARY.CAIROLIB: "libcairo.so.2",
LIBRARY.GDK: "libgdk-x11-2.0.so.0",
LIBRARY.GDKPIXBUF: "libgdk_pixbuf-2.0.so.0",
LIBRARY.GLIB: "libglib-2.0.so.0",
LIBRARY.GMODULE: "libgmodule-2.0.so.0",
LIBRARY.GOBJECT: "libgobject-2.0.so.0",
LIBRARY.GTHREAD: "libgthread-2.0.so.0",
LIBRARY.GTK: "libgtk-x11-2.0.so.0",
LIBRARY.PANGO: "libpango-1.0.so.0",
LIBRARY.GTK_GLEXT: "libgtkglext-x11-1.0.so", // ???
LIBRARY.GDK_GLEXT: "libgdkglext-x11-1.0.so", // ???
LIBRARY.GL: "libGL.so.1",
LIBRARY.GLU: "libGLU.so.1",
LIBRARY.GLEXT: "libGL.so.1" // same as two lines above?
];
} |
|
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Tue Jun 06, 2006 2:34 pm Post subject: |
|
|
tionex wrote: | the lib thing. |
the G?K_GLEXT libs are for the OpenGL extensions
(I started to work on that sunday)
those are be wrapped into a separate lib (duitgl).
I still don't know what to do with the libnames.
gtk libs with the same major and minor number are suppose to be binary compatibles.
What number are you saying? the trailing .0 (or .2)?
or the X.X after the '-'?
Ant |
|
Back to top |
|
|
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Tue Jun 06, 2006 2:45 pm Post subject: |
|
|
In IRC kergoth had a good explanation.
the -2.0 is the header compatibility. The .so.0 is the binary compatibility. The name has to match exactly as a whole thing. |
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Tue Jun 06, 2006 4:47 pm Post subject: |
|
|
The binary incompatibiliy is not necessarily a problem when you do dynamic loading in the way Duit do it. It is related to normal linking to dynamic libraries. Binary incompatibility usually means that the order of the public fields have been reshuffled or changed (maybe more parameters). with dynamic loading you might be able to handle this in the loading phase, whereas you'll get problems with linking. the executable usually knows which version it wants, though. |
|
Back to top |
|
|
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Tue Jun 06, 2006 5:10 pm Post subject: |
|
|
OK.
But what does that mean for our problem? In case of libgtk-x11-2.0.so.0 this means, that perhaps we have also no problem with so.1. So we have the choice of trying the libs that are available, or make one version fixed. The so.0 is a main version number. You can get these versions in separated packages and can install them in parallel. like the libstd++.so.5 which is old and necessary for dmd. BTW that is probably the cause for the missing link without the version number.
I think it is really the best to change the libname for a certain main version number. |
|
Back to top |
|
|
|