Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t/alien_build_plugin_build_cmake.t fails on "Perl in space" #392

Open
mohawk2 opened this issue Mar 8, 2023 · 2 comments
Open

t/alien_build_plugin_build_cmake.t fails on "Perl in space" #392

mohawk2 opened this issue Mar 8, 2023 · 2 comments
Labels
🐞Bug Something fails that should not (not a feature) 🙏Help Wanted We could use some help on implementing this issue

Comments

@mohawk2
Copy link
Contributor

mohawk2 commented Mar 8, 2023

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.

@plicease plicease added 🐞Bug Something fails that should not (not a feature) 🙏Help Wanted We could use some help on implementing this issue labels Mar 8, 2023
@plicease
Copy link
Member

plicease commented Mar 8, 2023

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 :/

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 8, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞Bug Something fails that should not (not a feature) 🙏Help Wanted We could use some help on implementing this issue
Development

No branches or pull requests

2 participants