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
1=== modified file 'VERSION'
2--- VERSION 2013-01-17 20:09:45 +0000
3+++ VERSION 2013-04-02 17:36:42 +0000
4@@ -1,1 +1,1 @@
5-XTRABACKUP_VERSION=2.0.5
6+XTRABACKUP_VERSION=2.0.6
7
8=== modified file 'src/Makefile'
9--- src/Makefile 2013-03-12 05:59:29 +0000
10+++ src/Makefile 2013-04-02 17:36:42 +0000
11@@ -123,7 +123,7 @@
12
13 5.6: MYSQLOBJS = $(MYSQL_ROOT_DIR)/libmysqld/libmysqld.a
14 ifeq ($(shell uname -s),Linux)
15-5.6: LIBS += -laio -ldl -lcrypt
16+5.6: LIBS += -laio -ldl -lcrypt -lssl
17 endif
18 5.6: TARGET := xtrabackup_56
19 # In CMake server builds it is important to build with exactly the same preprocessor flags
20
21=== modified file 'utils/build-binary.sh'
22--- utils/build-binary.sh 2013-03-12 05:59:29 +0000
23+++ utils/build-binary.sh 2013-04-02 17:36:42 +0000
24@@ -85,7 +85,7 @@
25
26 # Compilation flags
27 export CC=${CC:-gcc}
28-export CXX=${CXX:-gcc}
29+export CXX=${CXX:-g++}
30 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer ${CFLAGS:-}"
31 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions ${CXXFLAGS:-}"
32 export MAKE_JFLAG=-j4
33@@ -136,17 +136,26 @@
34
35 cp -R test "$INSTALLDIR/share/percona-xtrabackup-test"
36
37- ) || false
38+ )
39+ exit_value=$?
40
41- $TAR czf "percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION.tar.gz" \
42- --owner=0 --group=0 -C "$INSTALLDIR/../" \
43- "percona-xtrabackup-$XTRABACKUP_VERSION"
44+ if test "x$exit_value" = "x0"
45+ then
46+ $TAR czf "percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION.tar.gz" \
47+ --owner=0 --group=0 -C "$INSTALLDIR/../" \
48+ "percona-xtrabackup-$XTRABACKUP_VERSION"
49+ fi
50
51 # Clean up build dir
52 rm -rf "percona-xtrabackup-$XTRABACKUP_VERSION"
53
54-) || false
55+ exit $exit_value
56+
57+)
58+exit_value=$?
59
60 # Clean up
61 rm -rf "$WORKDIR_ABS/$BASEINSTALLDIR"
62
63+exit $exit_value
64+
65
66=== modified file 'utils/build-dpkg.sh'
67--- utils/build-dpkg.sh 2012-12-05 19:57:24 +0000
68+++ utils/build-dpkg.sh 2013-04-02 17:36:42 +0000
69@@ -78,7 +78,7 @@
70
71 # Build information
72 export CC=${CC:-gcc}
73-export CXX=${CXX:-gcc}
74+export CXX=${CXX:-g++}
75 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer"
76 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions"
77 export MAKE_JFLAG=-j4
78
79=== modified file 'utils/build-rpm.sh'
80--- utils/build-rpm.sh 2012-03-19 16:49:12 +0000
81+++ utils/build-rpm.sh 2013-04-02 17:36:42 +0000
82@@ -109,7 +109,7 @@
83
84 # Compilation flags
85 export CC=${CC:-gcc}
86-export CXX=${CXX:-gcc}
87+export CXX=${CXX:-g++}
88 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer $TARGET_CFLAGS"
89 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions $TARGET_CFLAGS"
90 export MAKE_JFLAG=-j4
91
92=== modified file 'utils/xtrabackup.spec'
93--- utils/xtrabackup.spec 2013-03-19 12:33:57 +0000
94+++ utils/xtrabackup.spec 2013-04-02 17:36:42 +0000
95@@ -58,7 +58,7 @@
96 %build
97 set -ue
98 export CC=${CC-"gcc"}
99-export CXX=$CC
100+export CXX=${CXX-"g++"}
101 export CFLAGS="$CFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\""
102 export CXXFLAGS="$CXXFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\" -fno-exceptions"
103 AUTO_DOWNLOAD=yes ./utils/build.sh 5.1

Subscribers

People subscribed via source and target branches