Bug 1305953 - Fix build on MIPS
Summary: Fix build on MIPS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: m2crypto
Version: rawhide
Hardware: mips64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: MIPS
TreeView+ depends on / blocked
 
Reported: 2016-02-09 16:34 UTC by Michal Toman
Modified: 2016-02-10 13:32 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-10 13:32:56 UTC
Type: Bug
Embargoed:


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

Description Michal Toman 2016-02-09 16:34:19 UTC
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 17:38:11 UTC
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 17:57:26 UTC
(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 19:24:44 UTC
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 19:48:11 UTC
It works fine, thanks.

Comment 5 Miloslav Trmač 2016-02-10 13:32:56 UTC
Thanks for the confirmation.


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