Quantcast

sqlite3 3.17.0 fails to compile under OS X <= 10.10: use of unknown builtin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sqlite3 3.17.0 fails to compile under OS X <= 10.10: use of unknown builtin

Marius Schamschula
Hi all,

I’m the maintainer of sqlite3 for MacPorts. When I updated sqlite3 to version 3.17.0 on a machine running Sierra (10.12.3), everything went well. However, the next morning I woke up to the following ticket:

https://trac.macports.org/ticket/53568 <https://trac.macports.org/ticket/53568>

Upon further investigation, I found that sqlite3.c uses various workarounds, depending on the compiler version. Macs have defaulted to Apple’s clang since 10.6. However, Apple’s clang versions are not the same as LLVM’s.

What happens is that CLANG_VERSION is set incorrectly, and sqlite3.c fails to compile under OS X 10.10 and all versions using clang below. The fact that the latest version of Xcode (8.2.1 available for macOS 10.11 and 10.12) built sqlite3 3.17.0 correctly is just dumb luck. This build failure is a serious issue for MacPorts as it is a blocker for numerous other ports depend on sqlite3.

No surprisingly, my very old Leopard machine (10.5, using gcc-4.2) cleanly build sqlite 3.17.0.

Marius
--
Marius Schamschula



_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3 3.17.0 fails to compile under OS X <= 10.10: use of unknown builtin

Richard Hipp-3
On 2/15/17, Marius Schamschula <[hidden email]> wrote:

> Hi all,
>
> I’m the maintainer of sqlite3 for MacPorts. When I updated sqlite3 to
> version 3.17.0 on a machine running Sierra (10.12.3), everything went well.
> However, the next morning I woke up to the following ticket:
>
> https://trac.macports.org/ticket/53568
> <https://trac.macports.org/ticket/53568>
>
> Upon further investigation, I found that sqlite3.c uses various workarounds,
> depending on the compiler version. Macs have defaulted to Apple’s clang
> since 10.6. However, Apple’s clang versions are not the same as LLVM’s.
>
> What happens is that CLANG_VERSION is set incorrectly, and sqlite3.c fails
> to compile under OS X 10.10 and all versions using clang below. The fact
> that the latest version of Xcode (8.2.1 available for macOS 10.11 and 10.12)
> built sqlite3 3.17.0 correctly is just dumb luck. This build failure is a
> serious issue for MacPorts as it is a blocker for numerous other ports
> depend on sqlite3.

Your work-around is to compile with -DSQLITE_DISABLE_INTRINSIC.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...