#10442 closed Bugs (invalid)
Boost Context library fails for MIPS architecture
Reported by: | 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):
- uClib/glibc
- MIPS32/MIPS32r2
- Big Endian/Little Endian
- Hard Float/Soft Float
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)
Change History (12)
by , 8 years ago
Attachment: | boost-0001-fix-mips.patch added |
---|
comment:1 by , 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.
follow-up: 3 comment:2 by , 8 years ago
sorry - the patch is invalid.
could you post the output of b2 ... --debug-building
comment:3 by , 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?
comment:4 by , 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 , 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
follow-up: 7 comment:6 by , 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.
follow-up: 9 comment:7 by , 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 , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
follow-up: 10 comment:9 by , 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?
comment:10 by , 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.
boost-0001-fix-mips.patch