From: Alan W. I. <Ala...@gm...> - 2019-07-13 19:15:34
|
On 2019-07-13 08:05-0000 Phil Rosenberg wrote: > Hi Alan > You may be right. > I tried commenting out the offending regex replace, which meant cmake finished with no issues. But, when I tried to compile I found I had a similar problem with header files. I couldn't actually find the offending code that is causing that problem. I tried adding some quotes, but that didn't seem to help. > > So whatever workload you thought it was, it is actually double! Actually there is at least one or two orders of magnitude more work according to my Linux tests if you consider dealing with this problem for all external free software libraries that PLplot depends on rather than just wxwidgets. And the results would depend on all external libraries (and CMake itself) dealing with blank in pathname issues correctly which some preliminary tests I have done appears to be far from the case. So the fundamental issue is PLplot has been responsible about its own internal source, build, and install tree blanks in pathname issues, but other free software has not been that responsible. And a large supplementary issue is that even if external software eventually becomes completely responsible about this case, there would still be a lot more to do on the PLplot side to make "space in external library prefix" case work properly for all external libraries. > Would it be relatively straightforward to add a check, so if the user supplies an install or library/header path that contains " -" then we error out at that point? The problem with *complete* configuration-time detection of that case is that we would have to have reliable parsing to detect the difference between hyphenated/spaced pathnames as opposed to the " -" that delimits linker options. That said, we could easily warn against the case where "- " appears anywhere in the options string since that case is obviously not a linker option. If you agree, I will take responsibility for implementing such a check. But that check would obviously not guard against the case of, say, an -L option of the form -L/whatever -hyphen_pathname where "whatever -hyphen_pathname" was the complete pathname rather than "whatever" being the pathname with "-hyphen_pathname" being a separate linker option. And the check would only be available for the external wxwidgets library and all external libraries that use pkg-config. So to supplement that proposed incomplete configuration-time check I think we should create a prominent warning in our wiki for users not to use installation prefixes that contain spaces for external free software libraries. I emphasize spaces rather than hyphens here since it is the spaces that generate all the issues with or without hyphens according to my Linux tests. Also, most experienced Unix users would not try spaces in installed library prefixes, but some might do that so I think the warning should be a general one rather than Windows only. If you agree that wiki "no-space in external library prefixes" warning would be useful as well, would you take responsibility for updating the most fundamental PLplot build page in our wiki (whatever that is) to that effect? Alan __________________________ Alan W. Irwin Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |