Opened 9 years ago

Closed 8 years ago

#9786 closed Bugs (wontfix)

make_i386_sysv_macho_gas.S:51:suffix or operands invalid for `pop'

Reported by: class101 <ad@…> Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: ad@…

Description

This error occurs when compiling boost 32-bit libs with the 64-bit version of Apple's gcc-5666.3 (4.2.1).

This error occurs in lib.context but olli asked me to report for boost.build because there is a possible missing flag passed to gcc (in this case I guess -m32 is missing)

Error:

    "g++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG -I"." -c -o "bin.v2\libs\context\build\darwin-4.2.1\release
\abi-sysv\address-model-32\binary-format-mach-o\link-static\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\asm\make_i386_sysv_macho_gas.o" "libs\context\src\asm\make_i386_sysv_macho_gas.S
"

libs\context\src\asm\make_i386_sysv_macho_gas.S:51:suffix or operands invalid for `pop'
...failed darwin.compile.asm bin.v2\libs\context\build\darwin-4.2.1\release\abi-sysv\address-model-32\binary-format-mach-o\link-static\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\asm\m
ake_i386_sysv_macho_gas.o...
...failed updating 1 target...
...updated 82 targets...

Command used:

b2 -j1 -d2 -q toolset=darwin variant=release abi=sysv address-model=32 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -m32" linkflags="-w -m32 -lstdc++" --without-python --without-mpi

gcc-5666.3

X:\libs\boost-dev>gcc -v
Using built-in specs.
Target: x86_64-apple-darwin10
Configured with: ../../../src/gcc-5666.3/configure --build=x86_64-build_w64-mingw32 --host=x86_64-build_w64-mingw32 --target=x86_64-apple-darwin10 --prefix=/x/libs/gcc-5666.3-x86_64-apple-darwin10 --with-sysr
oot=/x/libs/gcc-5666.3-x86_64-apple-darwin10 --enable-languages=c,c++ --enable-shared --enable-static --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-cloog=/mingw64 --with
-libelf=/mingw64 --with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++ -lm --enable-threads=posix --enable-target-optspace --without-long-double-128 --disable-nls --enable-multilib --with-gxx-include-dir
=./usr/include/c++/4.2.1 --with-ld=/x/libs/gcc-5666.3-x86_64-apple-darwin10/bin/x86_64-apple-darwin10-ld.exe --with-ar=/x/libs/gcc-5666.3-x86_64-apple-darwin10/bin/x86_64-apple-darwin10-ar.exe --with-as=/x/li
bs/gcc-5666.3-x86_64-apple-darwin10/bin/x86_64-apple-darwin10-as.exe --with-ranlib=/x/libs/gcc-5666.3-x86_64-apple-darwin10/bin/x86_64-apple-darwin10-ranlib.exe --with-lipo=/x/libs/gcc-5666.3-x86_64-apple-dar
win10/bin/x86_64-apple-darwin10-lipo.exe --with-local-prefix=/x/libs/gcc-5666.3-x86_64-apple-darwin10 --enable-c99 --disable-debug --enable-long-long --enable-version-specific-runtime-libs --enable-checking=r
elease --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-werror --disable-symvers --enable-fully-dynamic-string --disable-isl-version-check --disable-cloog-version-check --disable-rpath --enable-clo
og-backend=isl --with-dwarf2 --disable-sjlj-exceptions --with-arch-32=i686 --with-arch-64=nocona --with-tune-32=generic --with-tune-64=core2
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)

Change History (5)

comment:1 by class101 <ad@…>, 9 years ago

Not sure but I think I'm using the wrong toolset because just after adding to the command line

architecture=x86

I get

cc1plus.exe: error: unrecognized command line option "-arch"
libs\atomic\src\lockpool.cpp:1: error: CPU you selected does not support x86-64 instruction set
...failed darwin.compile.c++ bin.v2\libs\atomic\build\darwin-4.2.1\release\abi-sysv\address-mod

so I guess because toolset=darwin using -arch is not compatible with gcc-5666.3, I must use toolset=gcc instead with target-os=darwin but in this case I get another error, trying to check what's happening, I get a

gcc.compile.c++ bin.v2\libs\context\build\gcc-4.2.1\release\abi-sysv\address-model-32\binary-format-mach-o\link-static\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\unsupported.o

    "X:/libs/gcc-5666.3-x86_64-apple-darwin10/bin/g++.exe"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m32 -w -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG  -I"." -c -o "bin.v2\libs
\context\build\gcc-4.2.1\release\abi-sysv\address-model-32\binary-format-mach-o\link-static\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\unsupported.o" "libs\context\src\unsupported.cpp
"

libs\context\src\unsupported.cpp:7:2: error: #error "platform not supported"
...failed gcc.compile.c++ bin.v2\libs\context\build\gcc-4.2.1\release\abi-sysv\address-model-32\binary-format-mach-o\link-static\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi\unsupported
.o...
...skipped <pbin.v2\libs\context\build\gcc-4.2.1\release\abi-sysv\address-model-32\binary-format-mach-o\link-static\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi>libboost_context-gcc42-m
t-1_56.a for lack of <pbin.v2\libs\context\build\gcc-4.2.1\release\abi-sysv\address-model-32\binary-format-mach-o\link-static\pch-off\strip-on\target-os-darwin\threadapi-pthread\threading-multi>unsupported.o.
..
...failed updating 1 target...
...skipped 1 target...
...updated 9 targets...

with both 32-bit and 64-bit build commands

b2 -j1 -d2 -q --debug-configuration toolset=gcc variant=release abi=sysv address-model=64 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -m64" linkflags="-w -m64 -lstdc++" --without-python --without-mpi
b2 -j1 -d2 -q --debug-configuration toolset=gcc variant=release abi=sysv address-model=32 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -m32" linkflags="-w -m32" --without-python --without-mpi

comment:2 by class101 <ad@…>, 9 years ago

Version: Boost 1.56.0Boost Release Branch

tested on git develop branch

comment:3 by class101 <ad@…>, 9 years ago

Version: Boost Release BranchBoost Development Trunk

comment:4 by class101 <ad@…>, 9 years ago

Hmm I think disregard this bug report, to me this is much a recent changes in lib/context that is forbidding the use of apple's gcc-5666.3 and throw it unsupported, been able to compile 64-bit and 32-bit libs with the patch made https://svn.boost.org/trac/boost/ticket/9772#comment:13

comment:5 by olli, 8 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.