Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10442 closed Bugs (invalid)

Boost Context library fails for MIPS architecture

Reported by: Vincent.Riera@… Owned by: olli
Milestone: To Be Determined Component: context
Version: Boost 1.56.0 Severity: Regression
Keywords: mips Cc:

Description

Tried with all combinations (all of the fail):

This is a regression. boost-1.55.0 works fine.

The failure is:

boost 1.56.0 Installing to staging directory

(cd /br/output/build/boost-1.56.0 && ./bjam -j5 -d+1 --user-config=/br/output/build/boost-1.56.0/user-config.jam toolset=gcc threading=multi variant=release link=shared runtime-link=shared --prefix=/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr --layout=system install) Performing configuration checks

  • 32-bit : yes (cached)
  • arm : no (cached)
  • mips1 : yes (cached)

Component configuration:

  • atomic : not building
  • chrono : not building
  • container : building
  • context : building
  • coroutine : not building
  • date_time : not building
  • exception : not building
  • filesystem : not building
  • graph : not building
  • graph_parallel : not building
  • iostreams : not building
  • locale : not building
  • log : not building
  • math : not building
  • mpi : not building
  • program_options : not building
  • python : not building
  • random : not building
  • regex : not building
  • serialization : not building
  • signals : not building
  • system : not building
  • test : not building
  • thread : not building
  • timer : not building
  • wave : not building

...found 21649 targets... ...updating 4 targets... gcc.compile.c++ bin.v2/libs/context/build/gcc-4.8.3/release/threading-multi/unsupported.o libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"

#error "platform not supported"

"/br/output/host/usr/bin/mips-linux-gnu-g++" -ftemplate-depth-128

-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG -I"." -c -o "bin.v2/libs/context/build/gcc-4.8.3/release/threading-multi/unsupported.o" "libs/context/src/unsupported.cpp"

...failed gcc.compile.c++ bin.v2/libs/context/build/gcc-4.8.3/release/threading-multi/unsupported.o... ...skipped <pbin.v2/libs/context/build/gcc-4.8.3/release/threading-multi>libboost_context.so.1.56.0 for lack of <pbin.v2/libs/context/build/gcc-4.8.3/release/threading-multi>unsupported.o... ...skipped <p/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr/lib>libboost_context.so.1.56.0 for lack of <pbin.v2/libs/context/build/gcc-4.8.3/release/threading-multi>libboost_context.so.1.56.0... ...skipped <p/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr/lib>libboost_context.so for lack of <p/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr/lib>libboost_context.so.1.56.0... ...failed updating 1 target... ...skipped 3 targets... make: * br/output/build/boost-1.56.0/.stamp_staging_installed Error 1

Attachments (2)

boost-0001-fix-mips.patch (1.3 KB ) - added by Vincent.Riera@… 8 years ago.
boost-0001-fix-mips.patch
b2.log (85.3 KB ) - added by Vincent.Riera@… 8 years ago.
b2 --debug-building log

Download all attachments as: .zip

Change History (12)

by Vincent.Riera@…, 8 years ago

Attachment: boost-0001-fix-mips.patch added

boost-0001-fix-mips.patch

comment:1 by Vincent.Riera@…, 8 years ago

The attached patch fixes the problem. I know is not correct to apply it upstream, but it will help you to identify faster where is the problem.

comment:2 by olli, 8 years ago

sorry - the patch is invalid.

could you post the output of b2 ... --debug-building

in reply to:  2 comment:3 by Vincent.Riera@…, 8 years ago

Replying to olli:

sorry - the patch is invalid.

I know the patch is invalid. The only purpose of that patch is to help you to identify the problem faster, as I said in my previous comment.

could you post the output of b2 ... --debug-building

I'm sorry, b2?

by Vincent.Riera@…, 8 years ago

Attachment: b2.log added

b2 --debug-building log

comment:4 by Vincent.Riera@…, 8 years ago

I have attached a file with the output of this command:

./b2 -j1 -d+2 --user-config=/br/output/build/boost-1.56.0/user-config.jam toolset=gcc threading=multi variant=release link=shared runtime-link=shared --prefix=/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr --layout=system install --debug-building

Is that what you need?

comment:5 by olli, 8 years ago

in the log output I can read: <abi>sysv

it's the wrong property for MIPS (only o32 is valid)

seams that you try a cross-compile try abi=o32 on bjam/b2 command-line

comment:6 by Vincent.Riera@…, 8 years ago

Yes, I'm cross-compiling for MIPS32 architecture, so the ABI is o32. From your comment I understand that the boost build system is using the host's ABI instead of the target's one.

If I pass the "abi=o32" option as you suggested, it works. But the thing is that the build system should be smart enough to detect when I'm cross compiling and using the target's ABI instead of the host's ABI.

That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine.

in reply to:  6 ; comment:7 by olli, 8 years ago

Replying to Vincent.Riera@…:

If I pass the "abi=o32" option as you suggested, it works. But the thing is that the build system should be smart enough to detect when I'm cross compiling and using the target's ABI instead of the host's ABI.

this isn't trivial - I suspect that you can detect at runtime for which ABI your are compiling (you can have multiple like on MIPS)

That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine.

because the default is SYSV

comment:8 by olli, 8 years ago

Resolution: invalid
Status: newclosed

in reply to:  7 ; comment:9 by anonymous, 8 years ago

Replying to olli:

Replying to Vincent.Riera@…:

That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine.

because the default is SYSV

So, you mean that the sysv ABI is valid for powerpc and arm, but not form MIPS?

in reply to:  9 comment:10 by olli, 8 years ago

Replying to anonymous:

Replying to olli:

Replying to Vincent.Riera@…:

That problem doesn't happen on other architectures. I have tried cross-compiling for powerpc and arm, and both of them worked fine.

because the default is SYSV

So, you mean that the sysv ABI is valid for powerpc and arm, but not form MIPS?

no, SYSV ABI is used for x86/non-Windows, powerpc on LINUX etc. ARM uses AAPCS and MIPS O32/N32/N64 etc.

Last edited 8 years ago by olli (previous) (diff)
Note: See TracTickets for help on using tickets.