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 on ARMv7 (hardfloat) fails - galera-25.3.5-src #236

Closed
ghost opened this issue Feb 20, 2015 · 6 comments
Closed

Build on ARMv7 (hardfloat) fails - galera-25.3.5-src #236

ghost opened this issue Feb 20, 2015 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented Feb 20, 2015

My env:

  • OS Linux (ArmArchLinux)
  • Kernel: Linux r1 3.4.104+ Messages sent by replicator layer in one configuration may be delivered in another #1 SMP PREEMPT Thu Jan 8 15:40:40 CET 2015 armv7l GNU/Linux
  • gcc
    gcc (GCC) 4.9.2 20141224 (prerelease)
    Copyright (C) 2014 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.
  • scons
    SCons by Steven Knight et al.:
    script: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
    engine: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
    engine path: ['/usr/lib/python2.7/site-packages/SCons']
    Copyright (c) 2001 - 2014 The SCons Foundation

First error:
[code]
gcc -o galerautils/src/gu_fifo.os -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -pedantic -fPIC -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -Werror -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_fifo.c
In file included from /usr/include/stdio.h:27:0,
from galerautils/src/gu_fifo.c:18:
/usr/include/features.h:148:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]

warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

^
cc1: all warnings being treated as errors
scons: *** [galerautils/src/gu_fifo.os] Error 1
scons: building terminated because of errors.
[.code]
Fixing it by hand (by editing gu_fifo.c and changing th line #define BSD_SOURCE to #define DEFAULT_SOURCE) makes another error:
[code]
gcc -o galerautils/src/gu_rand.os -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -pedantic -fPIC -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -Werror -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_rand.c
In file included from galerautils/src/gu_hash.h:30:0,
from galerautils/src/gu_rand.c:15:
galerautils/src/gu_rand.c: In function 'gu_rand_seed_long':
galerautils/src/gu_mmh3.h:198:21: error: '
((void *)&rse+23)' is used uninitialized in this function [-Werror=uninitialized]
case 8: k1 ^= ((uint64_t)tail[ 7]) << 56;
^
galerautils/src/gu_rand.c:32:14: note: '
((void )&rse+23)' was declared here
gu_rse_t rse = { time, heap_ptr, &time, pid };
^
In file included from galerautils/src/gu_hash.h:30:0,
from galerautils/src/gu_rand.c:15:
galerautils/src/gu_mmh3.h:199:21: error: '
((void )&rse+22)' is used uninitialized in this function [-Werror=uninitialized]
case 7: k1 ^= ((uint64_t)tail[ 6]) << 48;
^
galerautils/src/gu_rand.c:32:14: note: '
((void )&rse+22)' was declared here
gu_rse_t rse = { time, heap_ptr, &time, pid };
^
In file included from galerautils/src/gu_hash.h:30:0,
from galerautils/src/gu_rand.c:15:
galerautils/src/gu_mmh3.h:200:21: error: '
((void )&rse+21)' is used uninitialized in this function [-Werror=uninitialized]
case 6: k1 ^= ((uint64_t)tail[ 5]) << 40;
^
galerautils/src/gu_rand.c:32:14: note: '
((void )&rse+21)' was declared here
gu_rse_t rse = { time, heap_ptr, &time, pid };
^
In file included from galerautils/src/gu_hash.h:30:0,
from galerautils/src/gu_rand.c:15:
galerautils/src/gu_mmh3.h:201:21: error: '
((void )&rse+20)' is used uninitialized in this function [-Werror=uninitialized]
case 5: k1 ^= ((uint64_t)tail[ 4]) << 32;
^
galerautils/src/gu_rand.c:32:14: note: '
((void )&rse+20)' was declared here
gu_rse_t rse = { time, heap_ptr, &time, pid };
^
cc1: all warnings being treated as errors
scons: *
* [galerautils/src/gu_rand.os] Error 1
scons: building terminated because of errors.
[/code]

How to reproduce:

  • download sources
  • untar and cd to sources dir
  • invoke scons
@Esysteme
Copy link

this is worked for me :

gcc -o galerautils/src/gu_fifo.os -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -pedantic -fPIC -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -Werror -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_fifo.c

on ARM v7 (tested on BananaPi)

my problem is :

[Node1][06:36]root@bananapi:~/galera$ scons
scons: Reading SConscript files ...
Host: linux armv7l 32bit
Signature: version: 3.10, revision: XXXX
Checking for C library pthread... no
Error: pthread library not found

@ghost
Copy link
Author

ghost commented Sep 10, 2015

Did you tried to install pthread library ?

@ghost
Copy link
Author

ghost commented Sep 10, 2015

BTW - on gentoo everything works like a charm ;)

@Esysteme
Copy link

seem problem with :

in config.log :
/usr/bin/ld: unrecognised emulation mode: elf_i386
Supported emulations: armelf_linux_eabi armelfb_linux_eabi
collect2: error: ld returned 1 exit status
scons: Configure: no

@Esysteme
Copy link

first error i got :

file /root/galera/SConstruct,line 223:
        Configure(confdir = .sconf_temp)
scons: Configure: Checking for C library pthread...
.sconf_temp/conftest_0.c <-
  |
  |
  |
  |int
  |main() {
  |
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_0.o -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -m32 -march=i686 -Wall -Wextra -Wno-unused-parameter -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H .sconf_temp/conftest_0.c
gcc: error: unrecognized argument in option '-march=i686'
gcc: note: valid arguments to '-march=' are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native
gcc: error: unrecognized command line option '-m32'
scons: Configure: no

@ayurchen
Copy link
Member

Seems to be fixed at least in f3e626d

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