Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728368 - net-fs/samba-4.12.3-r1: Build fails in winexe example if mingw installed
Summary: net-fs/samba-4.12.3-r1: Build fails in winexe example if mingw installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's SAMBA Team
URL: https://bugzilla.samba.org/show_bug.c...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-06-15 13:49 UTC by Bernd Feige
Modified: 2022-07-23 12:48 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix compilation with --without-winexe (samba-4.13-winexe_example.patch,1.07 KB, patch)
2020-06-15 13:50 UTC, Bernd Feige
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Feige 2020-06-15 13:49:27 UTC
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.

Reproducible: Always
Comment 1 Bernd Feige 2020-06-15 13:50:27 UTC
Created attachment 644842 [details, diff]
Patch to fix compilation with --without-winexe
Comment 2 Jouni Kosonen 2020-07-03 04:24:04 UTC
This also happens with the newly added net-fs/samba-4.11.11 that also uses the samba-4.13-winexe_option.patch. About to try with the suggested patch.
Comment 3 Jouni Kosonen 2020-07-03 09:08:44 UTC
4.11.11 also succesfully compiled with the patch from comment 1.
Comment 4 Bernd Feige 2020-07-03 10:19:06 UTC
Thanks for testing. I also confirmed that it is still needed for current net-fs/samba-4.12.4.
Comment 5 Bernd Feige 2020-09-25 07:23:04 UTC
The patch is still needed for current 4.13.0, although samba-4.13-winexe_option.patch is no longer applied, meaning that the faulty patch was accepted upstream. Could somebody look into this please?
Comment 6 Bernd Feige 2020-09-25 08:36:36 UTC
I have filed https://bugzilla.samba.org/show_bug.cgi?id=14511 now for upstream.
Comment 7 magister.yura@gmail.com 2021-04-03 10:37:12 UTC
if it helps to anybody I was able to solve temporary via:
su
cd /usr/bin/
mmv '*mingw32-*' '#1wingw32-#2'
emerge -av1 samba
mmv '*wingw32-*' '#1mingw32-#2'

just 'hide' mingw from samba temporary renaming it to wingw32, update it, and then put back.
Comment 8 Bernd Feige 2022-07-23 12:48:08 UTC
The patch was not needed any more since somewhere in the >=samba-4.14.1 series.