Bug 14511 - Build fails in winexe example if mingw installed (fix erroneous examples/winexe/wscript_build)
Summary: Build fails in winexe example if mingw installed (fix erroneous examples/wine...
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.13.0
Hardware: All All
: P5 normal with 15 votes (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2020-09-25 08:35 UTC by Bernd Feige
Modified: 2022-12-16 06:35 UTC (History)
0 users

See Also:

Patch to fix compilation with --without-winexe (1.07 KB, patch)
2020-09-25 08:35 UTC, Bernd Feige
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Feige 2020-09-25 08:35:19 UTC
Created attachment 16258 [details]
Patch to fix compilation with --without-winexe

Dear Ladies and Gentlemen,

I'd like to bring the following gentoo bug to your attention which is
obviously an upstream problem:


There is a patch attached to that bug report, which is an easy fix
to examples/winexe/wscript_build.

I attach it here again for your reference.

Also, here is the text of the bug report:
It seems that in May, patch samba-4.13-winexe_option.patch was added allowing to disable winexe, and the ebuild passes --without-winexe to configure. This added an "enabled=bld.env.build_winexe" option to bld.SAMBA3_BINARY(), apparently in an attempt to not build that binary when --without-winexe is configured.

However, on my system having both bld.env.WINEXE_CC_WIN32 and bld.env.WINEXE_CC_WIN64 (i.e., both i686-w64-mingw32-10.1.0 and x86_64-w64-mingw32-10.1.0 available in gcc-config -l), the build fails trying to build winexesvc32_exe. In the attached patch (to be applied on top of samba-4.13-winexe_option.patch), I only add build rules at all if bld.env.build_winexe is set. This allows samba to compile.

Thanks and best regards,
Bernd Feige
Comment 1 Bernd Feige 2022-07-23 13:10:00 UTC
Seems to be fixed somewhere >=samba-4.14.1