Re: gtags.conf.in ignores custom --libdir if set

Shigio YAMAGUCHI <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <CADJmJYq8x00p2JUepFatCty4FU422E5hUbN3yOYXwt6SEh9bVg@mail.gmail.com>
> Why not use the same approach used for "$prefix" in configure.ac?
>
>   case "$prefix" in
>   NONE)   prefix_QUOTED=`echo $ac_default_prefix | sed 's/:/\\\\:/g'`;;
>   *)      prefix_QUOTED=`echo $prefix | sed 's/:/\\\\:/g'`;;
>   esac
>
> If libdir is set, use it, if not, use a defualt value.

Would you please send a patch? If it works well, I'd like to take it.

> IIUC, the files referenced by gtags.conf end up as arguments to a
dlopen() call.
> Why not name the .so files directly,  or their platform-specific
equivalent
> depending on the compilation target?

Because I don't want to make gtags.conf for each OS. '.so' is not a common
extension. But now rereading the libtools manual, I have found
lt_dlopenext()
function. Using this, we can load library without extension.

[derived from libtool manual]
-----------------------------
@deftypefun lt_dlhandle lt_dlopenext (const char *@var{filename})
The same as @code{lt_dlopen}, except that it tries to append
different file name extensions to the file name.
If the file with the file name @var{filename} cannot be found
libltdl tries to append the following extensions:

@enumerate 1
@item the libtool archive extension @file{.la}
@item the extension used for native dynamically loadable modules on the
host platform, e.g., @file{.so}, @file{.sl}, etc.
@end enumerate
-----------------------------

I will rewrite dynamic loading code using this. It will be like follows:

if (lt_dlopen('foo.la') == FAILED)
if (lt_dlopenext('foo') == FAILED)
error_and_exit();

This code should work without '.la' files.

Thank you for giving me a chance of re-investigation.

Regards,
Shigio


2015-10-07 8:30 GMT+09:00 Shigio YAMAGUCHI <[email protected]>:

> Hi,
> > gtags.conf.in lists the location of the shlibs for the bundles plugins,
> > namely ctags and pygments. The paths used are of the form
> >
> > @prefix_QUOTED@/lib
> >
> > where this should acutally be set according to $libdir which
> > may be customize by the user when invoking configure.
>
> There is a problem with using 'libdir'.
> Without --libdir=xxx, configure script converts "@libdir@" into
> "${exec_prefix}/lib". It is valid in Makefile; it is invalid
> in gtags.conf.
> Do you have a method to settle this?
>
> > As a separate issue, I'm don't understand why gtags.conf has
> > paths to the libtool .la files instead of the .so files.
>
> Why do you want to use .so instead of .la?
> The purpose of libtool library is to reduce OS dependence,
> and .la is a common extension for every OS.
>
> > For reference, here's the associated issue on the fedora bugzilka:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1268763
>
> Thank you.
>
> Regards,
> Shigio
>
>
> 2015-10-07 1:14 GMT+09:00 Kevin Farshaw <[email protected]>:
>
>> Hi,
>>
>> gtags.conf.in lists the location of the shlibs for the bundles plugins,
>> namely ctags and pygments. The paths used are of the form
>>
>> @prefix_QUOTED@/lib
>>
>> where this should acutally be set according to $libdir which
>> may be customize by the user when invoking configure.
>> In particular, some linux distributions use $prefix/lib64
>> for 64bit and $prefix/lib for 32bit libs.
>>
>> As a separate issue, I'm don't understand why gtags.conf has
>> paths to the libtool .la files instead of the .so files. But in that
>> I may simply be uninformed.
>>
>> For reference, here's the associated issue on the fedora bugzilka:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1268763
>>
>> Regards,
>> Kevin Farshaw
>>
>> _______________________________________________
>> Bug-global mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/bug-global
>>
>>
>
>
> --
> Shigio YAMAGUCHI <[email protected]>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
>



-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.