Bug 1315057

Summary: restsharp: FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Raphael Groner <projects.rg>
Component: restsharpAssignee: Raphael Groner <projects.rg>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: chkr, claudiorodrigo, itamar, lxtnow, paul, pokorra.mailinglists, projects.rg
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/restsharp/RestSharp/issues/823
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-08 13:58:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1159091    

Description Raphael Groner 2016-03-06 10:40:45 UTC
Description of problem:
Package restsharp fails to build from source in rawhide. The log shows an internal error of CSC (mono component).

Version-Release number of selected component (if applicable):
restsharp 105.2.3-4.fc24
mono*     4.3.2-7.fc25

Steps to Reproduce:
koji build --scratch f25 restsharp-105.2.3-4.fc24.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://apps.fedoraproject.org/koschei/package/restsharp


Interesting snippet from build.log (both i686 and x86_64):
…
CSC:  warning CS2029: Invalid conditional define symbol `'
CSC:  warning CS2029: Invalid conditional define symbol `'
CSC:  warning CS1691: `1658' is not a valid warning number
CSC: error CS1904: `1658' is not a valid warning number
	Task "Csc" execution -- FAILED
	Done building target "CoreCompile" in project "/builddir/build/BUILD/RestSharp-105.2.3/RestSharp.Net45/RestSharp.Net45.Signed.csproj".-- FAILED
Done building project "/builddir/build/BUILD/RestSharp-105.2.3/RestSharp.Net45/RestSharp.Net45.Signed.csproj".-- FAILED
Build FAILED.
Warnings:
/builddir/build/BUILD/RestSharp-105.2.3/RestSharp.Net45/RestSharp.Net45.Signed.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->
	CSC:  warning CS2029: Invalid conditional define symbol `'
	CSC:  warning CS2029: Invalid conditional define symbol `'
	CSC:  warning CS1691: `1658' is not a valid warning number
Errors:
/builddir/build/BUILD/RestSharp-105.2.3/RestSharp.Net45/RestSharp.Net45.Signed.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->
	CSC: error CS1904: `1658' is not a valid warning number
	 3 Warning(s)
	 1 Error(s)

Comment 1 Timotheus Pokorra 2016-03-07 08:01:36 UTC
Comparing with previous builds of RestSharp, this error used to be a warning:

CSC:  warning CS2029: Invalid conditional define symbol `'
CSC:  warning CS2029: Invalid conditional define symbol `'
CSC:  warning CS1691: `1658' is not a valid warning number

So I guess, with Mono 4.3.2 this has now become an error.

I find/grepped for 1658, and found it was in some csproj files in a NoWarn tag.
So that invalid warning number can be removed there.

This works for me locally, when I add these lines to the %prep section in restsharp.spec:

sed -i 's#,1658</NoWarn>#</NoWarn>#g' RestSharp.Net45/RestSharp.Net45.Signed.csproj
sed -i 's#,1658</NoWarn>#</NoWarn>#g' RestSharp.Net45/RestSharp.Net45.Signed.csproj
sed -i 's#,1658</NoWarn>#</NoWarn>#g' RestSharp/RestSharp.Net35.csproj

Comment 2 Raphael Groner 2016-03-08 13:58:51 UTC
Thanks for the workaround. Reported to upstream.