Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-17 Thread Bob Friesenhahn

On Wed, 16 Aug 2017, Richard Hipp wrote:


On 8/16/17, Simon Slavin  wrote:


I worked at a university and we used network home directories.



Why use the local disk when you can instead use a network filesystem
that is less reliable and about 100x slower?



It is not necessarily the case that a network filesystem is less 
reliable or 100x slower.  The server may have much better storage 
reliability (RAID) and performance characteristics (faster storage 
devices and more much more RAM) and accessing server-based storage may 
actually have much better latency than local disk on a typical 
computer.  Files on the server are more readily backed up than files 
distributed across many hosts.


I did use NFS for accessing user files while I had an Apple OS X 
system in active use here.  The OS X NFS seemed to be slower than 
normal compared to the NFS provided by other operating systems.


I am still using NFS mounted home directories across all systems here 
(since 1993).  No significant problems have been encountered during 
that time.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread jose isaias cabrera


Simon Slavin wrote...


to cater for the lowest level of geekery.


I think that is the first time I have seen this statement... :-)  I know a 
few folks with that description.


josé 


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Simon Slavin
On 17 Aug 2017, at 1:04am, Richard Hipp  wrote:

> On 8/16/17, Simon Slavin  wrote:
> 
>> I worked at a university and we used network home directories.
> 
> 
> Why use the local disk when you can instead use a network filesystem
> that is less reliable and about 100x slower?
> 

Because our students can’t use local disk.  They may use any of over 700 
computers on campus, maintained by different departments.  And they expect 
their files to appear magically wherever they sit down.  Also, they expect 
their files to get backed up.

It isn’t really a problem for the students who were clever with computers.  But 
once you have computers which can be used by any student in the university you 
have to cater for the lowest level of geekery.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Jens Alfke

> On Aug 16, 2017, at 5:04 PM, Richard Hipp  wrote:
> 
> 
> Why use the local disk when you can instead use a network filesystem
> that is less reliable and about 100x slower?
> 

That was pretty much my conclusion! After I realized that most of the OS's 
sluggishness was attributable to filesystem latency, I switched to a local home 
directory sometime in 2001. But a lot of Apple engineers found it useful to log 
into their account from any computer, and to have their home directory 
unaffected by erasing disks and reinstalling operating systems, which happens 
several times a week during OS development.

—Jens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Richard Hipp
On 8/16/17, Simon Slavin  wrote:
>
> I worked at a university and we used network home directories.


Why use the local disk when you can instead use a network filesystem
that is less reliable and about 100x slower?


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Simon Slavin


On 17 Aug 2017, at 12:55am, Jens Alfke  wrote:

> I’ve never seen network home directories in the wild, but I believe it may be 
> used in educational settings for centralized administration.

I worked at a university and we used network home directories.  But they 
weren’t done using NFS.  We used SMB or CIF or AFP depending on which part of 
the university ran the servers.  Our techies didn’t like NFS.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Richard Hipp
On 8/16/17, Jens Alfke  wrote:
>  So may I request taking out this #warn directive?
>

You can probably make the warning go away if you compile with
-DSQLITE_ENABLE_LOCKING_STYLE=0

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Jens Alfke

> On Aug 16, 2017, at 1:42 PM, Richard Hipp  wrote:
> 
> The proxy-locking VFS is important for OS-X, we are
> told, because many applications store SQLite databases in the user's
> home directory, and many OS-X users like to have their home
> directories NSF-mounted.

It was certainly the case that a lot of *Apple engineers* used NFS-mounted home 
directories, at least in the early days of Mac OS X. (I was an engineer at 
Apple at the time.) This made any problems with that configuration very 
prominent when testing the OS. I’ve never seen network home directories in the 
wild, but I believe it may be used in educational settings for centralized 
administration.

Anyway, it’s very unlikely that any *iOS* apps are accessing SQLite databases 
over NFS, considering that they aren’t allowed to access files outside their 
sandbox. :) So may I request taking out this #warn directive?

Thanks,

—Jens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Richard Hipp
On 8/16/17, Jens Alfke  wrote:
>
> What I don’t understand is why SQLite would want to call gethostuuid(),

The gethostuuid() system call is used only by the OS-X "proxy locking"
VFS, which provides better performance across network filesystems.
This VFS that was written at Apple and contributed to the SQLite
source tree.  (We have copyright releases signed by Apple lawyers in
our firesafe.)  The proxy-locking VFS is important for OS-X, we are
told, because many applications store SQLite databases in the user's
home directory, and many OS-X users like to have their home
directories NSF-mounted.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread Jens Alfke
When compiling sqlite3.c for the iOS platform, the compiler emits a custom 
warning "gethostuuid() is disabled”, triggered by a #warn directive (see code 
below.)

I understand why gethostuuid() isn’t available: the iOS platform intentionally 
blocks 3rd party apps from accessing device-specific UUIDs, to avoid privacy 
problems caused by ad networks that try to correlate a user’s activity across 
apps or across reinstalls of an app.

What I don’t understand is why SQLite would want to call gethostuuid(), or what 
functionality might be lost by its absence. 

Also, usually a compiler warning means the developer is doing something 
questionable or dangerous; but in this case the warning is triggered simply by 
the presence of a target platform, which isn’t something the developer has any 
control over. So it doesn’t seem useful to produce this warning when there’s 
nothing that can be done about it.

—Jens

PS: The code that triggers the warning is:

#if defined(__APPLE__) && ((__MAC_OS_X_VERSION_MIN_REQUIRED > 1050) || \
   (__IPHONE_OS_VERSION_MIN_REQUIRED > 2000))
#  if (!defined(TARGET_OS_EMBEDDED) || (TARGET_OS_EMBEDDED==0)) \
   && (!defined(TARGET_IPHONE_SIMULATOR) || (TARGET_IPHONE_SIMULATOR==0))
#define HAVE_GETHOSTUUID 1
#  else
#warning "gethostuuid() is disabled."
#  endif
#endif

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users