Alien-Build
Alien-Build copied to clipboard
t/alien_build_plugin_build_cmake.t fails on "Perl in space"
My Strawberry PDL is installed in C:\straw (perl) to test as much as possible. It gets this error (excerpted):
t/alien_build_plugin_build_cmake.t .. # Failed test 'alien builds okay'
# at t\alien_build_plugin_build_cmake.t line 75.
[...]
# gmake[2]: Entering directory 'C:/TEMP/F1l7Bxee1N/root/build_1XAB'
# [ 16%] Building C object libpalindrome/CMakeFiles/palindrome.dir/palindrome.c.obj
# cd /d C:\TEMP\F1l7Bxee1N\root\build_1XAB\libpalindrome && C:\STRAW(~1\c\bin\gcc.exe -Dpalindrome_EXPORTS @CMakeFiles/palindrome.dir/includes_C.rsp -MD -MT libpalindrome/CMakeFiles/palindrome.dir/palindrome.c.obj -MF CMakeFiles\palindrome.dir\palindrome.c.obj.d -o CMakeFiles\palindrome.dir\palindrome.c.obj -c C:\TEMP\F1l7Bxee1N\root\build_1XAB\libpalindrome\palindrome.c
# [ 33%] Building C object libpalindrome/CMakeFiles/palindromeStatic.dir/palindrome.c.obj
# cd /d C:\TEMP\F1l7Bxee1N\root\build_1XAB\libpalindrome && C:\STRAW(~1\c\bin\gcc.exe @CMakeFiles/palindromeStatic.dir/includes_C.rsp -MD -MT libpalindrome/CMakeFiles/palindromeStatic.dir/palindrome.c.obj -MF CMakeFiles\palindromeStatic.dir\palindrome.c.obj.d -o CMakeFiles\palindromeStatic.dir\palindrome.c.obj -c C:\TEMP\F1l7Bxee1N\root\build_1XAB\libpalindrome\palindrome.c
# 'C:\STRAW' is not recognized as an internal or external command,
# operable program or batch file.
# gmake[2]: *** [libpalindrome\CMakeFiles\palindrome.dir\build.make:76: libpalindrome/CMakeFiles/palindrome.dir/palindrome.c.obj] Error 1
# gmake[2]: Leaving directory 'C:/TEMP/F1l7Bxee1N/root/build_1XAB'
The use of Alien::cmake3 on a real Alien package (Alien::OpenCV) did not have similar problems, so I am assuming a slightly simplified CMakeFiles.txt was used that used a full path for gcc when it shouldn't? I'm afraid I don't know cmake well. I had a read of the alienfile in the test file and couldn't see anything that used paths directly, so I assume the problem is within the corpus files.
May be helpful to turn on verbose output for cmake: https://bytefreaks.net/programming-2/make-building-with-cmake-verbose Unfortunately I am not an expert on cmake either :/
Would you know how to tell the test to do that? Is there an env var?
I note that while Alien::OpenCV gives explicit build steps (https://github.com/EntropyOrg/perl-Alien-OpenCV/blob/main/alienfile), the test doesn't and so is presumably using the default (https://github.com/PerlAlien/Alien-Build/blob/main/lib/Alien/Build/Plugin/Build/CMake.pm).
Looking again at the errors, I note the error text happens with text omitting a ( - is it possible that in supplying a CC (or similar) value, that make needs that to be surrounded by "" to stop it from misinterpreting such?