Skip to content

Conversation

arowser
Copy link
Contributor

@arowser arowser commented Nov 4, 2015

The Boost 1.58 can't support build for MIPS32 on a x86_64 machine, the error message is" unrecognized command line option '-m32'". The Boost.Build for version 1.58.0 requires a patch for gcc.jam. This patch prevents bjam from adding -m32 and -m64 options to gcc compiler, when compiling for targets that use the mips1 arch.

Bug discussed here: openwrt/packages#1160

@laanwj
Copy link
Member

laanwj commented Nov 4, 2015

utACK

@laanwj
Copy link
Member

laanwj commented Nov 4, 2015

Though something is clearly going wrong in boost cross-compilation,

  • the host platform should not influence in any way what gets passed to the target compiler
  • according to man gcc, m32/m64 is only supported on "i386 and x86-64" so I think it would make sense to make the condition the other way around instead of a platform blacklist when not to pass it

Arguably an upstream issue and it does make sense to include a workaround patch temporarily...

@laanwj laanwj changed the title Fix Boots 1.58.0 build for mips arch Fix Boost 1.58.0 build for mips arch Nov 4, 2015
@fanquake
Copy link
Member

fanquake commented Nov 5, 2015

Looks like this has been fixed upstream in boostorg/build@cbddcde

@laanwj
Copy link
Member

laanwj commented Nov 5, 2015

Thanks @fanquake . Seems what they did is:

-            if $(arch) != arm
+            if $(arch) = power || $(arch) = sparc || $(arch) = x86

Which is better as it explicitly defines which platforms can use -mXX (didn't know about power and sparc).

An alternative would be to bump boost to 1.59 (which includes this). Seems to work fine in local testing.

@laanwj
Copy link
Member

laanwj commented Nov 9, 2015

@theuni What do you think is best here?

@theuni
Copy link
Member

theuni commented Nov 9, 2015

@laanwj Agree with a bump to 1.59.

@laanwj
Copy link
Member

laanwj commented Nov 10, 2015

Closing in favor of #6980

@laanwj laanwj closed this Nov 10, 2015
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants