Bug #51414 configure fails with 'unrecognized option: -m64'
Submitted: 23 Feb 2010 9:31 Modified: 6 Mar 2010 19:48
Reporter: John Embretsen Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:next-mr, 5.5.99-m3 OS:Solaris
Assigned to: Vladislav Vaintroub CPU Architecture:Any

[23 Feb 2010 9:31] John Embretsen
The bug reporter has used the same configure settings for months against mysql-next-mr and related branches. After the merge of WL#5161 (CMake-based unified build system), which claims to be backwards compatible until further notice, this fails on Solaris with:

./configure: cmake: not found
configure.am: WARNING: you should use --build, --host, --target
configure.am: WARNING: invalid host type: /opt/studio12/SUNWspro/bin/cc
configure.am: WARNING: you should use --build, --host, --target
configure.am: WARNING: invalid host type: /opt/studio12/SUNWspro/bin/CC
configure.am: error: unrecognized option: -m64
Try `./configure.am --help' for more information.

Workaround would probably be to install cmake and follow instructions from WL#5161.

How to repeat:
Branch or otherwise obtain source code for mysql-next-mr or equivialent branch with WL#5161.

cd to the branch. Solaris settings follow:


./configure CC='/usr/local/bin/ccache /opt/studio12/SUNWspro/bin/cc' CXX='/usr/local/bin/ccache /opt/studio12/SUNWspro/bin/CC' CFLAGS='-g -m64 -mt' CXXFLAGS='-g -m64 -mt' LDFLAGS='-m64' ASFLAGS='-m64' PKG_CONFIG_PATH='/usr/lib/64/pkgconfig' --enable-dtrace --with-debug=full --with-embedded-server --with-extra-charsets=complex --with-plugins=max-no-ndb --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-readline

Suggested fix:
Make old-style (autotools) build work as before.

Alternatively, announce widely and clearly any incompatibilities and available known work-arounds.
[23 Feb 2010 10:19] John Embretsen
This issue is seen on Solaris 10 64-bit (x86, SPARC).
Related issues (with ./BUILD/autorun.sh) also seen on linux.

Probably caused by quotes around CFLAGS values etc. not being propagated properly.

These work-arounds seem to work:

 - use ./configure.am directly instead of ./configure

 - in the Bash shell, specify CFLAGS, CXXFLAGS etc. as environment variables _before_ "./configure" instead of after. In other shells, set and export as environment variables before calling ./configure.
[23 Feb 2010 11:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


3098 Vladislav Vaintroub	2010-02-23
      Bug #51414:  Arguments with embedded spaces are not correctly handled by configure wrapper.
      The bug was that ./configure was  passing paramers to subscripts as $@, and to handle embedded spaces it needs
      to be quoted as "$@".
      This resulting into a bug when ./configure was called e.g with CFLAGS='-m64 -Xstrconst'..
      Additionally, fixed cmake/configure.pl did not handle environment variables passed on the command line.
      this is fixed in this push
[25 Feb 2010 19:47] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100225194420-p60r4u90tszj8q2x) (version source revid:vvaintroub@mysql.com-20100223132149-dt8ju4nsjimq7f8l) (merge vers: 6.0.14-alpha) (pib:16)
[25 Feb 2010 19:49] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100225194305-h49uyjrlfl3mwo60) (version source revid:vvaintroub@mysql.com-20100223125045-iq5srydus3lubafc) (pib:16)
[25 Feb 2010 21:13] Paul DuBois
Appears in no released version. No changelog entry needed.

Setting report to Need Merge pending push of Celosia into release tree.
[6 Mar 2010 11:05] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:alik@sun.com-20100225195857-farb6yvy8x06bylj) (merge vers: 5.5.99-m3) (pib:16)
[6 Mar 2010 19:48] Paul DuBois
No changelog entry needed.