Bug 426264 - Cannot build digikam using Craft on Windows 10: too long command lines
Summary: Cannot build digikam using Craft on Windows 10: too long command lines
Status: REPORTED
Alias: None
Product: Craft
Classification: Developer tools
Component: Core (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-07 00:26 UTC by mrbus
Modified: 2020-09-07 17:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Craft output (36.95 KB, text/plain)
2020-09-07 00:26 UTC, mrbus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mrbus 2020-09-07 00:26:23 UTC
Created attachment 131457 [details]
Craft output

SUMMARY
Cannot build `digikam` using Craft on Windows 10: too long command lines.
I tried to build it with different settings of Craft (CraftRoot/etc/CraftSettings.ini).
Set `UseNinja` to `False` or `True`, set `MakeProgram` to `jom` or `nmake`, in any case the Craft output is the same (see attachment).
(This is not the whole output, but we can see that command line of moc.exe is longer than 32767 characters which is command line length limit of Windows).

Then I tried to shorten command lines by installing Craft to shorter directory, `C:\C` instead of `C:\CraftRoot`.
Command line becomes shorter by about 3800 characters but still exceeds the limit.
With UseNinja = True, MakeProgram = jom, I get: `ninja: fatal: CreateProcess: The parameter is incorrect (is the command line too long?)` and with other settings I get the error mentioned in attachment.

Is there a way to build digikam for Windows using Craft... or at least some other way? Can I shorten command line even more?

STEPS TO REPRODUCE
1. Install Craft to C:\C
2. Start Craft and execute `craft digikam >output.txt`
3. You may receive an error related to opencv (another issue?) like "ninja: error: 'opencv_imgcodecs-NOTFOUND'". It can be worked around:
3a. Download opencv 3.3.0 from sourceforge.
3b. Add environment variable `OpenCV_DIR` and set it's value to path-to-opencv\build\x64\vc14\lib (path may differ; use the folder that contains OpenCVConfig.cmake file).
3c. Restart Craft.

OBSERVED RESULT
Shown in attachment


EXPECTED RESULT
`digikam` successfully built


SOFTWARE/OS VERSIONS
Windows: 10
ADDITIONAL INFORMATION
I'm not sure should I report this issue to Craft or to digikam.
Comment 1 Hannah von Reth 2020-09-07 11:03:15 UTC
(In reply to mrbus from comment #0)
> Created attachment 131457 [details]
> Craft output
> 
> SUMMARY
> Cannot build `digikam` using Craft on Windows 10: too long command lines.
> I tried to build it with different settings of Craft
> (CraftRoot/etc/CraftSettings.ini).
> Set `UseNinja` to `False` or `True`, set `MakeProgram` to `jom` or `nmake`,
> in any case the Craft output is the same (see attachment).
> (This is not the whole output, but we can see that command line of moc.exe
> is longer than 32767 characters which is command line length limit of
> Windows).
> 
> Then I tried to shorten command lines by installing Craft to shorter
> directory, `C:\C` instead of `C:\CraftRoot`.
Please try to set https://invent.kde.org/packaging/craft/-/blob/master/CraftSettings.ini.template#L116 to C:\_
> Command line becomes shorter by about 3800 characters but still exceeds the
> limit.
> With UseNinja = True, MakeProgram = jom, I get: `ninja: fatal:
> CreateProcess: The parameter is incorrect (is the command line too long?)`
> and with other settings I get the error mentioned in attachment.
> 
> Is there a way to build digikam for Windows using Craft... or at least some
> other way? Can I shorten command line even more?
> 
> STEPS TO REPRODUCE
> 1. Install Craft to C:\C
> 2. Start Craft and execute `craft digikam >output.txt`
> 3. You may receive an error related to opencv (another issue?) like "ninja:
> error: 'opencv_imgcodecs-NOTFOUND'". It can be worked around:
> 3a. Download opencv 3.3.0 from sourceforge.
> 3b. Add environment variable `OpenCV_DIR` and set it's value to
> path-to-opencv\build\x64\vc14\lib (path may differ; use the folder that
> contains OpenCVConfig.cmake file).
Please don't do that, craft provides opencv, if it fails to find that, check why it fails, but pls never try mixing with external 3rdparty builds.
> 3c. Restart Craft.
> 
> OBSERVED RESULT
> Shown in attachment
> 
> 
> EXPECTED RESULT
> `digikam` successfully built
> 
> 
> SOFTWARE/OS VERSIONS
> Windows: 10
> ADDITIONAL INFORMATION
> I'm not sure should I report this issue to Craft or to digikam.
Comment 2 mrbus 2020-09-07 17:57:48 UTC
(In reply to Hannah von Reth from comment #1)
> Please try to set
> https://invent.kde.org/packaging/craft/-/blob/master/CraftSettings.ini.
> template#L116 to C:\_

Thanks! It helped.