Opened 6 years ago

Last modified 5 years ago

#7865 new Bugs

error: unknown target CPU 'i386' for the boost b2 build using architecture=x86 address-model=32

Reported by: anonymous Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

Trying to build boost 1.52 for 32 bit architecture on OS X 10.7.5, using clang:

./b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++" architecture=x86 address-model=32

Get a lot of errors of this type:

    "clang++" -x c++ -O3 -std=c++11 -stdlib=libc++ -O3 -finline-functions -Wno-inline -Wall -march=i386 -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/date_time/build/clang-darwin-4.2.1/release/address-model-32/architecture-x86/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp"

...failed clang-darwin.compile.c++ bin.v2/libs/date_time/build/clang-darwin-4.2.1/release/address-model-32/architecture-x86/threading-multi/gregorian/greg_month.o...
clang-darwin.compile.c++ bin.v2/libs/date_time/build/clang-darwin-4.2.1/release/address-model-32/architecture-x86/threading-multi/gregorian/greg_weekday.o
error: unknown target CPU 'i386'

Change History (5)

comment:1 Changed 6 years ago by viboes

Component: Nonebuild
Description: modified (diff)
Owner: set to Vladimir Prus

comment:2 Changed 6 years ago by Vladimir Prus

Does anybody know the right options? And where the old options stopped working?

comment:3 Changed 5 years ago by Steven Watanabe

Maybe adding instruction-set=i686 or instruction-set=native to the command line would fix this?

comment:4 Changed 5 years ago by anonymous

It looks like XCode uses the command line argument -arch i386 instead.

comment:5 Changed 5 years ago by anonymous

The command line argument -m32 seems to work aswell.

Note: See TracTickets for help on using tickets.