Re: [sqlite] More sqlite header questions

2018-02-15 Thread Simon Slavin


On 16 Feb 2018, at 1:39am, Jens Alfke  wrote:

> On Feb 15, 2018, at 4:53 PM, Simon Slavin  wrote:
> 
>> Given the way the documentation is arranged, and the lack of any mention to 
>> the contrary,  I will assume sqlite3_shutdown() is paired with 
>> sqlite_initialize(). 
> 
> There’s a sqlite_initialize function?? O_o



However, if you open a connection and you haven't already called it, it's 
called automatically.  So almost nobody cares about it.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3 related crash (SIGSEGV) in GNOME tracker-store

2018-02-15 Thread Paul Wise
Dan Kennedy wrote:

> To: SQLite mailing list , 

I didn't get your mail because I am not subscribed and was not CCed.

> In frame 0 of thread 1, what do the following gdb commands say?
> 
>print *pCache
>print *pPage

I can't provide that easily because of package upgrades.

However, I got a similar but slightly different crash today:

https://bugzilla.gnome.org/page.cgi?id=traceparser/trace.html_id=238398
https://bugzilla.gnome.org/attachment.cgi?id=368394

-- 
bye,
pabs

http://bonedaddy.net/pabs3/

signature.asc
Description: This is a digitally signed message part
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] More sqlite header questions

2018-02-15 Thread Jens Alfke


> On Feb 15, 2018, at 4:53 PM, Simon Slavin  wrote:
> 
> Given the way the documentation is arranged, and the lack of any mention to 
> the contrary,  I will assume sqlite3_shutdown() is paired with 
> sqlite_initialize(). 

There’s a sqlite_initialize function?? O_o

—Jens

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] More sqlite header questions

2018-02-15 Thread Simon Slavin
On 15 Feb 2018, at 11:10pm, Jens Alfke  wrote:

>> On Feb 15, 2018, at 10:09 AM, Simon Slavin  wrote:
>> 
>>> 1) I can't be the only programmer who learned to make paired calls ("If you 
>>> initialise something, it needs deinitializing, if you allocate something, 
>>> deallocate it.").
> 
> When a process exits, its resources are automatically cleaned up by the 
> kernel — memory and address space freed, file handles and sockets closed, 
> etc. So it’s generally unnecessary to do redundant cleanup like 
> sqlite3_shutdown* on quit, and it can actually slow things down**, especially 
> if freeing a zillion heap blocks that have been paged out or are no longer in 
> CPU caches.
> 
> —Jens
> 
> * This doesn’t apply to sqlite3_close() on a writeable database, since SQLite 
> may need to update data in the file before closing it.

Your footnote is an example of the reason I do paired calls.  I didn't write 
the SQLite API.  I don't know whether sqlite3_shutdown() does anything.  For 
all I know, sqlite3_shutdown() is the thing that deletes dead journal and 
shared memory files.  Maybe it slows things down too much to do that on 
sqlite3_close().  I don't know.

Given the way the documentation is arranged, and the lack of any mention to the 
contrary,  I will assume sqlite3_shutdown() is paired with sqlite_initialize(). 
 One of the Developer team tells me it'd not needed except for cases where your 
process isn't about to quit ?  Fine.  But that should really be in the 
documentation so people who don't read this list know it.  Because the name 
sqlite3_shutdown(), and the documentation for it, implies you should call it 
when sqlite3_initialize() has been called and you don't need SQLite any more.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] More sqlite header questions

2018-02-15 Thread Jens Alfke


> On Feb 15, 2018, at 10:09 AM, Simon Slavin  wrote:
> 
> 1) I can't be the only programmer who learned to make paired calls ("If you 
> initialise something, it needs deinitializing, if you allocate something, 
> deallocate it.").

When a process exits, its resources are automatically cleaned up by the kernel 
— memory and address space freed, file handles and sockets closed, etc. So it’s 
generally unnecessary to do redundant cleanup like sqlite3_shutdown* on quit, 
and it can actually slow things down**, especially if freeing a zillion heap 
blocks that have been paged out or are no longer in CPU caches.

—Jens

* This doesn’t apply to sqlite3_close() on a writeable database, since SQLite 
may need to update data in the file before closing it.
**  Case in point: One of the optimizations added to MacOS about five years ago 
was ‘fast termination’, wherein quitting an app will terminate it instantly 
with a simple call to exit(0) if the app code doesn’t have any special cleanup 
it needs to do.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Advice for a "how-to" situation.

2018-02-15 Thread Michael Tiernan

On 2/15/18 2:55 PM, Simon Slavin wrote:

By the way, your use of backticks to identify column names
That's a quirk of the "schema" command that I used to export the sample 
that I'm playing with.


However, thanks for the reminder.

And thanks to everyone for the advice on how to do this.

I'm going to dive in now.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Advice for a "how-to" situation.

2018-02-15 Thread Simon Slavin
On 15 Feb 2018, at 7:19pm, Michael Tiernan  wrote:

> This might be a general RDBMS question but since I'm using sqlite 
> specifically, I hope it passes basic relevancy tests.

I don't think we have any problem answering SQL questions here, as long as 
they're good ones.

> I have a table defined as:
> 
> CREATE TABLE "CPUModelDictionary" (
>   `vendor_id` TEXT,

Make that TEXT COLLATE NOCASE.  It will save time and programming when you want 
to do searches and sorts.

>   `cpu_model_name`TEXT,

and that one too.

> The five fields used in the index create a unique identifier.

Then do CREATE UNIQUE INDEX.  That way SQL will enforce the uniqueness.

> I want to reference these rows via a single reference field but I'm not sure 
> if there's a "smarter" way to do it. I considered just creating a field 
> that's a concatenation of the five fields and using that as the unique link 
> to the rows but I'm sure that it's not the best way to do it.

I agree with Peter Da Silva.  Declare the unique rowid column for the 
"CPUModelDictionary" table:

CREATE TABLE "CPUModelDictionary" (
`rowid` INTEGER PRIMARY KEY,
`vendor_id` TEXT COLLATE NOCASE,
`cpu_family`INTEGER, etc.

From that point onwards you have a unique number which refers to each row in 
the table.  When you want to refer to a specific combination of characteristics 
you can use that single integer.  This is called "normalisation" and is a 
standard way to do things in SQL.

By the way, your use of backticks to identify column names is not wrong, but it 
is rarely done these days and can lead to problems because strings in SQLite 
are delimited with apostrophes 'string' which look almost the same.  Most 
SQLite programmers use column names without any surrounding characters.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Advice for a "how-to" situation.

2018-02-15 Thread Peter Da Silva
Seems like you'd want to create a rowid primary key (internal_id integer 
primary key) that's the foreign key for the other table.

On 2/15/18, 1:19 PM, "sqlite-users on behalf of Michael Tiernan" 
 wrote:
(The objective is to have a single field in another table that 
identifies the CPU used in a system. It will be a many-to-one reference 
to this CPUModel.)

Any advice? Pointers to documentation offering advice will help too.

Thanks for everyone's time.
___
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


[sqlite] Advice for a "how-to" situation.

2018-02-15 Thread Michael Tiernan
This might be a general RDBMS question but since I'm using sqlite 
specifically, I hope it passes basic relevancy tests.


I have a table defined as:

CREATE TABLE "CPUModelDictionary" (
`vendor_id` TEXT,
`cpu_family`INTEGER,
`cpu_model` INTEGER,
`cpuid_level`   INTEGER,
`cpu_model_name`TEXT,
`cpu_cores` INTEGER,
`cpu_MHz`   INTEGER
);
CREATE INDEX `idx_CPUModels` ON `CPUModelDictionary` (
`cpu_family`,
`cpu_model`,
`cpuid_level`,
`cpu_cores`,
`cpu_MHz`
);

that contains rows like this:

'GenuineIntel',6,62,13,'Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz',8,2620
'GenuineIntel',6,63,15,'Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz',8,2600
'GenuineIntel',6,79,20,'Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz',8,1200

The five fields used in the index create a unique identifier.

I want to reference these rows via a single reference field but I'm not 
sure if there's a "smarter" way to do it. I considered just creating a 
field that's a concatenation of the five fields and using that as the 
unique link to the rows but I'm sure that it's not the best way to do it.


(The objective is to have a single field in another table that 
identifies the CPU used in a system. It will be a many-to-one reference 
to this CPUModel.)


Any advice? Pointers to documentation offering advice will help too.

Thanks for everyone's time.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] More sqlite header questions

2018-02-15 Thread Simon Slavin
On 15 Feb 2018, at 5:30pm, Dan Kennedy  wrote:

> (B) is an understandably common misconception. sqlite3_shutdown() frees 
> resources that were allocated by sqlite3_initialize() or 
> sqlite3_auto_extension() and must be called after all SQLite connections have 
> been closed. These resources are either trivial or non-existent on almost all 
> platforms - so in practice sqlite3_shutdown() is only useful on embedded 
> systems that do not free such resources automatically when a process exits, 
> or in other obscure circumstances.
> 
> Don't call sqlite3_shutdown()!

Thanks for your informative correction.  Is there a chance of amending the 
documentation with the above text ?  I have two problems with the existing 
documentation:

1) I can't be the only programmer who learned to make paired calls ("If you 
initialise something, it needs deinitializing, if you allocate something, 
deallocate it.").

2) I thought that sqlite3_shutdown() called sqlite3_close() on any open 
connections.  In other words, that if keeping track of your connections was 
difficult it might be simpler to just call sqlite3_shutdown().

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [Legacy Email] Re: Static sqlite3 library for Linux

2018-02-15 Thread Reid Thompson
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+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 

Re: [sqlite] More sqlite header questions

2018-02-15 Thread Dan Kennedy

On 02/14/2018 04:03 AM, Simon Slavin wrote:

On 13 Feb 2018, at 8:22pm, Chris Brody  wrote:


Thanks Simon for the quick response.

You're welcome.


Can you clarify the following:
- Does this imply that a SQLite database may be left in some kind of
unrecoverable, corrupted, or otherwise invalid state in case an
application would terminate without calling sqlite3_close() on all
open database connections?

Your program is meant to do one of two things:

A) Close all database connections.
B) Call sqlite3_shutdown(), which will close everything and release all memory 
in a correct and orderly fashion.



(B) is an understandably common misconception. sqlite3_shutdown() frees 
resources that were allocated by sqlite3_initialize() or 
sqlite3_auto_extension() and must be called after all SQLite connections 
have been closed. These resources are either trivial or non-existent on 
almost all platforms - so in practice sqlite3_shutdown() is only useful 
on embedded systems that do not free such resources automatically when a 
process exits, or in other obscure circumstances.


Don't call sqlite3_shutdown()!

  http://sqlite.org/c3ref/initialize.html

Dan.







If you do not do either of these things, it /might/ be possible to find that 
your database files are left in an inconsistent state.  But even if it does 
happen, the next time the database is opened using the SQLite API, SQLite will 
figure out what happened and restore the database to valid state.

Rather than unexpected termination you should be more worried about a program 
crashing or losing power in the middle of a SQLite call.  But SQLite was 
written to cope with this, too.


- If yes, what can a programmer do to protect the data in case an
application is abruptly terminated for any reason?

If there was anything, the fix would already be built into SQLite, or it would be 
prominently listed in the "how to use SQLite" pages.

If you think you have a corrupted database, reopen it using the SQLite API, 
then (after using it if you want) close it properly.  This is always the answer 
unless you want to forensically investigate the cause of corruption.


- Would using SQLITE_DEFAULT_SYNCHRONOUS=3 (extra durable) help
mitigate this kind of possible corruption?

I'm gonna let one of the developer team answer this.  I suspect that the answer 
depends on your operating system, and your storage device and its driver.

Durability is the foe of execution time.  It would be possible to make SQLite 
one third as subject to corruption -- at the cost of every command that reads 
or writes the database taking nine times as long.


I think this is especially important for mobile apps which may be
terminated without notice, especially when using hybrid app frameworks
such as Cordova/PhoneGap.

No mobile OS I'm aware of will allow termination of a program while it's in the 
middle of a SQLite API call, unless some other part of the application is hung 
and refusing to terminate.  This is part of the design of mobile operating 
systems which are designed to expect unpredictable backgrounding and 
termination.

I can go into great detail about how iOS warns a program about backgrounding 
and termination, so that it can close in a graceful manner.  I assume Android 
does something similar.


However, the SQLite library goes through heroic measures
[...]

I am sure that this was at the cost of many heroic programmer hours.

Not to mention the proportion of SQLite's source code which is devoted to 
detecting and fixing corruption rather than doing mundane database work.

Simon.
___
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] Static sqlite3 library for Linux

2018-02-15 Thread Petros Marinos
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(nanosleep.o):(.text+0x0): first defined here
> > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o):
> > In function `__read':
> > (.text+0x7ae0): multiple definition of `__libc_read'
> > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(read.o):(.text+0x0):
> > first defined here
> > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o):
> > In function