Bug 1305953 - Fix build on MIPS
Fix build on MIPS
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: m2crypto (Show other bugs)
rawhide
mips64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miloslav Trmač
Fedora Extras Quality Assurance
:
Depends On:
Blocks: MIPS
  Show dependency treegraph
 
Reported: 2016-02-09 11:34 EST by Michal Toman
Modified: 2016-02-10 08:32 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-10 08:32:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix-build-on-MIPS.patch (1.74 KB, patch)
2016-02-09 11:34 EST, Michal Toman
no flags Details | Diff

  None (edit)
Description Michal Toman 2016-02-09 11:34:19 EST
Created attachment 1122449 [details]
Fix-build-on-MIPS.patch

Description of problem:
We are trying to bring Fedora to MIPS platform and this requires 2 changes in m2crypto specfile:
1) skip __REGISTER_PREFIX__ macro, it expands to dollar sign '$' and confuses gcc
2) add MIPS to multilib_arches

Actual results:
Build fails, gcc fails parsing at a dollar sign. Also MIPS is not included in multilib_arches.

Expected results:
Build passes, MIPS is included in multilib_arches

Additional info:
Attaching dist-git patch
Comment 1 Miloslav Trmač 2016-02-09 12:38:11 EST
Thanks for your report.

How does gcc fail with '$' exactly? Doing just a simple test
> $ cat > t.c
> #define foo $
> int main(void) { return 0; } 
> $ gcc t.c $(rpm --eval '%optflags')
seems to work fine, with x86_64 gcc-5.3.1-2.fc22.x86_64 at least. Same with the long flags which are actually used during m2crypto compilation.


I do see swig failing, though:
> swig -python … SWIG/_m2crypto.i
> /usr/include/openssl/opensslconf-x86_64.h:5: Warning 205: CPP #error ""Don't include this file directly, use <openssl/opensslconf.h> instead!"".
> SWIG/gcc_macros.h:496: Error: Illegal token '$'.
> SWIG/gcc_macros.h:496: Warning 305: Bad constant value (ignored).
Is that what you are running into?
Comment 2 Michal Toman 2016-02-09 12:57:26 EST
(In reply to Miloslav Trmač from comment #1)
> I do see swig failing, though:
> > swig -python … SWIG/_m2crypto.i
> > /usr/include/openssl/opensslconf-x86_64.h:5: Warning 205: CPP #error ""Don't include this file directly, use <openssl/opensslconf.h> instead!"".
> > SWIG/gcc_macros.h:496: Error: Illegal token '$'.
> > SWIG/gcc_macros.h:496: Warning 305: Bad constant value (ignored).
> Is that what you are running into?

You are right, my bad. Where I wrote gcc I meant swig.
Comment 3 Miloslav Trmač 2016-02-09 14:24:44 EST
Thanks for the confirmation,

I have just built m2crypto-0.23.0-1.fc24, which includes your __REGISTER_PREFIX__ change and should make the multilib_arches part unnecessary. Can you verify that it works for you, please?
Comment 4 Michal Toman 2016-02-09 14:48:11 EST
It works fine, thanks.
Comment 5 Miloslav Trmač 2016-02-10 08:32:56 EST
Thanks for the confirmation.

Note You need to log in before you can comment on or make changes to this bug.