Bug 2178710

Summary: scalapack: Build in C89 mode
Product: [Fedora] Fedora Reporter: Arjun Shankar <ashankar>
Component: scalapackAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: david.brown, fweimer, spotrh, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: scalapack-2.2.0-4.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-16 12:01:59 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137516    
Attachments:
Description Flags
A partial patch to fix some implicit function declarations none

Description Arjun Shankar 2023-03-15 15:52:28 UTC
Created attachment 1951049 [details]
A partial patch to fix some implicit function declarations

This package has several implicitly defined functions due to which it cannot build in C99 mode.

Somewhat related, it also occasionally declares function prototypes right before use instead of including the prototypes via a header. Here's an example from scalapack-2.2.0/scalapack-2.2.0/BLACS/SRC/blacs_map_.c:

#if (INTFACE == C_CALL)
void Cblacs_gridmap(Int *ConTxt, Int *usermap, Int ldup, Int nprow0, Int npcol0)
#else
F_VOID_FUNC blacs_gridmap_(Int *ConTxt, Int *usermap, Int *ldup, Int *nprow0,
                           Int *npcol0)
#endif
{
   void Cblacs_pinfo(Int *, Int *);
   void Cblacs_get(Int, Int, Int *);
   ...

...the above two functions are then used later on in the function.

Building this package as C99 leads to several implicit function declaration errors, and in some cases fixing them would presumably involve declarations (currently missed) such as the example above.

I am attaching a partial patch to fix up some implicit function declarations, but eventually decided that it is easier to simply build this package as C89 for now.

C99 porting should be deferred until it's fixed upstream and rebased.