Hi Jürgen: My recollection is that Apple used to distribute a number of command line apps for developers and did put them in the correct dirs. They stopped distributing svn and also sql around 2017. I wonder if we should document the README prerequisite about this issue?
Gandalf:trunk pteeson$ ./configure --with-sqlite3=/usr/local/opt/sqlite3 checking for gcc... gcc …….. checking for __atomic_fetch_add_4 in -latomicity... no checking for SQLite3 library >= 3.0.0... yes checking for pg_config... no repeat Peter > On Oct 5, 2022, at 10:43 AM, Dr. Jürgen Sauermann > <m...@xn--jrgen-sauermann-zvb.de> wrote: > > Hi Peter, > > thanks. A closer look into the m4/ax_lib_sqlite3.m4 macro reveals two > problems, which apparently only > occurs on macOS: > > 1. The m4 macro looks for include/sqlite3.h only in the directories /usr, > /usr/local, and /opt, > while macOS decides to install in /usr/local/opt. Therefore sqlite.h is not > found even > though it exists. In defence of the m4 script I should mention that, > according to the > Linux File Hierarchy Standard (aka. FHS), /usr/local/opt is not a suitable > location for > that file and the fault is more on the macOS side. > > 2. The m4 macro is faulty when sqlite.h is not found. This is due to a quirk > in bash. In the > bash shell you can compare two strings or string variables. However if any of > the two strings > is empty (like it happens when sqlite.h is not found) then the comparison > does not return > an equal or not equal result, but instead raises the syntax error (on line > 19090) that you > see below. > > Both problems should be fixed in SVN 1593 now. > > BTW installation mismatches caused by non-standard installation directories > can > sometimes (!) be fixed by ./configure options. In the above case something > along the > lines of > > ./configure --with-sqlite3=/usr/local/opt > > may have worked (whether it does or does not work depends entirely on the m4 > macro). > > Best Regards, > Jürgen > > > On 10/3/22 11:29 PM, Peter Teeson wrote: >> Hi Jürgen: >> I started with an empty dir, downloaded current version 1592, and >> ./configure. Same warning. >> >> The m4/ax_lib_sqllite3.m4 says: >> >> "dnl If no intallation prefix to the installed SQLite library is given >> dnl the macro searches under /usr, /usr/local, and /opt." >> >> Gandalf:~ pteeson$ cd /usr/local/opt/sqlite3/include >> Gandalf:include pteeson$ ls -al sql* >> -rw-r--r-- 1 502 staff 581196 18 Jun 2020 sqlite3.h >> -rw-r--r-- 1 502 staff 35269 18 Jun 2020 sqlite3ext.h >> >> checking for SQLite3 library >= 3.0.0... yes >> cat: /include/sqlite3.h: No such file or directory >> ./configure: line 19090: test: !=: unary operator expected <====== >> configure: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to >> retrieve SQLite version! >> >> I found it in the header >> #define SQLITE_VERSION "3.32.3" >> #define SQLITE_VERSION_NUMBER 3032003 >> #define SQLITE_SOURCE_ID "2020-06-18 14:00:33 >> 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd" >> >> So I do not know how to proceed further to help isolate what’s up. >> >> respect… >> >> Peter >> >>> On Oct 3, 2022, at 8:12 AM, Dr. Jürgen Sauermann >>> <m...@xn--jrgen-sauermann-zvb.de <mailto:m...@xn--jrgen-sauermann-zvb.de>> >>> wrote: >>> >>> Hi Peter, >>> >>> thanks for reporting this. It looks like the m4/ax_lib_sqlite3.m4 macro >>> shipped with >>> GNU APL has been outdated over time. I have updated it from a more recent >>> version from here: >>> >>> https://ac-archive.sourceforge.net/ac-archive/ax_lib_sqlite3.m4 >>> <https://ac-archive.sourceforge.net/ac-archive/ax_lib_sqlite3.m4> >>> >>> I hope this fixes the problem at your end, please let me know. >>> >>> Best Regards, >>> Jürgen >>> >>> >>> On 10/2/22 11:03 PM, Peter Teeson wrote: >>>> Hi Jürgen: >>>> >>>> Doing some investigation I came across this(see my comments below): >>>> >>>> ./configure >>>> ……. >>>> checking for SQLite3 library >= 3.0.0... yes >>>> cat: /include/sqlite3.h: No such file or directory >>>> ./configure: line 19132: test: !=: unary operator expected >>>> configure: WARNING: Cannot find SQLITE_VERSION macro in sqlite3.h header >>>> to retrieve SQLite version! >>>> >>>> locate sqlite >>>> ……. >>>> /usr/bin/sqlite3 >>>> /usr/lib/libsqlite3.0.dylib >>>> /usr/lib/libsqlite3.dylib >>>> /usr/lib/sqlite3 >>>> >>>> Gandalf:trunk pteeson$ cd /usr/lib >>>> Gandalf:lib pteeson$ ls -al s* >>>> lrwxr-xr-x 1 root wheel 27 12 Jun 14:42 sqlite3 -> >>>> /System/Library/Tcl/sqlite3 >>>> >>>> ========= My questions ======= >>>> This version and location of sqlite3 goes back to macOS Snow Leopard >>>> (2009). >>>> It has been part of every macOS release up to and including Mojave >>>> (2017-last version I can run on my HW) >>>> >>>> --with-sqlite3=[ARG] >>>> Build the native function for SQL using sqlite3. ARG may provide the >>>> non-default location of the sqlite3 library. >>>> >>>> (1) Based on the above it seems macOS version is not in the default >>>> location. >>>> What is the default location on Unix type systems? Also Windows? >>>> >>>> So what is the most elegant solution to this? >>>> (I don’t use sqlite and for sure I will not remember every time I >>>> download a new version of Gnuapl.) >>>> >>>> (2) Would adding a note to the README make sense? >>>> Or recognize macOS and fix it in configure? >>>> >>>> (3) Forget about it >>>> >>>> Anyway I thought to pass it on for your comment. >>>> >>>> respect >>>> >>>> Peter >>>> >>>> >>>> >>>> >>> >> >