Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#8761 closed Bugs (invalid)

Build boost 1.54 on Mac with clang and c++11

Reported by: stefan.schiffler@… Owned by: olli
Milestone: To Be Determined Component: context
Version: Boost 1.54.0 Severity: Showstopper
Keywords: Cc:

Description

using ./bootstrap.sh cxxflags="-std=c++11 -stdlib=libc++" --with-toolset=clang ./b2 cxxflags="-std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++" toolset=clang -a -q

to compile boost 1.54 complains about Jamfile</Users/schiffi/Downloads/builds/boost_1_54_0/libs/context/build>.gas bin.v2/libs/context/build/clang-darwin-4.2.1/release/address-model-64/architecture-x86/threading-multi/asm/make_x86_64_sysv_macho_gas.o libs/context/src/asm/make_x86_64_sysv_macho_gas.S:7:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:40:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:41:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:42:Rest of line ignored. 1st junk character valued 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:43:Rest of line ignored. 1st junk character valued 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:44:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:46:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:49:invalid character (0xd) in operand 2 libs/context/src/asm/make_x86_64_sysv_macho_gas.S:50:invalid character (0xd) in operand 2 libs/context/src/asm/make_x86_64_sysv_macho_gas.S:51:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:55:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:58:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:61:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:65:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:67:Junk character 13 (). libs/context/src/asm/make_x86_64_sysv_macho_gas.S:68:Junk character 13 ().

removing the empty line number 7 from

libs/context/src/asm/make_x86_64_sysv_macho_gas.S

fixes the error

Change History (10)

comment:1 by viboes, 9 years ago

Component: Building Boostcontext
Owner: set to olli

comment:2 by anonymous, 9 years ago

I've some doubt that this is a bug because http://www.boost.org/development/tests/release/developer/context.html reports that the regression tests pass (marshall-mac).

comment:3 by matt@…, 9 years ago

I'm seeing exactly the same bug as stefan while trying to build boost using the latest non-beta developer tools from Apple.

clang version: Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn))

as version: Apple Inc version cctools-839, GNU assembler version 1.38

It looks like both:

libs/context/src/asm/make_x86_64_sysv_macho_gas.S

and

libs/context/src/asm/jump_x86_64_sysv_macho_gas.S

are saved with Windows CRLFs and 'as' is objecting to every CR in the file. If you confert the CRLFs to to Unix LFs, the problems go away.

comment:4 by olli, 9 years ago

Resolution: worksforme
Status: newclosed

code is edited under UNIX - vi does not show CRLF clang- darwin- 4.2.1 compiles the code

comment:5 by Chris Newbold, 9 years ago

Resolution: worksforme
Status: closedreopened

The file is clearly wrong and won't assemble using the tools in Xcode 4.6. The following is from a fresh 1.54 download:

$ file libs/context/src/asm/make_x86_64_sysv_macho_gas.S
libs/context/src/asm/make_x86_64_sysv_macho_gas.S: ASCII c program text, with CRLF line terminators

I don't know how the Windows line endings are getting in there, but they are in the 1.54 distribution.

Here is the error I see:

Jamfile<homes/boost/boost_1_54_0/libs/context/build>.gas /tmp/build-boost/boost/bin.v2/libs/context/build/clang-darwin-osx/release/address-model-64/architecture-x86/link-static/threading-multi/asm/make_x86_64_sysv_macho_gas.o
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:7:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:40:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:41:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:42:Rest of line ignored. 1st junk character valued 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:43:Rest of line ignored. 1st junk character valued 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:44:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:46:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:49:invalid character (0xd) in operand 2
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:50:invalid character (0xd) in operand 2
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:51:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:55:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:58:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:61:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:65:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:67:Junk character 13 ().
libs/context/src/asm/make_x86_64_sysv_macho_gas.S:68:Junk character 13 ().

    as -o "/tmp/build-boost/boost/bin.v2/libs/context/build/clang-darwin-osx/release/address-model-64/architecture-x86/link-static/threading-multi/asm/make_x86_64_sysv_macho_gas.o" "libs/context/src/asm/make_x86_64_sysv_macho_gas.S"

comment:6 by Chris Newbold, 9 years ago

Confirmed. Running sometime like the following over the distributed files resolves the build errors:

perl -pe 's/\r\n|\n|\r/\n/g'   inputfile > outputfile

comment:7 by anonymous, 9 years ago

please do a 'svn co http://svn.boost.org/svn/boost/branches/release/' and check the lib and tell me the result. I realy don't see a M (CRLF representation in vi) if I look into file make_x86_64_sysv_macho_gas.S! And, more important, all regression tests in trunk and release on Darwin (using clang) pass! Take a look at: http://www.boost.org/development/tests/release/developer/context.html http://www.boost.org/development/tests/trunk/developer/context.html

comment:8 by Michel Morin, 9 years ago

.zip and .7z files are shipped with CR-LF newline codes and .tar.bz2 and .tar.gz are shipped with LF newline codes.

I think the reporter downloaded .zip or .7z one. If so, please download .tar.bz2 or .tar.gz one and try again!

comment:9 by olli, 9 years ago

Resolution: invalid
Status: reopenedclosed

comment:10 by lhusselmann@…, 9 years ago

Hi All I'm trying to install Boost_1_54_0, have downloaded the latest version, boost_1_54_0.tar.bz2, unpacked it. I got the an error when trying to use ./bootstrap.sh. "./bootstrap.sh: line 212: rm: command not found -n Building Boost.Build engine with toolset darwin...

Failed to build Boost.Build build engine Consult 'bootstrap.log' for more details". In the log file it says rm -rf bootstrap ./build.sh: line 16: rm: command not found.

The same question was posted years ago at this link,

Installing boost library in /usr/lib: sudo ./bootstrap.sh command not found

The solution was to type, chmod 755 bootstrap.sh , to make it executable. I've tried to do that but it says "command not found". The chmod command was not found. Even trying to do Boost.build in the v2 directory, it says the bootstrap.sh and chmod 755 to make it executable was not found. I stuck!!! Could you please help me. I need to install boost in order to run Tophat2. Thanks in advance. Kind regards

Note: See TracTickets for help on using tickets.