Daichi Kawahata wrote: > > Doesn't it also need -R/path1:/path2 instead of -R/path1 -R/path2 > > because it'll use the last -R only? > (possibly) no, I think it doesn't need in gtkg configure process, > in this connection, compiled program will search library from last > rpath, if doesn't exist then search next last path.
Ah, I remember now that was OSF/1 not IRIX and it's quite a nightmare.
> I don't know whether is problem setting LD_LIBRARYN32_PATH, I set
> this colon-separated variable to avoid conflicting case (there
> are /usr/lib32 has shipped libraries, /usr/freeware/lib32 from
> user-land, /usr/local/lib32 has self-compiled libraries). It never
> cause trouble in gtkg.
I meant that the RPATH should be compiled into the executable.
Otherwise, you'll have add the path to LD_LIBRARY_PATH or the like.
If you have the same library (name-wise) in different places - which
is rather common except on Linux where you slap everything into
/usr/lib - you'll get conflicts because the wrong library is loaded
at run-time. It might even cause very subtle problems instead of
straight crashes. Thus, it's definitely evil.
> > > - signal(2, foo);
> > > - kill(getpid(), 2);
> > > + sigaction(2, foo);
> > > kill(getpid(), 2);
> > > printf("abc\n");
> Well, can I consider the above mentioned state doesn't towards me?
You don't need to fix this.
> > I see, thanks. I guess $ldflags should be moved to the end as well,
> > right?
> It doesn't need without making appearance of shell script elegant!?,
Well, I'm not sure whether it's not pure luck that this order works
for you. Depending on what's $ldflags set to, it might have to appear
at a different position. I'd think the last position is best so that
you can override previous flags. Though, it depends on the compiler
and/or linker what influence the order has, if any.
> better way is to separate $flag and $lib like,
I'd agree, but that requires demangling of whatever glib-config --libs
et al. spit out. Unfortunately, those don't provide very fine-grained
information. They don't differ between CPPFLAGS and CFLAGS either -
which works fine with GCC but not necessarily other compiler suites.
> $cc $ccflags $ldflags $glibcflags $glibldflags -o try try.c $libs
> then position of $flag doesn't the matter, location of actual
> library is the one, in short, if I enabled NLS support the order
> "-liconv -lintl" won't compile because libintl has libiconv
> dependency function,
Eeh? That's quite strange because then either the IRIX developers
didn't understand ELF at all or IRIX doesn't use ELF. Another
possibility might be that your libraries are not properly linked.
--
Christian
pgpfzpkdyy2rC.pgp
Description: PGP signature
