Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build mimic-dev1 with gcc 7 #19548

Merged
merged 15 commits into from Dec 16, 2017
Merged

build mimic-dev1 with gcc 7 #19548

merged 15 commits into from Dec 16, 2017

Conversation

tchaikov
Copy link
Contributor

backport the GCC-7 related commits to mimic-dev1 in bulk.

otherwise -Werror=implicit-fallthrough will fail the build with GCC-7

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 6559a85)
ready them for gcc7 and libstdc++-7 for better performance.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f9aa49c)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit eccc961)
* always install gcc-7 on trusty
* point g++ to g++-7 if not yet

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 24d0f93)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 84660c9)
please note, run-make-check.sh sources install-deps.sh here to import
the $PATH and other environmental variables, which could be changed by
the the DTS "enable" script.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 3f8647a)
the DTS-6 is only available in the testing repo

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 4cedada)
* should install software-properties-common beforehand, otherwise
  the `add-apt-repository` command will not be available.
* the update-alternative commandline were copied from ceph-build,
  should remove the escape characters.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 3882dea)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 8a09359)
* add ubuntu-toolchain-r mirrors in case the ppa.launchpad.net is not
  accessible
* add ppa repo manually, it's faster than installing
  `software-properties-common` and then launch `add-apt-repository`
* hardwire $old to the gcc version shipped by the distro, simpler this
  way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b69e3ef)
because the stdout redirect is performed by current shell not `$SUDO
cat`, so $SUDO does not help here. use `$SUDO tee` instead, which is
able to read the stdin and write to the given file just as expected.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 0beb846)
to link libceph-common with libstdc++ if it is enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 4c2216d)
so they can have access to libstdc++ if it is linked statically.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit e6695bb)
* as global-static references symbols offered by common.
* and remove DPDK_LIBRARIES from global, as it is libcommon which
  is using DPDK.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a2cad3b)
this matches the linkage of libceph-common, because valgrind reports
Leak_StillReachable if daemons are linked against libceph-common, will
link daemons against common instead, and let common link libstdc++
statically, if WITH_STATIC_LIBSTDCXX=ON.

this change also reverts e6695bb

Fixes: http://tracker.ceph.com/issues/22438
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit df9a598)
@tchaikov
Copy link
Contributor Author

tchaikov commented Dec 15, 2017

without this change, among which, 4ddd6b5, the mimic-dev1 build fails like

/home/jenkins-build/build/workspace/ceph-pull-requests/src/rocksdb/db/log_reader.cc: In member function ‘bool rocksdb::log::Reader::ReadRecord(rocksdb::Slice*, std::__cxx11::string*, rocksdb::WALRecoveryMode)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rocksdb/db/log_reader.cc:150:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (wal_recovery_mode == WALRecoveryMode::kAbsoluteConsistency) {
         ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rocksdb/db/log_reader.cc:156:7: note: here
       case kEof:
       ^~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rocksdb/db/log_reader.cc:170:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (wal_recovery_mode != WALRecoveryMode::kSkipAnyCorruptedRecords) {
         ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rocksdb/db/log_reader.cc:186:7: note: here
       case kBadRecord:
       ^~~~
cc1plus: all warnings being treated as errors

see https://jenkins.ceph.com/job/ceph-pull-requests/38248/consoleFull#-20636943662a811ea2-3e7b-466b-84b4-d13df7e35809 (#19544)

@liewegas
Copy link
Member

@tchaikov
Copy link
Contributor Author

tchaikov commented Dec 16, 2017

@liewegas these are two different jenkins jobs for building ceph,

  • the "make check" job: it builds pull requests on ceph/ceph, and it uses run-make-check.sh to do this job, install-deps.sh is used by this script to ready the building env. if install-deps.sh fails to do so, the build job fails. currently, the xenial building slaves does not necessarily have gcc-7 installed or have its /usr/bin/gcc pointed to /usr/bin/gcc-7, so we need to ensure this.
  • the "package-and-send-them-to-chacra" job: it builds ceph/ceph-ci branches. the link you posted in the above comment falls into this category.

@liewegas liewegas merged commit 886af91 into ceph:mimic-dev1 Dec 16, 2017
@tchaikov tchaikov deleted the mimic-gcc-7 branch December 16, 2017 17:07
xiexingguo pushed a commit to ceph/ceph-ci that referenced this pull request Jan 17, 2018
    ceph/ceph#19548

cmake: check gcc version not release date for libstdc++ saneness
cmake: bail out if GCC version is less than 5.1

    ceph/ceph#18938
    ceph/ceph#19344

build/ops: use devtoolset-7 on centos/rhel-7
ceph.spec: use devtoolset-6-gcc-c++ on aarch64

    ceph/ceph#18863
    ceph/ceph#19341

install-deps: use DTS-7 on aarch64 and only download mirrored package indexes

    ceph/ceph#19645

Signed-off-by: luo.runbing <luo.runbing@zte.com.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants