Bug #62533 unittest/mysys/my_atomic-t.c does not compile on MacOSX Lion
Submitted: 25 Sep 2011 12:25 Modified: 3 Oct 2011 14:21
Reporter: Domas Mituzas Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.5 r3528 OS:MacOS (10.7.1 xcode 4.1.1)
Assigned to: Jon Olav Hauglid CPU Architecture:Any

[25 Sep 2011 12:25] Domas Mituzas
Description:
while compiling mysql-5.5:

[ 95%] Building C object unittest/mysys/CMakeFiles/my_atomic-t.dir/my_atomic-t.c.o
/var/folders/2_/8472h2xn69vc49vz3w77cr600000gn/T//ccqsOkCz.s:596:suffix or operands invalid for `add'
make[2]: *** [unittest/mysys/CMakeFiles/my_atomic-t.dir/my_atomic-t.c.o] Error 1
make[1]: *** [unittest/mysys/CMakeFiles/my_atomic-t.dir/all] Error 2
make: *** [all] Error 2

other objects build fine (including mysqld)

How to repeat:
compile 5.5 with:

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

Suggested fix:
*shrug*
[26 Sep 2011 7:38] Geert Vanderkelen
Verified using:
* MySQL 5.5.16 source distribution
* MacOS 10.7, with XCode 4.1
* cmake . -DCMAKE_INSTALL_PREFIX=/opt/mysql/mysql-5.5.16

Verbose output gave this:

cd /Users/geert/Projects/src/mysql-5.5.16/unittest/mysys && /usr/bin/gcc  -DHAVE_CONFIG_H -Wall -O2 -g -DDBUG_OFF -I/Users/geert/Projects/src/mysql-5.5.16/include -I/Users/geert/Projects/src/mysql-5.5.16/sql -I/Users/geert/Projects/src/mysql-5.5.16/regex -I/Users/geert/Projects/src/mysql-5.5.16/extra/yassl/include -I/Users/geert/Projects/src/mysql-5.5.16/unittest/mytap    -o CMakeFiles/my_atomic-t.dir/my_atomic-t.c.o   -c /Users/geert/Projects/src/mysql-5.5.16/unittest/mysys/my_atomic-t.c
/var/folders/c2/zh1vjg4x7hq_0b2vh2fb535m0000gn/T//ccLPrRHr.s:596:suffix or operands invalid for `add'
make[2]: *** [unittest/mysys/CMakeFiles/my_atomic-t.dir/my_atomic-t.c.o] Error 1
make[1]: *** [unittest/mysys/CMakeFiles/my_atomic-t.dir/all] Error 2
make: *** [all] Error 2
[30 Sep 2011 13:25] Jon Olav Hauglid
Hello,

Thanks for the bug report!

Until we release a fix for this issue (the fix is basically ready to go),
a workaround is to specify architecture explicitly e.g. by setting
CFLAGS="-m64" and CXXFLAGS="-m64".

Hope this helps.
[3 Oct 2011 14:21] Paul DuBois
Changes are for test suite. No changelog entry needed.