Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
On 8/11/62 00:15, Dennis Clarke wrote: On 2019-11-07 11:44, Shawn Wagner wrote: ... Just don't use strict c99 mode when compiling with gcc? Drop the -std argument from your CFLAGS to use the default (gnu11 since gcc 5) or explicitly use gnu99, which gives you that version of the C standard + gcc extensions. (Not that they have anything to do with the problem, but compiling with -O0 and -fno-builtin are strange unless you're planning on spending some quality time in a debugger stepping through code, and -malign-double is already the default on x86-64 so kind of pointless) Debugger .. yes. That will happen and I build on a multitude of platforms. OKay so the code fails on Solaris sparc with c99 whereas in the recent past it all builds fine : libtool: compile: /opt/developerstudio12.6/bin/c99 -I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -Xc -m64 -xarch=sparc -g -errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -erroff=%none -DSQLITE_OS_UNIX=1 -I. -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/rtree -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/icu -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/fts3 -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/async -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/session -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/userauth -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/local/include -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB=1 -DUSE_TCL_STUBS=1 -c /usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c -KPIC -DPIC -o .libs/tclsqlite.o "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2346: error: undefined symbol: SQLITE_DBCONFIG_ENABLE_VIEW "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2346: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2351: error: undefined symbol: SQLITE_DBCONFIG_TRIGGER_EQP "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2351: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2352: error: undefined symbol: SQLITE_DBCONFIG_RESET_DATABASE "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2352: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2353: error: undefined symbol: SQLITE_DBCONFIG_DEFENSIVE "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2353: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2354: error: undefined symbol: SQLITE_DBCONFIG_WRITABLE_SCHEMA "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2354: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2355: error: undefined symbol: SQLITE_DBCONFIG_LEGACY_ALTER_TABLE "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2355: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2356: error: undefined symbol: SQLITE_DBCONFIG_DQS_DML "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2356: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2357: error: undefined symbol: SQLITE_DBCONFIG_DQS_DDL "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2357: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2855: error: undefined symbol: SQLITE_DIRECTONLY c99: acomp failed for /usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c gmake: *** [Makefile:1029: tclsqlite.lo] Error 1 On Red Hat Enterprise Linux 7.4 the code actually does compile and then core dumps with a segfault from with that same source file : Time: walshared.test 24 ms # WARNING: This next test takes around 12 seconds gmake: *** [Makefile:1256: tcltest] Segmentation fault (core dumped) This is almost certainly an issue with the test scripts, not the library. Can you post the last 100 lines or so of the file "test-out.txt" that was created in the cwd by the [make quicktest] or whatever you ran to get this? Thanks, Dan. ___ sqli
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
Another option (Which the devs might consider) is to replace use of the asm keyword with __asm__, which is a form of the extension understood even in strict mode. (I have no idea why gcc doesn't offer intrinsics for bit rotation, as it's a common task and shouldn't require hacks like this to reliably do efficiently). On Thu, Nov 7, 2019 at 8:23 AM Dennis Clarke wrote: > On 2019-11-07 11:15, Shawn Wagner wrote: > > Does that toolchain use gcc, or a different compiler? If gcc, are you > using > > the same CFLAGS as on the redhat box (you're turning on a bunch of extra > > non-default options there)? > > > > I don't see how --with-threads can be a concern. The other options do > not qualify as a "bunch" at all. > > Regardless it looks like the codebase does strange GNU extensions. > > There must be a way to switch all that off. > > Dennis > > ps : don't top post. > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
On 2019-11-07 11:44, Shawn Wagner wrote: ... Just don't use strict c99 mode when compiling with gcc? Drop the -std argument from your CFLAGS to use the default (gnu11 since gcc 5) or explicitly use gnu99, which gives you that version of the C standard + gcc extensions. (Not that they have anything to do with the problem, but compiling with -O0 and -fno-builtin are strange unless you're planning on spending some quality time in a debugger stepping through code, and -malign-double is already the default on x86-64 so kind of pointless) Debugger .. yes. That will happen and I build on a multitude of platforms. OKay so the code fails on Solaris sparc with c99 whereas in the recent past it all builds fine : libtool: compile: /opt/developerstudio12.6/bin/c99 -I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -Xc -m64 -xarch=sparc -g -errfmt=error -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs -xdebugformat=dwarf -errtags=yes -errwarn=%none -erroff=%none -DSQLITE_OS_UNIX=1 -I. -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/rtree -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/icu -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/fts3 -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/async -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/session -I/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/ext/userauth -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/local/include -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB=1 -DUSE_TCL_STUBS=1 -c /usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c -KPIC -DPIC -o .libs/tclsqlite.o "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2346: error: undefined symbol: SQLITE_DBCONFIG_ENABLE_VIEW "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2346: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2351: error: undefined symbol: SQLITE_DBCONFIG_TRIGGER_EQP "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2351: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2352: error: undefined symbol: SQLITE_DBCONFIG_RESET_DATABASE "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2352: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2353: error: undefined symbol: SQLITE_DBCONFIG_DEFENSIVE "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2353: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2354: error: undefined symbol: SQLITE_DBCONFIG_WRITABLE_SCHEMA "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2354: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2355: error: undefined symbol: SQLITE_DBCONFIG_LEGACY_ALTER_TABLE "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2355: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2356: error: undefined symbol: SQLITE_DBCONFIG_DQS_DML "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2356: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2357: error: undefined symbol: SQLITE_DBCONFIG_DQS_DDL "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2357: error: non-constant initializer: op "NAME" "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c", line 2855: error: undefined symbol: SQLITE_DIRECTONLY c99: acomp failed for /usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.001/src/tclsqlite.c gmake: *** [Makefile:1029: tclsqlite.lo] Error 1 On Red Hat Enterprise Linux 7.4 the code actually does compile and then core dumps with a segfault from with that same source file : Time: walshared.test 24 ms # WARNING: This next test takes around 12 seconds gmake: *** [Makefile:1256: tcltest] Segmentation fault (core dumped) boe13$ pwd /opt/bw/build/sqlite-src-3300100_rhel_74_3.10.0-693.el7.x86_64.001 boe13$ find . | grep -i 'core' ./testdir/core.43494 boe13$ boe13$ file ./testdir/core.43494 ./testdir/core.43494: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from './testfixture /opt/bw/build/sqlite-src-3300100_rhel_74_3.10.0-693.el7.x86_64.00', rea
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
... Just don't use strict c99 mode when compiling with gcc? Drop the -std argument from your CFLAGS to use the default (gnu11 since gcc 5) or explicitly use gnu99, which gives you that version of the C standard + gcc extensions. (Not that they have anything to do with the problem, but compiling with -O0 and -fno-builtin are strange unless you're planning on spending some quality time in a debugger stepping through code, and -malign-double is already the default on x86-64 so kind of pointless) On Thu, Nov 7, 2019 at 8:23 AM Dennis Clarke wrote: > On 2019-11-07 11:15, Shawn Wagner wrote: > > Does that toolchain use gcc, or a different compiler? If gcc, are you > using > > the same CFLAGS as on the redhat box (you're turning on a bunch of extra > > non-default options there)? > > > > I don't see how --with-threads can be a concern. The other options do > not qualify as a "bunch" at all. > > Regardless it looks like the codebase does strange GNU extensions. > > There must be a way to switch all that off. > > Dennis > > ps : don't top post. > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
On 2019-11-07 11:15, Shawn Wagner wrote: Does that toolchain use gcc, or a different compiler? If gcc, are you using the same CFLAGS as on the redhat box (you're turning on a bunch of extra non-default options there)? I don't see how --with-threads can be a concern. The other options do not qualify as a "bunch" at all. Regardless it looks like the codebase does strange GNU extensions. There must be a way to switch all that off. Dennis ps : don't top post. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
For that matter, is the Solaris box x86 or sparc? If the latter, this particular code path obviously wouldn't ever be used on it. On Thu, Nov 7, 2019, 8:10 AM Dennis Clarke wrote: > On 2019-11-07 11:01, Shawn Wagner wrote: > > Compiling with -std=iso9899:1999 is the culprit. Strict c99 mode disables > > gcc extensions like inline asm. > > OKay but I have no issues doing a compile on a Solaris server using the > Oracle Studio 12.6 tools and strict C99. So how is C99 the issue? > > Dennis > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
Does that toolchain use gcc, or a different compiler? If gcc, are you using the same CFLAGS as on the redhat box (you're turning on a bunch of extra non-default options there)? On Thu, Nov 7, 2019, 8:10 AM Dennis Clarke wrote: > On 2019-11-07 11:01, Shawn Wagner wrote: > > Compiling with -std=iso9899:1999 is the culprit. Strict c99 mode disables > > gcc extensions like inline asm. > > OKay but I have no issues doing a compile on a Solaris server using the > Oracle Studio 12.6 tools and strict C99. So how is C99 the issue? > > Dennis > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
On 2019-11-07 11:01, Shawn Wagner wrote: Compiling with -std=iso9899:1999 is the culprit. Strict c99 mode disables gcc extensions like inline asm. OKay but I have no issues doing a compile on a Solaris server using the Oracle Studio 12.6 tools and strict C99. So how is C99 the issue? Dennis ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-src-3300100 on RHEL 7.4 toss mad errors about 'asm'
Compiling with -std=iso9899:1999 is the culprit. Strict c99 mode disables gcc extensions like inline asm. On Thu, Nov 7, 2019, 7:57 AM Dennis Clarke wrote: > > While building sqlite from the zip file sqlite-src-3300100.zip I saw > what seems to be a normal configure and then madness : > > > boe13$ pwd > /opt/bw/build/sqlite-src-3300100_rhel_74_3.10.0-693.el7.x86_64.001 > boe13$ ./configure --prefix=/opt/bw --enable-shared --enable-static > --enable-readline --enable-threadsafe 2>&1 | tee > ../sqlite-src-3300100_rhel_74_3.10.0-693.el7.x86_64.001.config.log > checking build system type... x86_64-pc-linux-gnu > checking host system type... x86_64-pc-linux-gnu > checking for gcc... /opt/bw/gcc9/bin/gcc > 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... yes > checking whether /opt/bw/gcc9/bin/gcc accepts -g... yes > checking for /opt/bw/gcc9/bin/gcc option to accept ISO C89... none needed > checking for a sed that does not truncate output... /usr/bin/sed > checking for grep that handles long lines and -e... /usr/bin/grep > checking for egrep... /usr/bin/grep -E > checking for fgrep... /usr/bin/grep -F > checking for ld used by /opt/bw/gcc9/bin/gcc... /usr/bin/ld > checking if the linker (/usr/bin/ld) is GNU ld... yes > checking for BSD- or MS-compatible name lister (nm)... > /opt/bw/gcc9/bin/x86_64-redhat-linux-gcc-nm -p > checking the name lister (/opt/bw/gcc9/bin/x86_64-redhat-linux-gcc-nm > -p) interface... BSD nm > checking whether ln -s works... yes > checking the maximum length of command line arguments... 1572864 > checking whether the shell understands some XSI constructs... yes > checking whether the shell understands "+="... yes > checking for /usr/bin/ld option to reload object files... -r > checking for objdump... /usr/bin/objdump > checking how to recognize dependent libraries... pass_all > checking for ar... /opt/bw/gcc9/bin/x86_64-redhat-linux-gcc-ar > checking for strip... /usr/bin/strip > checking for ranlib... /opt/bw/gcc9/bin/x86_64-redhat-linux-gcc-ranlib > checking command to parse /opt/bw/gcc9/bin/x86_64-redhat-linux-gcc-nm -p > output from /opt/bw/gcc9/bin/gcc object... ok > checking how to run the C preprocessor... /opt/bw/gcc9/bin/gcc -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 if /opt/bw/gcc9/bin/gcc supports -fno-rtti -fno-exceptions... no > checking for /opt/bw/gcc9/bin/gcc option to produce PIC... -fPIC -DPIC > checking if /opt/bw/gcc9/bin/gcc PIC flag -fPIC -DPIC works... yes > checking if /opt/bw/gcc9/bin/gcc static flag -static works... no > checking if /opt/bw/gcc9/bin/gcc supports -c -o file.o... yes > checking if /opt/bw/gcc9/bin/gcc supports -c -o file.o... (cached) yes > checking whether the /opt/bw/gcc9/bin/gcc linker (/usr/bin/ld -m > elf_x86_64) supports shared libraries... yes > checking whether -lc should be explicitly linked in... no > checking dynamic linker characteristics... GNU/Linux ld.so > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... yes > 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... /usr/bin/install -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... yes > checking for strchrnul... yes > checking for usleep... yes > checking for utime... yes > checking for pread... yes > checking for pread64... yes > checking for pwrite... yes > checking for pwrite64... yes > checking for tclsh8.7... tclsh8.7 > configu