Bug 1311841

Summary: FTBFS on s390x: problem in aot-compiler.c, mixup with MONO_ARCH_AOT_SUPPORTED
Product: [Fedora] Fedora Reporter: Timotheus Pokorra <pokorra.mailinglists>
Component: monoAssignee: Xavier Lamien <lxtnow>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: chkr, claudiorodrigo, itamar, lxtnow, paul, pokorra.mailinglists
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-29 07:25:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Timotheus Pokorra 2016-02-25 07:43:08 UTC
see upstream bug at https://bugzilla.xamarin.com/show_bug.cgi?id=39112

Description of problem:
Mono 4.3.1 Cycle 7 Alpha fails to build in s390x.

see the build log of a scratch build at http://s390.koji.fedoraproject.org/kojifiles/work/tasks/6391/2106391/build.log

aot-compiler.c: In function 'mono_aot_get_direct_call_symbol':
aot-compiler.c:7739:11: error: implicit declaration of function 'get_pinvoke_import' [-Werror=implicit-function-declaration]
     sym = get_pinvoke_import (llvm_acfg, method);
           ^~~~~~~~~~~~~~~~~~

I checked the code at https://github.com/mono/mono/blob/ba2e5e42f342f2b64fedc3cee2ef925c57c4a325/mono/mini/aot-compiler.c#L7739
and noticed that the function get_pinvoke_import is defined in line 4734 inside an ifdef MONO_ARCH_AOT_SUPPORTED, but in line 7739 that ifdef is missing.

Comment 1 Timotheus Pokorra 2016-02-29 07:25:32 UTC
I have now applied a patch that was created as an answer to https://bugzilla.xamarin.com/show_bug.cgi?id=39112

http://pkgs.fedoraproject.org/cgit/rpms/mono.git/tree/mono-4.3.2-s390-get_pinvoke_import.patch