Merge lp:~percona-core/percona-xtrabackup/release-2.0.6 into lp:percona-xtrabackup/2.0

Proposed by Ignacio Nin
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 527
Proposed branch: lp:~percona-core/percona-xtrabackup/release-2.0.6
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 103 lines (+20/-11)
6 files modified
VERSION (+1/-1)
src/Makefile (+1/-1)
utils/build-binary.sh (+15/-6)
utils/build-dpkg.sh (+1/-1)
utils/build-rpm.sh (+1/-1)
utils/xtrabackup.spec (+1/-1)
To merge this branch: bzr merge lp:~percona-core/percona-xtrabackup/release-2.0.6
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Alexey Kopytov Pending
Review via email: mp+156646@code.launchpad.net

This proposal supersedes a proposal from 2013-03-20.

Description of the change

Resubmitting the proposal with the changes required for fixing the binary issues, and also using g++ now as default C++ compiler for all versions of Percona Server.

These changes are built on top of the changes for release 2.0.6 since it's already been released.

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Are there any specific reasons to not just use "CXX=${CXX:-g++}" instead of introducing CXX_56?

review: Needs Information
Revision history for this message
Ignacio Nin (ignacio-nin) wrote : Posted in a previous version of this proposal

> Are there any specific reasons to not just use "CXX=${CXX:-g++}" instead of
> introducing CXX_56?

PS 5.1 and 5.5 are compiled with gcc by default, so CXX gets exported to CXX=gcc by default. However, 5.6 won't build with CXX=gcc so we need to default to CXX=g++ for it. I created CXX_56 so we can specifically override CXX for 5.6 separately from 5.5 and 5.1.

For example in CentOS 5 we want to compile 5.1 and 5.5 with CXX=gcc44, but 5.6 with CXX=g++44.

Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Hi Ignacio,

On Thu, 21 Mar 2013 21:43:20 -0000, Ignacio Nin wrote:
>> Are there any specific reasons to not just use "CXX=${CXX:-g++}" instead of
>> introducing CXX_56?
>
> PS 5.1 and 5.5 are compiled with gcc by default, so CXX gets exported to CXX=gcc by default. However, 5.6 won't build with CXX=gcc so we need to default to CXX=g++ for it. I created CXX_56 so we can specifically override CXX for 5.6 separately from 5.5 and 5.1.
>

Are you saying that PS 5.1/5.5 will *not* compile with CXX=g++? As in,
what exactly is wrong with CXX=g++? I use it locally to build XB and
don't have any issues.

Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

It is in fact the reason for bug #1158948.

Our packaging scripts define CXX=gcc for some obscure reason. This worked for server versions < 5.6, but 5.6 doesn't build with CXX=gcc, it requires CXX=g++ (or just not overriding CXX, in which case CMake would use g++ anyway).

Now what the changes in release-2.0.6 do is that instead of changing CXX to g++ they introduce this CXX_56=g++ thing. But only in build-dpkg.sh and build-rpm.sh, not in build-binary.sh. And that's why innodb56 build fails when run from build-binary.sh. One would expect that build-binary.sh would fail in such a case. But we also have the code in build-binary.sh to suppress all build failures with the "( ... ) || false" construct. So build-binary.sh fails to build innodb56, but completes successfully.

Here's what I suggest we do:

- remove CXX_56, replace it with "CXX=g++" in all build-*.sh scripts
- remove that construct to suppress build failures

review: Needs Fixing
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'VERSION'
--- VERSION 2013-01-17 20:09:45 +0000
+++ VERSION 2013-04-02 17:36:42 +0000
@@ -1,1 +1,1 @@
1XTRABACKUP_VERSION=2.0.51XTRABACKUP_VERSION=2.0.6
22
=== modified file 'src/Makefile'
--- src/Makefile 2013-03-12 05:59:29 +0000
+++ src/Makefile 2013-04-02 17:36:42 +0000
@@ -123,7 +123,7 @@
123123
1245.6: MYSQLOBJS = $(MYSQL_ROOT_DIR)/libmysqld/libmysqld.a1245.6: MYSQLOBJS = $(MYSQL_ROOT_DIR)/libmysqld/libmysqld.a
125ifeq ($(shell uname -s),Linux)125ifeq ($(shell uname -s),Linux)
1265.6: LIBS += -laio -ldl -lcrypt1265.6: LIBS += -laio -ldl -lcrypt -lssl
127endif127endif
1285.6: TARGET := xtrabackup_561285.6: TARGET := xtrabackup_56
129# In CMake server builds it is important to build with exactly the same preprocessor flags129# In CMake server builds it is important to build with exactly the same preprocessor flags
130130
=== modified file 'utils/build-binary.sh'
--- utils/build-binary.sh 2013-03-12 05:59:29 +0000
+++ utils/build-binary.sh 2013-04-02 17:36:42 +0000
@@ -85,7 +85,7 @@
8585
86# Compilation flags86# Compilation flags
87export CC=${CC:-gcc}87export CC=${CC:-gcc}
88export CXX=${CXX:-gcc}88export CXX=${CXX:-g++}
89export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer ${CFLAGS:-}"89export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer ${CFLAGS:-}"
90export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions ${CXXFLAGS:-}"90export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions ${CXXFLAGS:-}"
91export MAKE_JFLAG=-j491export MAKE_JFLAG=-j4
@@ -136,17 +136,26 @@
136136
137 cp -R test "$INSTALLDIR/share/percona-xtrabackup-test"137 cp -R test "$INSTALLDIR/share/percona-xtrabackup-test"
138138
139 ) || false139 )
140 exit_value=$?
140141
141 $TAR czf "percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION.tar.gz" \142 if test "x$exit_value" = "x0"
142 --owner=0 --group=0 -C "$INSTALLDIR/../" \143 then
143 "percona-xtrabackup-$XTRABACKUP_VERSION"144 $TAR czf "percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION.tar.gz" \
145 --owner=0 --group=0 -C "$INSTALLDIR/../" \
146 "percona-xtrabackup-$XTRABACKUP_VERSION"
147 fi
144148
145 # Clean up build dir149 # Clean up build dir
146 rm -rf "percona-xtrabackup-$XTRABACKUP_VERSION"150 rm -rf "percona-xtrabackup-$XTRABACKUP_VERSION"
147 151
148) || false152 exit $exit_value
153
154)
155exit_value=$?
149156
150# Clean up157# Clean up
151rm -rf "$WORKDIR_ABS/$BASEINSTALLDIR"158rm -rf "$WORKDIR_ABS/$BASEINSTALLDIR"
152159
160exit $exit_value
161
153162
=== modified file 'utils/build-dpkg.sh'
--- utils/build-dpkg.sh 2012-12-05 19:57:24 +0000
+++ utils/build-dpkg.sh 2013-04-02 17:36:42 +0000
@@ -78,7 +78,7 @@
7878
79# Build information79# Build information
80export CC=${CC:-gcc}80export CC=${CC:-gcc}
81export CXX=${CXX:-gcc}81export CXX=${CXX:-g++}
82export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer"82export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer"
83export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions"83export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions"
84export MAKE_JFLAG=-j484export MAKE_JFLAG=-j4
8585
=== modified file 'utils/build-rpm.sh'
--- utils/build-rpm.sh 2012-03-19 16:49:12 +0000
+++ utils/build-rpm.sh 2013-04-02 17:36:42 +0000
@@ -109,7 +109,7 @@
109109
110# Compilation flags110# Compilation flags
111export CC=${CC:-gcc}111export CC=${CC:-gcc}
112export CXX=${CXX:-gcc}112export CXX=${CXX:-g++}
113export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer $TARGET_CFLAGS"113export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer $TARGET_CFLAGS"
114export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions $TARGET_CFLAGS"114export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions $TARGET_CFLAGS"
115export MAKE_JFLAG=-j4115export MAKE_JFLAG=-j4
116116
=== modified file 'utils/xtrabackup.spec'
--- utils/xtrabackup.spec 2013-03-19 12:33:57 +0000
+++ utils/xtrabackup.spec 2013-04-02 17:36:42 +0000
@@ -58,7 +58,7 @@
58%build58%build
59set -ue59set -ue
60export CC=${CC-"gcc"}60export CC=${CC-"gcc"}
61export CXX=$CC61export CXX=${CXX-"g++"}
62export CFLAGS="$CFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\"" 62export CFLAGS="$CFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\""
63export CXXFLAGS="$CXXFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\" -fno-exceptions" 63export CXXFLAGS="$CXXFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\" -fno-exceptions"
64AUTO_DOWNLOAD=yes ./utils/build.sh 5.164AUTO_DOWNLOAD=yes ./utils/build.sh 5.1

Subscribers

People subscribed via source and target branches