Bug #77992 Cannot Compile for ARMv7 processor
Submitted: 8 Aug 2015 9:25 Modified: 8 Nov 2015 8:18
Reporter: haidar marie Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:7.4.7 OS:Ubuntu (14.04 Arm)
Assigned to: Assigned Account CPU Architecture:Any
Tags: armhf, compile, raspberry pi 2, ubuntu 14.04

[8 Aug 2015 9:25] haidar marie
Description:
I try to comipile from source mysql-cluster-gpl-7.4.7.tar.gz
on my Raspberry Pi 2  with ARMv7 Processor rev 5 (v7l) with 1GB RAM

I've tried to compile from source mysql-cluster-gpl-7.3.0.tar.gz
and using patch  http://bugs.mysql.com/file.php?id=17637

and success can run smoothly and normal

But i want to try the latest Mysql Cluster technology version 7.4.7 the latest one

Could you provide me a patch so i can work with raspberry pi 2

How to repeat:
here's my error :
[ 33%] Built target GenServerSource
[ 33%] Building CXX object storage/ndb/src/common/portlib/CMakeFiles/ndbportlib.dir/ndb_socket.cpp.o
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket.h:24:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:20:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h: In function ‘int my_socket_get_port(ndb_socket_t, short unsigned int*)’:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h:141:62: error: invalid conversion from ‘int*’ to ‘socklen_t* {aka unsigned int*}’ [-fpermissive]
   if(getsockname(s.fd, (struct sockaddr*)&servaddr, &sock_len) < 0) {
                                                              ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/include/my_global.h:521:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:18:
/usr/include/arm-linux-gnueabihf/sys/socket.h:127:12: error:   initializing argument 3 of ‘int getsockname(int, sockaddr*, socklen_t*)’ [-fpermissive]
 extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
            ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket.h:24:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:20:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h: In function ‘ndb_socket_t my_accept(ndb_socket_t, sockaddr*, int*)’:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h:159:35: error: invalid conversion from ‘int*’ to ‘socklen_t* {aka unsigned int*}’ [-fpermissive]
   r.fd= accept(s.fd, addr, addrlen);
                                   ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/include/my_global.h:521:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:18:
/usr/include/arm-linux-gnueabihf/sys/socket.h:243:12: error:   initializing argument 3 of ‘int accept(int, sockaddr*, socklen_t*)’ [-fpermissive]
 extern int accept (int __fd, __SOCKADDR_ARG __addr,
            ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket.h:24:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:20:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h: In function ‘int my_getsockopt(ndb_socket_t, int, int, void*, int*)’:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h:173:57: error: invalid conversion from ‘int*’ to ‘socklen_t* {aka unsigned int*}’ [-fpermissive]
   return getsockopt(s.fd, level, optname, optval, optlen);
                                                         ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/include/my_global.h:521:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:18:
/usr/include/arm-linux-gnueabihf/sys/socket.h:219:12: error:   initializing argument 5 of ‘int getsockopt(int, int, int, void*, socklen_t*)’ [-fpermissive]
 extern int getsockopt (int __fd, int __level, int __optname,
            ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket.h:24:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:20:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h: In function ‘int my_socket_connect_address(ndb_socket_t, in_addr*)’:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h:187:57: error: invalid conversion from ‘int*’ to ‘socklen_t* {aka unsigned int*}’ [-fpermissive]
   if(getpeername(s.fd, (struct sockaddr*)&addr, &addrlen))
                                                         ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/include/my_global.h:521:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:18:
/usr/include/arm-linux-gnueabihf/sys/socket.h:141:12: error:   initializing argument 3 of ‘int getpeername(int, sockaddr*, socklen_t*)’ [-fpermissive]
 extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
            ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket.h:24:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:20:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h: In function ‘int my_getpeername(ndb_socket_t, sockaddr*, int*)’:
/home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/include/portlib/ndb_socket_posix.h:196:34: error: invalid conversion from ‘int*’ to ‘socklen_t* {aka unsigned int*}’ [-fpermissive]
   if(getpeername(s.fd, a, addrlen))
                                  ^
In file included from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/include/my_global.h:521:0,
                 from /home/ubuntu/Downloads/mysql-cluster-gpl-7.4.7/storage/ndb/src/common/portlib/ndb_socket.cpp:18:
/usr/include/arm-linux-gnueabihf/sys/socket.h:141:12: error:   initializing argument 3 of ‘int getpeername(int, sockaddr*, socklen_t*)’ [-fpermissive]
 extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
            ^
make[2]: *** [storage/ndb/src/common/portlib/CMakeFiles/ndbportlib.dir/ndb_socket.cpp.o] Error 1
make[1]: *** [storage/ndb/src/common/portlib/CMakeFiles/ndbportlib.dir/all] Error 2
make: *** [all] Error 2

Suggested fix:
do i need add some parameters in cmake ?
[8 Aug 2015 9:36] haidar marie
add tags raspberry pi 2
[8 Oct 2015 8:18] Gustaf Thorslund
Hi Haidar,

The patch you applied origin from bug #62769, that was fixed in MySQL Server 5.6.13. MySQL Cluster 7.4.7 that you are trying to build is based on MySQL Server 5.6.26. I've just tried to build 7.4.7 without patching it first (RPi2 on Ubuntu 14.04). It seems more successful than your build, but then I hit bug #75975.

We should probably close this bug and focus on bug #75975. Do you agree?

/Gustaf
[9 Nov 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".