building sqlite-src-3240000 I was surprised to see "make test" fail

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

building sqlite-src-3240000 I was surprised to see "make test" fail

Dennis Clarke

Seems to compile fine and yet "gmake test" failed with a less
then helpful "Error 2" :


.
.
.
sqlite3.c:
"sqlite3.c", line 20826: warning: implicit function declaration:
localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
"sqlite3.c", line 52491: warning: statement not reached
(E_STATEMENT_NOT_REACHED)
gmake: *** [Makefile:1161: testfixture] Error 2


Configure was trivial and seems fine :

./configure --enable-shared --enable-static --enable-readline
--enable-threadsafe

Not sure if perhaps I am doing something blatently wrong.

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

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Dan Kennedy-4
On 06/21/2018 02:34 PM, Dennis Clarke wrote:

>
> Seems to compile fine and yet "gmake test" failed with a less
> then helpful "Error 2" :
>
>
> .
> .
> .
> sqlite3.c:
> "sqlite3.c", line 20826: warning: implicit function declaration:
> localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
> "sqlite3.c", line 52491: warning: statement not reached
> (E_STATEMENT_NOT_REACHED)
> gmake: *** [Makefile:1161: testfixture] Error 2


Seems like the compiler is configured to be extra picky. Is this
Solaris? Can you post the full output of [configure && gmake test]?

The second error is a bit strange. It's true that line 52491 is
unreachable, but the line is "assert( 0 );". Are you building with
SQLITE_DEBUG defined somehow? Is environment variable CC set?

If you just want to get something working, switching to the amalgamation
package might do the trick.

Dan.



> Configure was trivial and seems fine :
>
> ./configure --enable-shared --enable-static --enable-readline
> --enable-threadsafe
>
> Not sure if perhaps I am doing something blatently wrong.
>
> Dennis
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


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

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Dennis Clarke
On 06/21/2018 10:04 AM, Dan Kennedy wrote:

> On 06/21/2018 02:34 PM, Dennis Clarke wrote:
>>
>> Seems to compile fine and yet "gmake test" failed with a less
>> then helpful "Error 2" :
>>
>>
>> .
>> .
>> .
>> sqlite3.c:
>> "sqlite3.c", line 20826: warning: implicit function declaration:
>> localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
>> "sqlite3.c", line 52491: warning: statement not reached
>> (E_STATEMENT_NOT_REACHED)
>> gmake: *** [Makefile:1161: testfixture] Error 2
>
>
> Seems like the compiler is configured to be extra picky. Is this
> Solaris? Can you post the full output of [configure && gmake test]?

It is and yes it is a very strict compiler. Which is why I use it.

output from configure :

checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... /opt/developerstudio12.6/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /opt/developerstudio12.6/bin/cc accepts -g... yes
checking for /opt/developerstudio12.6/bin/cc option to accept ISO C89...
none needed
checking for a sed that does not truncate output... /usr/local/bin/sed
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for fgrep... /usr/local/bin/grep -F
checking for non-GNU ld... /usr/ccs/bin/sparcv9/ld
checking if the linker (/usr/ccs/bin/sparcv9/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/xpg4/bin/nm -p
checking the name lister (/usr/xpg4/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786240
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/ccs/bin/sparcv9/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... /usr/ccs/bin/ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/xpg4/bin/nm -p output from
/opt/developerstudio12.6/bin/cc object... ok
checking how to run the C preprocessor... /opt/developerstudio12.6/bin/cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking for /opt/developerstudio12.6/bin/cc option to produce PIC...
-KPIC -DPIC
checking if /opt/developerstudio12.6/bin/cc PIC flag -KPIC -DPIC
works... yes
checking if /opt/developerstudio12.6/bin/cc static flag -Bstatic
works... yes
checking if /opt/developerstudio12.6/bin/cc supports -c -o file.o... yes
checking if /opt/developerstudio12.6/bin/cc supports -c -o file.o...
(cached) yes
checking whether the /opt/developerstudio12.6/bin/cc linker
(/usr/ccs/bin/sparcv9/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... ./install-sh -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for fdatasync... yes
checking for gmtime_r... yes
checking for isnan... yes
checking for localtime_r... yes
checking for localtime_s... no
checking for malloc_usable_size... no
checking for strchrnul... no
checking for usleep... yes
checking for utime... yes
checking for pread... yes
checking for pread64... no
checking for pwrite... yes
checking for pwrite64... no
checking for tclsh8.7... no
checking for tclsh8.6... no
checking for tclsh8.5... tclsh8.5
configure: Version set to 3.24
configure: Release set to 3.24.0
configure: Version number set to 3024000
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... none required
checking for library containing pthread_mutexattr_init... none required
checking whether to support shared library linked as release mode or
not... no
checking whether to use an in-ram database for temporary tables... no
checking if executables have the .exe suffix... unknown
checking for Tcl configuration... found /usr/local/lib/tclConfig.sh
checking for existence of /usr/local/lib/tclConfig.sh... loading
checking for library containing readline... no
checking for library containing tgetent... -lncurses
checking for readline in -lreadline... yes
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... no
checking for /usr/local/include/readline.h... no
checking for /usr/local/include/readline/readline.h... yes
checking for library containing fdatasync... none required
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing deflate... -lz
checking for library containing dlopen... none required
checking whether to support MEMSYS5... no
checking whether to support MEMSYS3... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: creating config.h
config.status: executing libtool commands
dclarke@node000_$


Yes I had CC set to the warm and fuzzy ever a joy ye cc :

dclarke@node000_$ echo $CC
/opt/developerstudio12.6/bin/cc

The CFLAGS were downright friendly too :

dclarke@node000_$ echo $CFLAGS
-m64 -xarch=sparc -errwarn=%none -erroff=%none -errtags=yes
-errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s
-xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs
-ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1

However previous releases of sqlite were always built with c99
and the very strict -Xc compliance flag where nothing gets past
the compiler that isn't precisely to the specs. Usually works well
with sqlite as the code is very very clean.


> The second error is a bit strange. It's true that line 52491 is
> unreachable, but the line is "assert( 0 );". Are you building with
> SQLITE_DEBUG defined somehow? Is environment variable CC set?

SQLITE_DEBUG ?   nope ... not at all.


> If you just want to get something working, switching to the amalgamation
> package might do the trick.

Oh, I have previous revs installed and working fine. I was merely doing
  an update here and wanted to run the testsuite.

I can manually cd into the ./test dir and compile source there and link
against the libs in ./.libs just fine. However I wanted the whole test
gambit to run.

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

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Richard Hipp-3
In reply to this post by Dennis Clarke
On 6/21/18, Dennis Clarke <[hidden email]> wrote:

>
> Seems to compile fine and yet "gmake test" failed with a less
> then helpful "Error 2" :
>
>
> .
> .
> .
> sqlite3.c:
> "sqlite3.c", line 20826: warning: implicit function declaration:
> localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)

According to my manpage for localtime_r(), the only header file
required is <time.h>, which you can clearly see is found on line
20342, above the declaration that offends your compiler.  Perhaps you
can suggest what is going wrong, because I have no clue.

> "sqlite3.c", line 52491: warning: statement not reached
> (E_STATEMENT_NOT_REACHED)

Line 52491 is "assert(0);" which generates no code unless you compile
with -DSQLITE_DEBUG.  Once again, I have no explanation for the
warning.

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

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Dennis Clarke
On 06/21/2018 12:06 PM, Richard Hipp wrote:

> On 6/21/18, Dennis Clarke <[hidden email]> wrote:
>>
>> Seems to compile fine and yet "gmake test" failed with a less
>> then helpful "Error 2" :
>>
>>
>> .
>> .
>> .
>> sqlite3.c:
>> "sqlite3.c", line 20826: warning: implicit function declaration:
>> localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
>
> According to my manpage for localtime_r(), the only header file
> required is <time.h>, which you can clearly see is found on line
> 20342, above the declaration that offends your compiler.  Perhaps you
> can suggest what is going wrong, because I have no clue.

Yep ... I looked there right away.  Saw the same thing and then started
over from scratch with more lenient CFLAGS.

Build completes just fine ... near as I can tell.

>> "sqlite3.c", line 52491: warning: statement not reached
>> (E_STATEMENT_NOT_REACHED)
>
> Line 52491 is "assert(0);" which generates no code unless you compile
> with -DSQLITE_DEBUG.  Once again, I have no explanation for the
> warning.
>

Hrmmmm ... yep.  Does make me wonder.

I went out on a limb and figured that the tests were beig built and
linked by default against the previous sqlite libs installed in the
/usr/local/lib directory.  So I went ahead and installed the libs
freshly built and went back to run the "gmake test" and that was, at
the very least, interesting :

n0$ /usr/local/bin/gmake test 2>&1 | tee
../sqlite-src-3240000_SunOS5.10_sparcv9.002.test.log
./fuzzcheck --limit-mem 100M
/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/test/fuzzdata1.db
/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/test/fuzzdata2.db
/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/test/fuzzdata3.db
/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/test/fuzzdata4.db
/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/test/fuzzdata5.db
/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/test/fuzzdata6.db
fuzzdata1.db: SQL fuzz as of 2015-06-20
fuzzdata1.db: 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% - 9903 tests
fuzzdata2.db: SQL test cases contributed by Michal Zalewski on 2015-05-01
fuzzdata2.db: 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% - 9959 tests
fuzzdata3.db: Database fuzz as of 2015-06-24
fuzzdata3.db: 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% - 2316 tests
fuzzdata4.db: JSON1 test cases as of 2015-09-23
fuzzdata4.db: 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% - 2574 tests
fuzzdata5.db: Test cases received from the OSS-FUZZ project
fuzzdata5.db: 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% - 8818 tests
fuzzdata6.db: Test cases for UPSERT
fuzzdata6.db: 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% - 3896 tests
fuzzcheck: 0 errors out of 37466 tests in 70.355 seconds
SQLite 3.24.0 2018-06-04 19:24:41
c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca
./sessionfuzz run
/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/test/sessionfuzz-data1.db
sessionfuzz-data1.db:  339 cases, 0 crashes
./srcck1 sqlite3.c
./libtool --mode=link /opt/developerstudio12.6/bin/cc
-I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS
-D_LARGEFILE64_SOURCE  -m64 -xarch=sparc -errwarn=%none -erroff=%none
-errtags=yes -errfmt=error -errshort=full -xstrconst -xildoff
-xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc
-g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1
-D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
-DSQLITE_OS_UNIX=1 -I.
-I/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/src
-I/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/ext/rtree
-I/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/ext/icu
-I/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/ext/fts3
-I/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/ext/async
-I/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/ext/session
-D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/local/include
-DSQLITE_THREADSAFE=1   -DSQLITE_HAVE_ZLIB=1  -L/usr/local/lib
-DSQLITE_NO_SYNC=1 -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST=1
-DSQLITE_CRASH_TEST=1 -DTCLSH_INIT_PROC=sqlite3TestInit
-DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE  -DBUILD_sqlite
-DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_DEFAULT_PAGE_SIZE=1024
-DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB \
.
.
.
etc etc
.
.
.

and then whammo :

/usr/local/build/sqlite-src-3240000_SunOS5.10_sparcv9.002/src/tclsqlite.c:
sqlite3.c:
"sqlite3.c", line 52491: warning: statement not reached
(E_STATEMENT_NOT_REACHED)
Undefined                       first referenced
  symbol                             in file
sched_yield                         test4.o
ld: fatal: symbol referencing errors. No output written to testfixture
gmake: *** [Makefile:1161: testfixture] Error 2
n0$

Interesting.

n0$ grep -in "sched_yield" ./src/test4.c
80:  while( p->opnum<=p->completed ) sched_yield();
88:    while( p->opnum<=p->completed ) sched_yield();
169:  while( p->opnum>p->completed ) sched_yield();
n0$


So I then read ext/async/README.txt and took a look around whereupon
I see these use "sched_yield" :

./ext/async/sqlite3async.c
./src/test4.c
./src/test7.c
./test/crashtest1.c
./test/threadtest1.c
./test/threadtest2.c
./test/threadtest4.c

So this is ... just curious to me. I would think that everything I would
need would be in libtclsqlite3.so or libsqlite3.so.0.

Regardless ... curious.

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

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Warren Young
On Jun 21, 2018, at 5:28 AM, Dennis Clarke <[hidden email]> wrote:

>
> So I then read ext/async/README.txt and took a look around whereupon
> I see these use "sched_yield" :
>
> ./ext/async/sqlite3async.c
> ./src/test4.c
> ./src/test7.c
> ./test/crashtest1.c
> ./test/threadtest1.c
> ./test/threadtest2.c
> ./test/threadtest4.c
>
> So this is ... just curious to me. I would think that everything I would
> need would be in libtclsqlite3.so or libsqlite3.so.0.

sched_yield(3) is a POSIX API function, since 2001.

It’s not explicit in the Solaris docs, but it appears it may require -lrt:

    https://docs.oracle.com/cd/E88353_01/html/E37843/sched-yield-3c.html
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Bob Friesenhahn
In reply to this post by Richard Hipp-3
On Thu, 21 Jun 2018, Richard Hipp wrote:
>> .
>> sqlite3.c:
>> "sqlite3.c", line 20826: warning: implicit function declaration:
>> localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
>
> According to my manpage for localtime_r(), the only header file
> required is <time.h>, which you can clearly see is found on line
> 20342, above the declaration that offends your compiler.  Perhaps you
> can suggest what is going wrong, because I have no clue.

It is most likely that sqlite is getting a preprocessor declaration
for the requested ABI wrong.  The Linux manual page for localtime_r()
says that its declaration depends on

_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE
|| _POSIX_SOURCE

but Solaris is proven to be Unix-compliant so the rules could be
somewhat different.

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Dennis Clarke
On 06/21/2018 04:53 PM, Bob Friesenhahn wrote:

> On Thu, 21 Jun 2018, Richard Hipp wrote:
>>> .
>>> sqlite3.c:
>>> "sqlite3.c", line 20826: warning: implicit function declaration:
>>> localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
>>
>> According to my manpage for localtime_r(), the only header file
>> required is <time.h>, which you can clearly see is found on line
>> 20342, above the declaration that offends your compiler.  Perhaps you
>> can suggest what is going wrong, because I have no clue.
>
> It is most likely that sqlite is getting a preprocessor declaration for
> the requested ABI wrong.  The Linux manual page for localtime_r() says
> that its declaration depends on
>
> _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE ||
> _POSIX_SOURCE
>
> but Solaris is proven to be Unix-compliant so the rules could be
> somewhat different.

I think you are on to something here. I keep detailed notes and logs on
every piece of software that I look at. The last time that I had built
sqlite and rolled it into production sites would be from the "autoconf"
pack sqlite-autoconf-3200100.[1] I still find it bizarre that sqlite has
multiple different tarballs and zip files with and without various bits
but that is a whole other discussion. Mostly I just want to be able to
compile from source and then verify with tests that the result is a good
result. There are pages of docs on this sort of topic on the sqlite site
but nothing clearly ( https://www.sqlite.org/testing.html ) says where
the tests are and exactly what to do in order to have them run for a
reasonable person. I have emails on this exact topic going back years
and Richard Hipp has been patient enough to tell me to not use the
tarball called "autoconf" because the tests are stripped out.  So that
explains why I use the full zip file.

So I am going to revert back to using the c99 compiler from the Oracle
Studio 12.6 compiler tools and also set POSIXLY_CORRECT=1 in the build
environment.  That is really harsh but from experience the sqlite code
is so squeaky clean that there shouldn't be a problem.

Also :

CC=/opt/developerstudio12.6/bin/c99

CFLAGS=-m64 -xarch=sparc -errwarn=%none -erroff=%none -errtags=yes
  -errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s
  -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs
  -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1

I won't go into a long discussion on why those flags makes good and
reasonable sense for a dev environment where I will want to debug or
single step my way through code. Suffice it to say that the results
have been tested to the n-th degree over a decade and I get very
very stable and very very conservative results.

n0$ ./configure --enable-shared --enable-static --enable-readline \
 > --enable-threadsafe
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... /opt/developerstudio12.6/bin/c99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /opt/developerstudio12.6/bin/c99 accepts -g... yes
checking for /opt/developerstudio12.6/bin/c99 option to accept ISO
C89... none needed
checking for a sed that does not truncate output... /usr/local/bin/sed
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for fgrep... /usr/local/bin/grep -F
checking for non-GNU ld... /usr/ccs/bin/sparcv9/ld
checking if the linker (/usr/ccs/bin/sparcv9/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/xpg4/bin/nm -p
checking the name lister (/usr/xpg4/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786240
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/ccs/bin/sparcv9/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... /usr/ccs/bin/ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/xpg4/bin/nm -p output from
/opt/developerstudio12.6/bin/c99 object... ok
checking how to run the C preprocessor...
/opt/developerstudio12.6/bin/c99 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking for /opt/developerstudio12.6/bin/c99 option to produce PIC...
-KPIC -DPIC
checking if /opt/developerstudio12.6/bin/c99 PIC flag -KPIC -DPIC
works... yes
checking if /opt/developerstudio12.6/bin/c99 static flag -Bstatic
works... yes
checking if /opt/developerstudio12.6/bin/c99 supports -c -o file.o... yes
checking if /opt/developerstudio12.6/bin/c99 supports -c -o file.o...
(cached) yes
checking whether the /opt/developerstudio12.6/bin/c99 linker
(/usr/ccs/bin/sparcv9/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... ./install-sh -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for fdatasync... yes
checking for gmtime_r... yes
checking for isnan... yes
checking for localtime_r... yes
checking for localtime_s... no
checking for malloc_usable_size... no
checking for strchrnul... no
checking for usleep... yes
checking for utime... yes
checking for pread... yes
checking for pread64... no
checking for pwrite... yes
checking for pwrite64... no
checking for tclsh8.7... no
checking for tclsh8.6... tclsh8.6
configure: Version set to 3.24
configure: Release set to 3.24.0
configure: Version number set to 3024000
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... none required
checking for library containing pthread_mutexattr_init... none required
checking whether to support shared library linked as release mode or
not... no
checking whether to use an in-ram database for temporary tables... no
checking if executables have the .exe suffix... unknown
checking for Tcl configuration... found /usr/local/lib/tclConfig.sh
checking for existence of /usr/local/lib/tclConfig.sh... loading
checking for library containing readline... no
checking for library containing tgetent... -lncurses
checking for readline in -lreadline... yes
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... no
checking for /usr/local/include/readline.h... no
checking for /usr/local/include/readline/readline.h... yes
checking for library containing fdatasync... none required
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing deflate... -lz
checking for library containing dlopen... none required
checking whether to support MEMSYS5... no
checking whether to support MEMSYS3... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands
n0$

Looks wonderful.

Running "gmake" I see a few oddball warnings again :

"sqlite3.c", line 20826: warning: implicit function declaration:
localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
"sqlite3.c", line 52491: warning: statement not reached
(E_STATEMENT_NOT_REACHED)

"shell.c", line 11188: warning: implicit function declaration: strdup
(E_NO_IMPLICIT_DECL_ALLOWED)
"shell.c", line 11188: warning: improper pointer/integer combination: op
"=" (E_BAD_PTR_INT_COMBINATION)
sqlite3.c:
"sqlite3.c", line 20826: warning: implicit function declaration:
localtime_r (E_NO_IMPLICIT_DECL_ALLOWED)
"sqlite3.c", line 52491: warning: statement not reached
(E_STATEMENT_NOT_REACHED)

I get what I expect :

n0$ ls -lapb .libs/
total 7915
drwxr-xr-x   2 dclarke  devl          14 Jun 21 20:07 ./
drwxr-xr-x  16 dclarke  devl          74 Jun 21 20:07 ../
-rw-r--r--   1 dclarke  devl     3038616 Jun 21 20:06 libsqlite3.a
lrwxrwxrwx   1 dclarke  devl          16 Jun 21 20:06 libsqlite3.la ->
../libsqlite3.la
-rw-r--r--   1 dclarke  devl         961 Jun 21 20:06 libsqlite3.lai
lrwxrwxrwx   1 dclarke  devl          19 Jun 21 20:06 libsqlite3.so ->
libsqlite3.so.0.8.6*
lrwxrwxrwx   1 dclarke  devl          19 Jun 21 20:06 libsqlite3.so.0 ->
libsqlite3.so.0.8.6*
-rwxr-xr-x   1 dclarke  devl     2079512 Jun 21 20:06 libsqlite3.so.0.8.6
-rw-r--r--   1 dclarke  devl      212160 Jun 21 20:07 libtclsqlite3.a
lrwxrwxrwx   1 dclarke  devl          19 Jun 21 20:07 libtclsqlite3.la
-> ../libtclsqlite3.la
-rw-r--r--   1 dclarke  devl        1029 Jun 21 20:07 libtclsqlite3.lai
-rwxr-xr-x   1 dclarke  devl      217824 Jun 21 20:07 libtclsqlite3.so
-rw-r--r--   1 dclarke  devl     3028256 Jun 21 20:06 sqlite3.o
-rw-r--r--   1 dclarke  devl      211640 Jun 21 20:07 tclsqlite.o

So then a quick edit of the Makefile to add "-lrt" in there :

n0$ diff Makefile.backup Makefile
70c70
< TLIBS = -lz  $(LIBS)
---
 > TLIBS = -lz -lrt $(LIBS)
n0$

ta da !   beautiful results :

.
.
.
SQLite 2018-06-04 19:24:41
c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca
0 errors out of 144287 tests on node000 SunOS 64-bit big-endian
All memory allocations freed - no leaks
Maximum memory usage: 9275952 bytes
Current memory usage: 0 bytes
Number of malloc()  : -1 calls

So now I will reproduce this across a few other systems and just be
happy.

Dennis Clarke

[1] actually rolled into production on various risc platforms and
      multiple flavors of linux and unix types.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Warren Young
On Jun 21, 2018, at 2:53 PM, Dennis Clarke <[hidden email]> wrote:
>
> n0$ diff Makefile.backup Makefile
> 70c70
> < TLIBS = -lz  $(LIBS)
> ---
> > TLIBS = -lz -lrt $(LIBS)
> n0$

Actually, you want this:



Index: configure.ac
==================================================================
--- configure.ac
+++ configure.ac
@@ -194,10 +194,11 @@
 AC_SUBST(SQLITE_THREADSAFE)
 
 if test "$SQLITE_THREADSAFE" = "1"; then
   AC_SEARCH_LIBS(pthread_create, pthread)
   AC_SEARCH_LIBS(pthread_mutexattr_init, pthread)
+  AC_SEARCH_LIBS(sched_yield, rt)
 fi
 
 ##########
 # Do we want to support release
 #



Then run autoconf to re-generate the configure script, and re-configure.  Unlike many FOSS projects, touching configure.ac in SQLite won’t do that for you on the next “make”.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: building sqlite-src-3240000 I was surprised to see "make test" fail

Bob Friesenhahn
In reply to this post by Dennis Clarke
On Thu, 21 Jun 2018, Dennis Clarke wrote:
> Running "gmake" I see a few oddball warnings again :
>
> "sqlite3.c", line 20826: warning: implicit function declaration: localtime_r
> (E_NO_IMPLICIT_DECL_ALLOWED)
> "sqlite3.c", line 52491: warning: statement not reached
> (E_STATEMENT_NOT_REACHED)
>
> "shell.c", line 11188: warning: implicit function declaration: strdup
> (E_NO_IMPLICIT_DECL_ALLOWED)

The strdup() function is also ABI dependent.  The Linux manual page
ways it is dependent on

_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE
&& _XOPEN_SOURCE_EXTENDED || /* Since glibc 2.12: */ _POSIX_C_SOURCE
>= 200809L

You will need to add a preprocessor definition to your common build
options, or use some other compiler mode in order for the header files
to produce the prototypes for these two functions.

An Autoconf configure script which uses this macro:

AC_USE_SYSTEM_EXTENSIONS

will likely expose those prototypes.

Solaris has the __EXTENSIONS__ define (e.g. -D__EXTENSIONS__=1) to
enable all extensions.  Otherwise you could try -D_XOPEN_SOURCE=500
and see if that helps.

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users