From: Alan W. I. <Ala...@gm...> - 2019-07-11 22:06:06
|
On 2019-07-11 12:22-0000 Arjen Markus wrote: > Hi Phil, > > -----Original Message----- > From: Phil Rosenberg <p.d...@gm...> > Sent: 11 July 2019 14:12 > To: plplot_general <plp...@li...> > Subject: [Plplot-general] CMake problem with hyphen in path > > Hi Alan (I guess this is your expertise) I've just tried to build plplot on a new Windows system and I am getting problems. > > After some digging I found that the issue is that my home directory (where all my libraries are stored and where I am building plplot) contains a hyphen with a space either side. Specifically it is C:\Users\<my_username>\Onedrive - <my_employer>\Documents\usr\... > I would imagine I'm not the only person who has hit this problem as this is the name that seems to be given by default when using Ondedrive for business. > > This filename then interacts with the logic in cmake_link_flags - see plplot/modules/cmake/pkg-config.cmake line 261, which replaces " -" > with ";-". > > This splits all my library paths in two and obviously causes errors. > > I'm not really sure what to do about this? Any suggestions? > > >>> AM:: I have the same pattern in my home directory, but I never build any software there 😊. We did do a test with directories have spaces and IIRC, we sorted out the problems this was causing. Just checked: I did that test in November last year and as I have the examples there, it must not have been a problem. I do have an odd subdirectory, "d*" (where the asterisk is actually a centred dot). That is due to trying to install PLplot, not juist build it. If the pattern you describe causing problems and a simple directory name like "build with spaces" (the name I used) does not, there are still some issues to solve. @Phil: I cannot confirm the issue on Linux. Here are the details of that test. # Create source tree with hyphenated pathname using a symlink to actual git repository # cd to working directory of actual (not symlinked) repository cd /home/software/plplot/HEAD/plplot.git cd .. ln -s plplot.git "plplot hyphen - .git" cd plplot.git # Run my usual noninteractive comprehensive test for hyphenated # source, build, AND install trees. # N.B. For my Debian Buster platform I like/need to test # special versions of lua, libLASi, and qhull via setting the # CMAKE_PREFIX_PATH environment variable, a special version of cmake # (and ctest) via setting the PATH environment variable, and a special # version of swig via setting the SWIG_EXECUTABLE CMake cache # variable. SOURCE_PREFIX="/home/software/plplot/HEAD/plplot hyphen - .git" # This hyphenated directory does not (necessarily) have to exist before the test # since the script deletes it (if it exists) before (re)creating it. COMPREHENSIVE_TEST_PREFIX="/home/software/plplot/HEAD/comprehensive_test_disposeable - hyphen" time (nice -19 env CMAKE_PREFIX_PATH=/home/software/lua/install-5.3.5:/home/software/lasi_svn/install:/home/software/qhull/install PATH="/home/software/cmake/install-3.13.2/bin:$PATH" "$SOURCE_PREFIX"/scripts/comprehensive_test.sh --prefix "$COMPREHENSIVE_TEST_PREFIX" --cmake_added_options "-DUSE_INCRTCL_VERSION_4=ON -DSWIG_EXECUTABLE=/home/software/swig/install/bin/swig" --build_command "make -j16" --ctest_command "ctest -j16" --do_test_interactive no) That comprehensive test completed without obvious errors or hangs (in 23 minutes of wall-clock time on my computer with 16 hardware threads), and the results of running the evaluation procedure for such tests that is documented in doc/wiki_source/Testing_PLplot were perfect! So my conclusion is that basically all the many steps we (including a large initial effort from you) have taken over the years to blank-proof PLplot are generally also working to hyphen-proof PLplot. IMPORTANT CAVEAT: One thing these Linux tests do not do is use external libraries with blanks or hyphens in their pathnames so my working hypothesis for the reason for the symptoms you reported above is you ran into that kind of issue on Windows. Here are my suggestions for investigating such issues in a straightforward and systematic way on MSYS2 (our best platform for testing Windows). (i) Install MSYS2 (including all PLplot prequisites) following the clear directions in the MSYS2 wiki that I referenced before. Use an MSYS2 install prefix with no hyphen or blank issues for now. (ii) Run a comprehensive test on MSYS2 with source, build, and install trees that are space and hyphen free. This will likely take several iterations to get right, but if you send me the report tarball that is generated each time, that should provide me with enough information to debug any problems you encounter on this platform (which will likely be MSYS2 installation issues since Arjen has debugged virtually all the PLplot issues on this platform). And, of course, once you also have complete success with this step that doubles our developer support for this important Windows platform. (iii) Repeat the last successful blank- and hyphen-free test, but this time using blanked and hyphenated (as in my test above) source, build, and install trees for the test. I expect this test to work for you since it works on Linux. (iv) Repeat (i) with the MSYS2 install prefix with " - " in its name and repeat (ii). I assume from your results above that (ii) will not work for this case since the (MSYS2) libraries needed by PLplot will all have " - " in their pathname. Note, the report tarballs generated by (ii) should be a large help as I attempt to fix the "external library blank and hyphen" issues in our build system that are found by this test. Once (ii) works with " - " in the MSYS2 prefix then try (iii), but I think that will work once (ii) works. Good luck, and let me know how it goes with the above steps. 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 __________________________ |