Re: [sqlite] Static sqlite3 library for Linux
./../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 <arjen.mar...@deltares.nl>, > > 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-bounces@ > > mailinglists.sqlite.org] On Behalf > > > > Of Petros Marinos > > > > Sent: Wednesday, February 14, 2018 3:30 PM > > > > To: sqlite-users@mailinglists.sqlite.org > > > > Subject: [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 th
Re: [sqlite] Static sqlite3 library for Linux
8a0): 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 <arjen.mar...@deltares.nl>, > 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-bounces@ > mailinglists.sqlite.org] On Behalf > > > Of Petros Marinos > > > Sent: Wednesday, February 14, 2018 3:30 PM > > > To: sqlite-users@mailinglists.sqlite.org > > > Subject: [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/s
Re: [sqlite] Static sqlite3 library for Linux
rst 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 <arjen.mar...@deltares.nl>, 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 > > Of Petros Marinos > > Sent: Wednesday, February 14, 2018 3:30 PM > > To: sqlite-users@mailinglists.sqlite.org > > Subject: [sqlite] Static sqlite3 library for Linux > > > > Greetings dears! > > > > While I am trying to build a static library of anoth
Re: [sqlite] Static sqlite3 library for Linux.
On 13 Feb 2018, at 10:55am, Petros Marinoswrote: > 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? It is recommended, in all possible cases, that you include the amalgamation source code (one .c file and one .h file) in your project. Make sure your compiler understands that a .c file is C source code, not C++ source code. The object code size of sqlite.c is very small and should not bulk up your program by much. SQLite (talking about the API rather than the stand-alone tools) has no dependencies. Therefore if you include the source code in your project rather than using SQLite as a library, you are adding no dependencies to your project. This is important since a /lot/ of projects include SQLite and you can easily run into version disputes if you depend on a peculiarity of a certain version of SQLite. Simon. ___ 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
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 > Of Petros Marinos > Sent: Wednesday, February 14, 2018 3:30 PM > To: sqlite-users@mailinglists.sqlite.org > Subject: [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 DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. ___ 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 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