Skip to content

Build errors on Fedora 23 / gcc 5.3.1 #25630

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

Closed
luan-cestari opened this issue Feb 1, 2016 · 6 comments
Closed

Build errors on Fedora 23 / gcc 5.3.1 #25630

luan-cestari opened this issue Feb 1, 2016 · 6 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@luan-cestari
Copy link

Hi guys,

I was building all the projects to play with flutter.io on my new computer and found some problems following this page https://github.com/dart-lang/sdk/wiki/Building . There was 2 different problems, one of them I had to change the C Flags to remove Werror and the other one, it seems to be missing a define in the beginning of socket_helper.c . Below are some outputs about the 2 problems:

./tools/build.py -m release -a x64
make -j 8 BUILDTYPE=ReleaseX64 all
...
runtime/third_party/double-conversion/src/bignum.cc: In member function ‘void double_conversion::Bignum::AssignDecimalString(double_conversion::Vector<const char>)’:
runtime/third_party/double-conversion/src/bignum.cc:102:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
 void Bignum::AssignDecimalString(Vector<const char> value) {
      ^
  CXX(host) out/ReleaseX64/obj.host/libdart_lib/runtime/lib/linked_hash_map.o
  CXX(host) out/ReleaseX64/obj.host/libdart_lib/runtime/lib/array.o
  CXX(host) out/ReleaseX64/obj.host/libdart_lib/runtime/lib/bool.o
  CXX(host) out/ReleaseX64/obj.host/libdart_lib/runtime/lib/date.o
cc1plus: all warnings being treated as errors
runtime/libdouble_conversion.target.mk:1676: recipe for target 'out/ReleaseX64/obj.target/libdouble_conversion/runtime/third_party/double-conversion/src/bignum.o' failed
make: *** [out/ReleaseX64/obj.target/libdouble_conversion/runtime/third_party/double-conversion/src/bignum.o] Error 1
make: *** Waiting for unfinished jobs....
BUILD FAILED

So I removed -Werror flag from:

runtime/libdouble_conversion.host.mk
runtime/libdouble_conversion.target.mk 

Then I found:

./tools/build.py -m release -a x64
make -j 8 BUILDTYPE=ReleaseX64 all
...
third_party/boringssl/src/crypto/bio/socket_helper.c: In function ‘bio_ip_and_port_to_socket_and_addr’:
third_party/boringssl/src/crypto/bio/socket_helper.c:42:19: error: storage size of ‘hint’ isn’t known
   struct : hint, *result, *cur;
                   ^
  CC(host) out/ReleaseX64/obj.host/boringssl/third_party/boringssl/src/crypto/bn/bn.o
third_party/boringssl/src/crypto/bio/socket_helper.c:60:36: error: dereferencing pointer to incomplete type ‘struct addrinfo’
   for (cur = result; cur; cur = cur->ai_next) {
                                    ^
  CC(host) out/ReleaseX64/obj.host/boringssl/third_party/boringssl/src/crypto/bn/asm/x86_64-gcc.o
third_party/boringssl/boringssl.host.mk:1900: recipe for target 'out/ReleaseX64/obj.host/boringssl/third_party/boringssl/src/crypto/bio/socket_helper.o' failed
make: *** [out/ReleaseX64/obj.host/boringssl/third_party/boringssl/src/crypto/bio/socket_helper.o] Error 1
make: *** Waiting for unfinished jobs....
BUILD FAILED

So I placed "#define _POSIX_C_SOURCE 200112L" after the line "#define _POSIX_SOURCE"

About the gcc used to compile:

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) 

Thanks

@luan-cestari
Copy link
Author

Just to mention, after the two workaround I made, I successfully built the whole Dart sdk in fedora 23

@rmacnak-google rmacnak-google added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Feb 1, 2016
@rmacnak-google
Copy link
Contributor

What version of gcc or clang were you using?

@luan-cestari
Copy link
Author

I'm using the latest version from fedora 23 ( 5.3.1 20151207 (Red Hat 5.3.1-2)).

rpm -qa gcc 
gcc-5.3.1-2.fc23.x86_64

Thanks for the help =D

@rmacnak-google rmacnak-google changed the title Problems to build Build errors on Fedora 23 / gcc 5.3.1 Feb 3, 2016
@rmacnak-google
Copy link
Contributor

libdoubleconversion fixed in e8a3292

@luan-cestari
Copy link
Author

Nice work :)

Em Ter, 2 de fev de 2016 23:45, Ryan Macnak [email protected]
escreveu:

libdoubleconversion fixed in e8a3292
e8a3292


Reply to this email directly or view it on GitHub
#25630 (comment).

@mraleph
Copy link
Member

mraleph commented Apr 24, 2018

I assume that this issue is stale and was already fixed.

@mraleph mraleph closed this as completed Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants