static libraries corrupt?
W. Tasin
tasin at e-technik.fh-muenchen.de
Tue May 23 11:31:18 BST 2000
Ulli Hansen wrote:
>
> Hi,
Hi,
>
> fistly let me state, i'm using the egcs 1.1.2 compiler. If this is not
> compatible to kdevelop, maybe the following problem description is
> obsolete.
>
> I have subdevided my project into subfolders. While compiling kdevelop
> tries to build a static library for each subdir, which seems to work
> nicely. But when it comes to linking, i get the following error:
>
> ./daemon/libdaemon.a ./common/libcommon.a -L/usr/lib
> -L/opt/CORBA/OB-3.2.1/ob/lib -L/opt/poet60/lib -ldaemon -lcommon
> -lpt6begcs29 -lpt6eegcs29 -lpt6iegcs29 -lpt6kegcs29 -lpt6qegcs29
> -lpt6segcs29 -lpt6tegcs29 -ldl -lpthread -lstdc++ -lOB
> make[1]: execvp: ./daemon/libdaemon.a: Keine Berechtigung
> make[1]: *** [test] Error 127
> make[1]: Leaving directory `/users2/mitarb/ulli/kdev/test/test'
> make: *** [all-recursive] Error 1
> *** Fehler ***
>
> (sorry, i'm using the german version - basically i get a Permission
> Denied)
> If i run a chmod 755 on libdaemon.a the error turns into this:
Really strange error... hmmmm...
first the BTW:
I see you have added -ldaemon and -lcommon also to your project... isn't
this already a linking conflict itself?? Binding daemon and common as
shared lib _and_ as static lib to it?
But this isn't the fault at all I guess, so I keep in mind some stuff,
which maybe apply on your problem:
1) Your new c++ framework works with gmake and not with make (but make
is still on your system)
2) /users2/mitarb/ulli/kdev/test/test/daemon is a mountpoint (done with
smbmount e.g.) which kills some permission flags?
3) Your Makefile.am was patched to make a shared lib of "./daemon" (and
"./common") instead of a static lib, but the parent directory's
Makefile.am (i.e. /users2/mitarb/ulli/kdev/test/test) uses "./daemon" as
static lib.
To check out what it is, some other hints:
1) Build your project from the scratch by the console doing the
following:
cd /users2/mitarb/ulli/dev/test
make distclean
rm config.cache
make -f Makefile.dist
configure [with your options...]
make
2) check the /users2/mitarb/ulli/kdev/test/test/daemon/Makefile.am
Is there a option like "lib_LTLIBRARIES = libdaemon.la" so this means
daemon is wanted to be used as distributed "libtool archive" (to be
installed into $(libdir))
If there is an option like "noinst_LIBRARIES = libdaemon.a" means static
lib, not installed, but linked to the project.
>
> ./daemon/libdaemon.a ./common/libcommon.a -L/usr/lib
> -L/opt/CORBA/OB-3.2.1/ob/lib -L/opt/poet60/lib -ldaemon -lcommon
> -lpt6begcs29 -lpt6eegcs29 -lpt6iegcs29 -lpt6kegcs29 -lpt6qegcs29
> -lpt6segcs29 -lpt6tegcs29 -ldl -lpthread -lstdc++ -lOB
> ./daemon/libdaemon.a: line 1: syntax error near unexpected token
> `!<arch>'
> ./daemon/libdaemon.a: line 1: `!<arch>'
> make[1]: *** [test] Error 2
> make[1]: Leaving directory `/users2/mitarb/ulli/kdev/test/test'
> make: *** [all-recursive] Error 1
> *** Fehler ***
seems that libdaemon is a libtool library... and should have the
extension .la
and not .a ....
>
> So now it can use the library but is not happy with its contents.
> Do the libraries seem to be corrupt? Is it possible to build dynamic
> libraries or is it possible to avoid building libraries for each
> subdirectory? (The structure of subdirectories is due to this being a
> project being imported into kdevelop)
>
> -> I'm using kdevelop 1.2 on SuSE Linux 6.3, Compiler: gcc version
> egcs-2.91.66 19990314/Linux (egcs-1.1.2 release), Linker: GNU ld version
> 2.9.1 (with BFD 2.9.1.0.25)
>
> Any hints and help appreciated
>
> thanks
> Ulli
>
Bye
Walter
>
> ------------------------------------------------------------------
> Ulli Hansen
> Institut für Mikrotechnik tel: ++49-531-391-9764
> Technische Universität Braunschweig fax: ++49-531-391-9751
> Alte Salzdahlumer Str. 203 mailto:u.hansen at tu-bs.de
> D-38124 Braunschweig http://www.tu-bs.de/institute/imt
> ------------------------------------------------------------------
--
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB 04,
FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140 6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>
More information about the KDevelop
mailing list