Skip to content

Commit

Permalink
sqlite3: Fix build failure by using a newer compiler
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
  • Loading branch information
jeremyhu committed Feb 14, 2017
1 parent 2bc5a8b commit bcc939f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions databases/sqlite3/Portfile
@@ -1,6 +1,7 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0

name sqlite3
version 3.17.0
Expand Down Expand Up @@ -32,6 +33,9 @@ checksums rmd160 c198f8c3f91894ba017b7e71a9d6e5c31a9ef12c \
depends_lib port:libedit \
port:ncurses

# clang-602.0.53 fails due to usage of __builtin_add_overflow
compiler.blacklist *gcc-4.2 { clang < 700 }

configure.args --enable-threadsafe \
--enable-dynamic-extensions \
--disable-readline \
Expand Down

5 comments on commit bcc939f

@Schamschula
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually Apple-gcc-4.2 on Leopard works just fine.

@pulento
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fails on clang 700 on MacOS 10.10.5 also with the same builtins warnings:

juanjo@mbp:~/tmp$ sudo port install sqlite3
--->  Computing dependencies for sqlite3
--->  Building sqlite3
Error: Failed to build sqlite3: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_sqlite3/sqlite3/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port sqlite3 failed

juanjo@mbp:~/tmp$ clang -v
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

:info:build sqlite3.c:28836:10: error: use of unknown builtin '__builtin_add_overflow' [-Wimplicit-function-declaration]
:info:build   return __builtin_add_overflow(*pA, iB, pA);
:info:build          ^
:info:build sqlite3.c:28856:10: error: use of unknown builtin '__builtin_sub_overflow' [-Wimplicit-function-declaration]
:info:build   return __builtin_sub_overflow(*pA, iB, pA);
:info:build          ^
:info:build sqlite3.c:28856:10: note: did you mean '__builtin_add_overflow'?
:info:build sqlite3.c:28836:10: note: '__builtin_add_overflow' declared here
:info:build   return __builtin_add_overflow(*pA, iB, pA);
:info:build          ^
:info:build sqlite3.c:28871:10: error: use of unknown builtin '__builtin_mul_overflow' [-Wimplicit-function-declaration]
:info:build   return __builtin_mul_overflow(*pA, iB, pA);
:info:build          ^
:info:build sqlite3.c:28871:10: note: did you mean '__builtin_sub_overflow'?
:info:build sqlite3.c:28856:10: note: '__builtin_sub_overflow' declared here
:info:build   return __builtin_sub_overflow(*pA, iB, pA);
:info:build          ^

@Schamschula
Copy link
Contributor

@Schamschula Schamschula commented on bcc939f Feb 15, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pulento
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

BTW Code is maintained on GitHub but bug reports are on Trac ?

@Schamschula
Copy link
Contributor

@Schamschula Schamschula commented on bcc939f Feb 15, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.