Re: [PATCH, take 4][cygwin|mingw] Control where win32 DLLs get installed.

2009-08-18 Thread Charles Wilson
Roumen Petrov wrote:

>>> I'm concerned that we can't implement a working portable(cross-platform)
>>> relative path calculation.

In the general case, Roumen, you are correct: there IS no portable
mechanism to compute relative paths when non-portable constructs such as
symbolic links are/may-be involved.

This is not the general case.  This is a libtool- and DLL- specific
installation issue; we should not try to rewrite the entire auto* suite
to accommodate a wacky *hypothetical* installation tree organization not
currently supported by any GNU toolset, to fix one small corner case in
libtool.

Frankly, your hypothetical worry is not even a problem that libtool
should attempt to work around, for two reasons:

1) If the installation --prefix (AND DESTDIR/${prefix} as well!) is not
fully created PRIOR to build, then you cannot assume that when it IS
created, it will contain symbolic links, nor will you have ANY idea
where those future, hypothetical symbolic links will hypothetically
point to.  So any attempt to use canonical_path or realpath (as opposed
to abspath) is doomed to failure, EVEN on those systems where (a)
realpath/canonical_path is supported, and (b) symbolic links are supported.

2) The current system is just as broken NOW, as libtool with Dave's fix
would be in your hypothetical case.  In fact, the current system is EVEN
WORSE than any situation you have yet dreamed up.  ../bin is WRONG, even
on non-symlink systems, even with pre-created installation trees, even
when they do or do not contain symlinks: if --bindir and --libdir are
not _exactly_ siblings under the same parent.

We've just been fortunate, because in 99.999% of the cases, --bindir and
--libdir ARE siblings, and are both directly under ${exec_prefix}.
Except for one, really BIG, exception: gcc (and three or four others
Yaakov has mentioned).

So, Dave's patch fixes the current problem, and does NOT make your
hypothetical (and completely unfixable anyway; see #1) case any worse.
The only possibility of fixing your complaint is to change the .la
format to specify the full absolute path to the dlname.  Doing THAT
would, instead, break DESTDIR and GNU Coding Standard-required 'make
install prefix=${override_prefix}' installs, without a lot of additional
changes to the .la<->.lai installation process.  And even then,
computing accurately these absolute paths and fully resolving any
hypothetical symbolic links would require the installation tree (whether
$(prefix), ${override_prefix}, or DESTDIR/${prefix}) to be fully created
prior to 'make'.

Not. Gonna. Happen.

If you can come up with a mechanism to use absolute paths in dlname,
which does not break any of the known installation modes, works whether
the installation tree(s) are pre-created or NOT, and whether the final
installation tree contains symlinks or NOT, AND solves the issue with
getting DLLs on w32 into the correct directory AND that the installed
.la file correctly describes its location...

Then please show us the code. And the test results. On as many systems
as Dave has, especially including mingw, cygwin, linux, and various
cross environments.

Oh, and please make sure you do all of this before the GCC 4.5 stage 1
development window closes, currently scheduled for the end of August.

Otherwise, please stop letting the "perfect" (IMO, the "perfectly
impossible") be the enemy of the good.

> :) :) :) Dave, you even don't understand what is wrong.

With respect, Roumen, I believe it is you that are misdiagnosing the
problem.

--
Chuck




Re: [PATCH, take 4][cygwin|mingw] Control where win32 DLLs get installed.

2009-08-18 Thread Dave Korn
Roumen Petrov wrote:
> Dave Korn wrote:

>> *Your suggestion to use realpath instead of abspath
>> requires magic or time-travel before it is even possible, which is why
>> I will
>> waste no time on it.*
> 
> Reading all above seems to my you mix mail threads and/or lists.

  Nonsense, I'm not engaged in conversation with you on any other list.  This
is the one and only "threads and/or lists" where someone is suggesting I try
to use realpath on a directory before it is created; that requires time-travel
or magic.

> :) :) :) Dave, you even don't understand what is wrong.

  No, I haven't got the faintest idea what's wrong, but whatever your problem
is, it can't be solved by computer code.

>>Go and read up about how 'configure' works and what a "prefix" is.
> 
> Please, countdown before to post (hint: manual is libtool) .

  Hint: libtool is one tiny part of a huge interlocking system.

cheers,
  DaveK





Re: [PATCH, take 4][cygwin|mingw] Control where win32 DLLs get installed.

2009-08-18 Thread Roumen Petrov

Dave Korn wrote:

Roumen Petrov wrote:


The calculation or relative path to dll is based on function XXX_abspath
that may produce wrong results. 


  No it doesn't.  Like any function, it produces the correct results when
given valid inputs, but if you give it bad input, you get GIGO.


:) :) :-D



I suggest you
go read the fine manual about the "realpath" and "abspath" functions, because
until you understand the difference between these two functions you're just
wasting everybody's time. 


:)



*Your suggestion to use realpath instead of abspath
requires magic or time-travel before it is even possible, which is why I will
waste no time on it.*


Reading all above seems to my you mix mail threads and/or lists.



I'm concerned that we can't implement a working portable(cross-platform)
relative path calculation.


  But that is exactly what I have done.  It works, it is in portable code, it
operates the same on all platforms.  It has an implicit requirement that you
do not pass it a path containing a symlink.  As does *everything else* in
autotools.


:) :) :) Dave, you even don't understand what is wrong.



What is better for "dlname" for installed la-file: absolute or relative path ?


  That you could even ask such a question demonstrates that you don't
understand the subject you are pontificating about.  Go and read up about how
'configure' works and what a "prefix" is.


Please, countdown before to post (hint: manual is libtool) .



cheers,
  DaveK



Roumen