Re: [sqlite] [Legacy Email] Re: Static sqlite3 library for Linux
Greetings Reid and thank you for your comment! I have followed this procedure by running: ./configure --prefix=/usr/local/sqlite --enable-static --enable-fts5 --enable-json1 CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_RTREE=1” make make install Unfortunately, I run into the very same errors! :-( PS: Continuing to play around with the gcc -static switches... Best Regards, Petros On 15 Feb 2018, 19:46 +0200, Reid Thompson , wrote: > https://www.sqlite.org/download.html > > download > sqlite-autoconf-322.tar.gz > > untar > cd into source dir > > ./configure > make > > static lib is made by default along with shared libs > > $ ls -rlt .libs/ > total 9076 > -rw-r--r-- 1 rthompso staff 7473704 Feb 15 11:42 sqlite3.o > -rwxr-xr-x 1 rthompso staff 4380288 Feb 15 11:42 libsqlite3.so.0.8.6 > lrwxrwxrwx 1 rthompso staff 19 Feb 15 11:42 libsqlite3.so.0 -> > libsqlite3.so.0.8.6 > lrwxrwxrwx 1 rthompso staff 19 Feb 15 11:42 libsqlite3.so -> > libsqlite3.so.0.8.6 > -rw-r--r-- 1 rthompso staff 7729804 Feb 15 11:42 libsqlite3.a > -rw-r--r-- 1 rthompso staff 956 Feb 15 11:42 libsqlite3.lai > lrwxrwxrwx 1 rthompso staff 16 Feb 15 11:42 libsqlite3.la -> ../libsqlite3.la > > > reid > > > On Thu, 2018-02-15 at 14:39 +0200, Petros Marinos wrote: > > [EXTERNAL SOURCE] > > > > > > > > Greetings Peter and thank you for your answer! > > > > Ok, I’ll give these switches a go and will get back with my findings. > > > > Concerning the side question, of course I can answer, no problem! > > It is fully developed in-house. > > > > Best Regards, > > Petros > > > > On 14 Feb 2018, 20:48 +0200, petern , wrote: > > > Petros, FYI. gcc also has several different switches for object ouput: > > > eg. "gcc -c -static ..." > > > > > > It might help to investigate these options during steps to compile > > > sqlite.c > > > and your main program to avoid dynamic/static symbol conflicts. > > > > > > -static > > > On systems that support dynamic linking, this prevents linking > > > with the shared libraries. On other systems, this option has no effect. > > > > > > -shared > > > Produce a shared object which can then be linked with other > > > objects to form an executable. Not all systems support this option. For > > > predictable results, > > > you must also specify the same set of options used for > > > compilation (-fpic, -fPIC, or model suboptions) when you specify this > > > linker option.[1] > > > > > > -shared-libgcc > > > -static-libgcc > > > On systems that provide libgcc as a shared library, these > > > options force the use of either the shared or static version, > > > respectively. If no shared version > > > of libgcc was built when the compiler was configured, these > > > options have no effect. > > > > > > There are several situations in which an application should use > > > the shared libgcc instead of the static version. The most common of these > > > is when the > > > application wishes to throw and catch exceptions across > > > different shared libraries. In that case, each of the libraries as well as > > > the application itself > > > should use the shared libgcc. > > > > > > Therefore, the G++ and GCJ drivers automatically add > > > -shared-libgcc whenever you build a shared library or a main executable, > > > because C++ and Java programs > > > typically use exceptions, so this is the right thing to do. > > > > > > -- > > > I have a side question for you, if you can answer. > > > How did Omilia implement their speaker independent speech recognition > > > corpus? Was it licensed from elsewhere or developed in house? > > > > > > Peter > > > > > > > > > > > > On Wed, Feb 14, 2018 at 8:27 AM, Petros Marinos > > > wrote: > > > > > > > Thank you Arjen and Simon for your answers, really helpful! > > > > > > > > While there was progress by following the two commands noted in Arjen’s > > > > answer and creating the libsqlite.a file, I stumbled upon the following > > > > errors: > > > > > > > > [LD] astdb2sqlite3.o db1-ast/libdb1.a -> astdb2sqlite3 > > > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > > > In function `__libc_sigaction': > > > > (.text+0x
Re: [sqlite] [Legacy Email] Re: Static sqlite3 library for Linux
Greetings Reid and thank you for your comment! I have followed this procedure by running: ./configure --prefix=/usr/local/sqlite --enable-static --enable-fts5 --enable-json1 CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_RTREE=1” make make install Unfortunately, I run into the very same errors! :-( PS: Continuing to play around with the gcc -static switches... Best Regards, Petros ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Static sqlite3 library for Linux
Greetings Peter and thank you for your answer! Ok, I’ll give these switches a go and will get back with my findings. Concerning the side question, of course I can answer, no problem! It is fully developed in-house. Best Regards, Petros On 14 Feb 2018, 20:48 +0200, petern , wrote: > Petros, FYI. gcc also has several different switches for object ouput: > eg. "gcc -c -static ..." > > It might help to investigate these options during steps to compile sqlite.c > and your main program to avoid dynamic/static symbol conflicts. > > -static > On systems that support dynamic linking, this prevents linking > with the shared libraries. On other systems, this option has no effect. > > -shared > Produce a shared object which can then be linked with other > objects to form an executable. Not all systems support this option. For > predictable results, > you must also specify the same set of options used for > compilation (-fpic, -fPIC, or model suboptions) when you specify this > linker option.[1] > > -shared-libgcc > -static-libgcc > On systems that provide libgcc as a shared library, these > options force the use of either the shared or static version, > respectively. If no shared version > of libgcc was built when the compiler was configured, these > options have no effect. > > There are several situations in which an application should use > the shared libgcc instead of the static version. The most common of these > is when the > application wishes to throw and catch exceptions across > different shared libraries. In that case, each of the libraries as well as > the application itself > should use the shared libgcc. > > Therefore, the G++ and GCJ drivers automatically add > -shared-libgcc whenever you build a shared library or a main executable, > because C++ and Java programs > typically use exceptions, so this is the right thing to do. > > -- > I have a side question for you, if you can answer. > How did Omilia implement their speaker independent speech recognition > corpus? Was it licensed from elsewhere or developed in house? > > Peter > > > > On Wed, Feb 14, 2018 at 8:27 AM, Petros Marinos wrote: > > > Thank you Arjen and Simon for your answers, really helpful! > > > > While there was progress by following the two commands noted in Arjen’s > > answer and creating the libsqlite.a file, I stumbled upon the following > > errors: > > > > [LD] astdb2sqlite3.o db1-ast/libdb1.a -> astdb2sqlite3 > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > In function `__libc_sigaction': > > (.text+0x89f0): multiple definition of `__libc_sigaction' > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ > > libc.a(sigaction.o):(.text+0x20): first defined here > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > In function `__libc_fsync': > > (.text+0x8100): multiple definition of `__libc_fsync' > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(fsync.o):(.text+0x0): > > first defined here > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > In function `__connect_nocancel': > > (.text+0x7dc9): multiple definition of `__connect_nocancel' > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(connect.o):(.text+0x9): > > first defined here > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > In function `__libc_fcntl': > > (.text+0x7c40): multiple definition of `__libc_fcntl' > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(fcntl.o):(.text+0xa0): > > first defined here > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > In function `__fsync_nocancel': > > (.text+0x8109): multiple definition of `__fsync_nocancel' > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(fsync.o):(.text+0x9): > > first defined here > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > In function `_IO_funlockfile': > > (.text+0x8990): multiple definition of `_IO_funlockfile' > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ > > libc.a(funlockfile.o):(.text+0x0): first defined here > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): > > In function `__libc_nanosleep': > > (.text+0x8220): multiple definition of `__libc_nanosleep' > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ > > libc.a(nanosle
Re: [sqlite] Static sqlite3 library for Linux
l_nocancel': (.text+0x7ba0): multiple definition of `__fcntl_nocancel' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(fcntl.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `__llseek': (.text+0x8160): multiple definition of `__libc_lseek' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(llseek.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `sigaction': (.text+0x8be0): multiple definition of `__sigaction' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(sigaction.o):(.text+0x210): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `__errno_location': (.text+0x9df0): multiple definition of `__errno_location' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(errno-loc.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `_IO_funlockfile': (.text+0x8990): multiple definition of `__funlockfile' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(funlockfile.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `__lll_lock_wait_private': (.text+0x77f0): multiple definition of `__lll_lock_wait_private' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(libc-lowlevellock.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `__write': (.text+0x7a80): multiple definition of `__libc_write' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(write.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `__nanosleep_nocancel': (.text+0x8229): multiple definition of `__nanosleep_nocancel' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(nanosleep.o):(.text+0x9): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `connect': (.text+0x7dc0): multiple definition of `__libc_connect' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(connect.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `__lll_unlock_wake_private': (.text+0x78a0): multiple definition of `__lll_unlock_wake_private' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(libc-lowlevellock.o):(.text+0x30): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `raise': (.text+0x8880): multiple definition of `raise' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(raise.o):(.text+0x0): first defined here /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `sem_open': (.text+0x6a23): warning: the use of `mktemp' is dangerous, better use `mkstemp' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libsqlite3.a(sqlite3.o): In function `unixDlOpen': sqlite3.c:(.text+0xf4d2): undefined reference to `dlopen' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libsqlite3.a(sqlite3.o): In function `unixDlError': sqlite3.c:(.text+0xf4f1): undefined reference to `dlerror' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libsqlite3.a(sqlite3.o): In function `unixDlSym': sqlite3.c:(.text+0xf53e): undefined reference to `dlsym' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libsqlite3.a(sqlite3.o): In function `unixDlClose': sqlite3.c:(.text+0xf570): undefined reference to `dlclose' collect2: error: ld returned 1 exit status make[1]: *** [astdb2sqlite3] Error 1 make: *** [utils] Error 2 There seems to be a conflict concerning the libc.a and libpthread.a static libraries? Maybe libc.a and/or libpthread.a are included in libsqlite3.a, but are conflicting with the equivalent static libraries provided by the "glibc-static" rpm? I would really appreciate your thoughts! :-) Best Regards, Petros On 14 Feb 2018, 16:33 +0200, Arjen Markus , wrote: > If you use the amalgamated source, there is only one file to be compiled. > That can be as simple as: > > gcc -c sqlite3.c > > ar r libsqlite3.a sqlite3.o > > > > Any further dependencies are up to the linker. No need to worry about that. > > > > Regards, > > > > Arjen > > > > -Original Message- > > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On > > Behalf > &
[sqlite] Static sqlite3 library for Linux
Greetings dears! While I am trying to build a static library of another tool which is dependent to sqlite, I need to use an sqlite3 static library as well. Still, in my Centos 7.4 system, I cannot find one. The error is shown below: /bin/ld: cannot find -lsqlite3 collect2: error: ld returned 1 exit status make[1]: *** [astdb2sqlite3] Error 1 make: *** [utils] Error 2 When I look for one with: yum provides */libsqlite*.a I find the Windows version: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libsqlite3.a Which of course is useless: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/…/…/…/…/lib64/libsqlite3.a: error adding symbols: File format not recognized collect2: error: ld returned 1 exit status make[1]: *** [astdb2sqlite3] Error 1 make: *** [utils] Error 2 Is there any chance that I can find a Linux flavour static sqlite3 library, or do I have to build from source? And if I have to build from source, is it recommended to use the sqlite-autoconf or the sqlite-src pkg? Or does the amalgamation file could be of any use, so as to avoid compilation etc? PS: One final relevant question, does the resulting libsqlite3.a file (when built from source), includes any other libraries like libc.a, libthread.a etc? Is there a way to avoid this? Thank you in advance for your time! Best Regards, Petros ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Static sqlite3 library for Linux.
Greetings! While I am trying to build a static library of another tool which is dependent to sqlite, I need to use an sqlite3 static library as well. Still, in my Centos 7.4 system, I cannot find one. The error is shown below: /bin/ld: cannot find -lsqlite3 collect2: error: ld returned 1 exit status make[1]: *** [astdb2sqlite3] Error 1 make: *** [utils] Error 2 When I look for one with: yum provides */libsqlite*.a I find the Windows version: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libsqlite3.a Which of course is useless: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/…/…/…/…/lib64/libsqlite3.a: error adding symbols: File format not recognized collect2: error: ld returned 1 exit status make[1]: *** [astdb2sqlite3] Error 1 make: *** [utils] Error 2 Is there any chance that I can find a Linux flavour static sqlite3 library, or do I have to build from source? And if I have to build from source, is it recommended to use the sqlite-autoconf or the sqlite-src pkg? Or does the amalgamation file could be of any use, so as to avoid compilation etc? PS: One final relevant question, does the resulting libsqlite3.a file (when built from source), includes any other libraries like libc.a, libthread.a etc? Is there a way to avoid this? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users