 |
forums.xandros.com Xandros User Forums
|
| View previous topic :: View next topic |
| Author |
Message |
arereal2 Xplorer
Joined: 05 Jan 2006 Posts: 22
|
Posted: Sun Jan 08, 2006 8:01 pm Post subject: |
|
|
| Chaotic Thought wrote: | | By the way, you can remove your XORG_STATIC directory after you've built the software. Static libraries do not need to be kept around after being linked (but shared ones do). |
Yep, I knew that  |
|
| Back to top |
|
 |
bregma Xplorer
Joined: 29 Jan 2005 Posts: 82 Location: The back woods
|
Posted: Tue Jan 10, 2006 2:47 pm Post subject: |
|
|
| Chaotic Thought wrote: | I think the problem is that your program is trying to build a static library, but to do that you need a static libXext (usually named with an .a extension), but all you have is libXext.so.
You probably can disable this behaviour by going to your toplevel build directory (of kchmviewer), removing config.log and config.status, then re-running ./configure like this: | Code: | | ./configure --disable-static --enable-shared |
|
There's nothing in the posted logs to indicate anything about forcing the use of a static archive instead of a DSO.
The make and configure logs tell me two things.
(1) He's using a non-Xandros Qt installation (the Qt runtime in Xandros is /usr/lib/qt-mt.so and the header files live in /usr/include/qt3).
(2) He's not looking for the X11 libraries in the link line. Given what configure output, there should be a -L/usr/X11R6/lib, but try as I might I fail to see it in there.
The default Xandros Qt runtime has libXext built right in, so it's not even necessary to include it on the link line. I suspect the proper solution is to somehow for configure to use the right Qt link libraries (in this case, -lqt-mt is actually good enough).
--smw |
|
| Back to top |
|
 |
Chaotic Thought Xandrosianding

Joined: 08 Jul 2005 Posts: 881 Location: Arlington TX
|
Posted: Tue Jan 10, 2006 4:11 pm Post subject: |
|
|
| bregma wrote: | | There's nothing in the posted logs to indicate anything about forcing the use of a static archive instead of a DSO. |
The logs show use of the -lXext switch. That is for static libraries.
| gcc(1) wrote: | -l library
[...]
The linker searches a standard list of directories for the library,
which is actually a file named liblibrary.a. The linker then uses
this file as if it had been specified precisely by name.
|
|
|
| Back to top |
|
 |
bregma Xplorer
Joined: 29 Jan 2005 Posts: 82 Location: The back woods
|
Posted: Tue Jan 10, 2006 5:51 pm Post subject: |
|
|
| Chaotic Thought wrote: | | bregma wrote: | | There's nothing in the posted logs to indicate anything about forcing the use of a static archive instead of a DSO. |
The logs show use of the -lXext switch. That is for static libraries.
|
The GCC documentation is not entirely correct.
The GCC front-end will pass -l and -L arguments on to the linker ld. The manual for ld says
| Quote: |
`-lARCHIVE'
`--library=ARCHIVE'
Add archive file ARCHIVE to the list of files to link. This
option may be used any number of times. `ld' will search its
path-list for occurrences of `libARCHIVE.a' for every ARCHIVE
specified.
On systems which support shared libraries, `ld' may also search for
libraries with extensions other than `.a'. Specifically, on ELF
and SunOS systems, `ld' will search a directory for a library with
an extension of `.so' before searching for one with an extension of
`.a'. By convention, a `.so' extension indicates a shared library.
|
The algorithm it in fact uses is to search for .so files in each directory specified by the preceding -L arguments, then .a files (that is, in each directory it searches for .so files then .a files, then moves on to the next directory). If you use -lXext and you have a libXext.so in on of the -L directories (or in the build-in standard search path), it will be used in preference to a .a file, even if you specify -static to gcc (but not if you specify -Wl,-static for some reason).
If the library is not in one of the standard search paths, it won't be found. You have to specify where to look with the -L option. /usr/X11R6/lib is not a standard search path built in to GCC. GCC does not read the runtime loader's config files (/etc/ld.so.conf) -- why should it? You can find out the default search paths using the command gcc -print-search-dirs.
Fact is, all he really needs is -lqt-mt. Trust me: I build Qt applications many times every day on Xandros.
--smw |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|