SunStudio 12.1 on Solaris 10u8 (x64) - compilation error

Bug #901690 reported by Marcin Jaworski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Invalid
Low
Unassigned
5.5
Invalid
Low
Unassigned

Bug Description

CC="/opt/sunstudio12.1/bin/cc"
CXX="/opt/sunstudio12.1/bin/CC"
CFLAGS="-xO4 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=native -m64 -xregs=no%frameptr -w "
CXXFLAGS="-xO4 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=native -m64 -xregs=no%frameptr -w "
LDFLAGS="-xtarget=native -m64 "
LIBS="-lmtmalloc"

./configure \
    --prefix=/opt/mysql/mysql \
    --localstatedir=/opt/mysql/mysql/data \
    --libexecdir=/opt/mysql/mysql/bin \
    --with-extra-charsets=complex \
    --enable-thread-safe-client \
    --enable-local-infile \
    --with-zlib-dir=bundled \
    --with-big-tables \
    --with-readline \
    --with-archive-storage-engine \
    --with-named-curses=-lcurses \
    --with-big-tables \
    --with-innodb \
    --with-berkeley-db \
    --with-blackhole-storage-engine \
    --with-federated-storage-engine \
    --with-csv-storage-engine \
    --disable-shared \
    --enable-assembler \
    --with-server-suffix=-fotka \
    --with-mysqld-libs=-lmtmalloc \
    --without-plugin-ndbcluster \
    --without-plugin-example \

make
----------------------------------------------------

[ 90%] Building CXX object sql/CMakeFiles/sql.dir/query_response_time.cc.o
 "/export/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1/sql/query_response_time.cc", line 137: Error: An integer constant expression is required within the array subscript opera
tor.
 "/export/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1/sql/query_response_time.cc", line 210: Error: An integer constant expression is required within the array subscript opera
tor.
 "/export/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1/sql/query_response_time.cc", line 211: Error: An integer constant expression is required within the array subscript opera
tor.
 3 Error(s) detected.
 *** Error code 3
 The following command caused the error:
 cd /export/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1/sql && /opt/sunstudio12.1/bin/CC -DHAVE_RWLOCK_T -DHAVE_RESPONSE_TIME_DISTRIBUTION -DDBUG_OFF -DHAVE_CONFIG_H -DMYSQL
_SERVER -DHAVE_EVENT_SCHEDULER -xO4 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=opteron -m64 -xregs=no%frameptr -xipo -xjobs=8 -I/export/admins/marcin.jaw
orski/percona/Percona-Server-5.5.17-rel22.1/include -I/export/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1/sql -I/export/admins/marcin.jaworski/percona/Percona-Server-5.5.17-re
l22.1/regex -I/export/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1/zlib -o CMakeFiles/sql.dir/query_response_time.cc.o -c /export/admins/marcin.jaworski/percona/Percona-Server-
5.5.17-rel22.1/sql/query_response_time.cc
 make: Fatal error: Command failed for target `sql/CMakeFiles/sql.dir/query_response_time.cc.o'
 Current working directory /mnt/bpool/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1
 *** Error code 1
 The following command caused the error:
 make -f sql/CMakeFiles/sql.dir/build.make sql/CMakeFiles/sql.dir/build
 make: Fatal error: Command failed for target `sql/CMakeFiles/sql.dir/all'
 Current working directory /mnt/bpool/admins/marcin.jaworski/percona/Percona-Server-5.5.17-rel22.1
 *** Error code 1
 The following command caused the error:
 make -f CMakeFiles/Makefile2 all
 make: Fatal error: Command failed for target `all'

Marcin Jaworski (hemi-w)
description: updated
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

I have to disagree with the compiler diagnostics here. The define OVERALL_POWER_COUNT expands to
(((int)(3.32192809 * 6)) + 1 + ((int)(3.32192809 * 7)))
which seems to satisfy the C++ constant expression rules (see e.g. http://www.boost.org/development/int_const_guidelines.html)

Workaround: replace #define OVERALL_POWER_COUNT with
#define OVERALL_POWER_COUNT 43

Revision history for this message
Marcin Jaworski (hemi-w) wrote :

Thanks, it seems that it works correctly now.

Revision history for this message
Stewart Smith (stewart) wrote :

Seeing as we don't support Solaris currently and the problem seems to be fixed now, I'm marking as "Invalid" rather than "won't fix"

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1898

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.