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

Compiling the MyRocks project failed #207

Closed
mariadb-DanielLee opened this issue Mar 17, 2016 · 9 comments
Closed

Compiling the MyRocks project failed #207

mariadb-DanielLee opened this issue Mar 17, 2016 · 9 comments
Assignees

Comments

@mariadb-DanielLee
Copy link

myrocks@rocksdb:~/builds/mytest/mysql-5.6$ git show
commit d3054d2

end of the make command output
.
.
.
.
1043 [ 57%] Building CXX object libmysqld/CMakeFiles/sql_embedded.dir//sql/unireg.cc.o
1044 [ 57%] Building CXX object libmysqld/CMakeFiles/sql_embedded.dir/
/sql/sql_timer.cc.o
1045 Linking CXX static library libsql_embedded.a
1046 [ 57%] Built target sql_embedded
1047 make: *** [all] Error 2

myrocks@rocksdb:~/builds/mytest/log$ cat -n 5.make.log |grep error
27 [ 2%] [ 2%] Building C object regex/CMakeFiles/regex.dir/regerror.c.o
109 Building C object mysys/CMakeFiles/mysys.dir/errors.c.o
153 Building C object mysys/CMakeFiles/mysys.dir/my_error.c.o
308 [ 14%] Generating ../include/mysqld_error.h, ../sql/share/english/errmsg.sys
538 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb.h:599:40: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
544 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb_proto.h:49:62: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
547 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb_proto.h:53:62: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
550 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb_proto.h:57:62: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
567 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb.h:599:40: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
575 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb_proto.h:49:62: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
578 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb_proto.h:53:62: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
581 /home/myrocks/builds/mytest/mysql-5.6/storage/rocksdb/./ha_rocksdb_proto.h:57:62: error: ‘returns_nonnull’ attribute directive ignored [-Werror=attributes]
599 [ 28%] cc1plus: all warnings being treated as errors
616 cc1plus: all warnings being treated as errors
806 [ 41%] Building CXX object libmysqld/CMakeFiles/sql_embedded.dir//sql/error_stats.cc.o
816 [ 41%] Building CXX object libmysqld/CMakeFiles/sql_embedded.dir/
/sql/derror.cc.o
950 [ 50%] Building CXX object libmysqld/CMakeFiles/sql_embedded.dir//sql/sql_alloc_error_handler.cc.o
994 Building CXX object libmysqld/CMakeFiles/sql_embedded.dir/
/sql/sql_error.cc.o

@gunnarku
Copy link

Can you please follow the steps at https://github.com/facebook/mysql-5.6/wiki/Reporting-bugs-and-asking-for-help and add the relevant information about the OS which is being used, toolset version etc. This way we can do something actionable to investigate the issue.

@mariadb-DanielLee
Copy link
Author

myrocks@rocksdb:~/builds/mytest/log$ uname -a
Linux rocksdb 3.13.0-83-generic #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

myrocks@rocksdb:~/builds/mytest/log$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty

Commands used to make the project:

echo date 1/5 git clone ...... 1.gitclone.log
git clone https://github.com/facebook/mysql-5.6.git > ./log/1.gitclone.log 2>&1
cd mysql-5.6
echo date 2/5 git init ....... 2.gitinit.log
git submodule init > ../log/2.gitinit.log 2>&1
echo date 3/5 git update ..... 3.gitupdate.log
git submodule update > ../log/3.gitupdate.log 2>&1
echo date 4/5 cmake .......... 4.cmake.log
cmake . -DCMAKE_BUILD_TYPE=Debug -DWITH_SSL:STRING=system -DWITH_ZLIB:STRING=system -DMYSQL_MAINTAINER_MODE=1 > ../log/4.cmake.log 2>&1
echo date 5/5 make ........... 5.make.log
make -j8 > ../log/5.make.log 2>&1
echo date Done

These commands were extracted from a .sh script. They were working fine last week.

@gunnarku
Copy link

What is the version of the toolset you're using and what is it (Clang, GCC)? For example:

gcc --version
g++ --version

@mariadb-DanielLee
Copy link
Author

myrocks@rocksdb:/builds/mytest/log$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1
14.04.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

myrocks@rocksdb:/builds/mytest/log$ g++ --version
g++ (Ubuntu 4.8.4-2ubuntu1
14.04.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@gunnarku
Copy link

Thank you for detailed information, gcc 4.8.x doesn't implement a support for returns_nonnull. Take a look at https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html vs. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Function-Attributes.html.

Good way to fix this issue is to update the compiler toolset to at least gcc 4.9.2.

Most likely this won't be the first or last change which will rely on the enhanced error detection in the newer versions of GCC.

@gunnarku
Copy link

Quick alternative is also to remove all the four instances of __returns_nonnull__ from the source code temporarily. This will unblock you as well.

HTH

gunnarku pushed a commit that referenced this issue Mar 17, 2016
…ith gcc 4.8.x again

Summary:
The issue was exposed by #207. The root cause is the fact that gcc 4.8.x doesn't implement a support for `returns_nonnull`. Take a look at https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html vs. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Function-Attributes.html.

For last couple of months we've been operating under the assumption that gcc 4.9.x is the lowest supported platform. We need to go back and internally either revisit this decision or be very explicit about our dependency requirements.

Test Plan:
Optimistic fix, needs to be really verified on the system running gcc 4.8.x.

```
mysqlbuild.sh
```

Reviewers: yoshinorim, MarkCallaghan

Reviewed By: MarkCallaghan

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D55641
@gunnarku
Copy link

Attributes breaking build with gcc 4.8.x removed. Please try git pull --rebase and see if the new changes will fix the issues. If the break will still be present then please re-open the issue.

@mariadb-DanielLee
Copy link
Author

myrocks@rocksdb:~/builds/reptest/mysql-5.6$ git show
commit d3054d2
Author: Peng Tian pengt@fb.com
Date: Mon Feb 15 10:09:36 2016 -0800

Compiled successfully after upgrading gcc to 4.9.3

@gunnarku
Copy link

Thank you for validating!

george-lorch pushed a commit to george-lorch/percona-server that referenced this issue May 7, 2016
…ith gcc 4.8.x again

Summary:
The issue was exposed by facebook/mysql-5.6#207. The root cause is the fact that gcc 4.8.x doesn't implement a support for `returns_nonnull`. Take a look at https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html vs. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Function-Attributes.html.

For last couple of months we've been operating under the assumption that gcc 4.9.x is the lowest supported platform. We need to go back and internally either revisit this decision or be very explicit about our dependency requirements.

Test Plan:
Optimistic fix, needs to be really verified on the system running gcc 4.8.x.

```
mysqlbuild.sh
```

Reviewers: yoshinorim, MarkCallaghan

Reviewed By: MarkCallaghan

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D55641
george-lorch pushed a commit to george-lorch/percona-server that referenced this issue May 9, 2016
…ith gcc 4.8.x again

Summary:
The issue was exposed by facebook/mysql-5.6#207. The root cause is the fact that gcc 4.8.x doesn't implement a support for `returns_nonnull`. Take a look at https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html vs. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Function-Attributes.html.

For last couple of months we've been operating under the assumption that gcc 4.9.x is the lowest supported platform. We need to go back and internally either revisit this decision or be very explicit about our dependency requirements.

Test Plan:
Optimistic fix, needs to be really verified on the system running gcc 4.8.x.

```
mysqlbuild.sh
```

Reviewers: yoshinorim, MarkCallaghan

Reviewed By: MarkCallaghan

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D55641
VitaliyLi pushed a commit to VitaliyLi/mysql-5.6 that referenced this issue Feb 9, 2017
…ith gcc 4.8.x again

Summary:
The issue was exposed by facebook#207. The root cause is the fact that gcc 4.8.x doesn't implement a support for `returns_nonnull`. Take a look at https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html vs. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Function-Attributes.html.

For last couple of months we've been operating under the assumption that gcc 4.9.x is the lowest supported platform. We need to go back and internally either revisit this decision or be very explicit about our dependency requirements.

Test Plan:
Optimistic fix, needs to be really verified on the system running gcc 4.8.x.

```
mysqlbuild.sh
```

Reviewers: yoshinorim, MarkCallaghan

Reviewed By: MarkCallaghan

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D55641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants