compilation error in Sqlite3

Post Reply
Manikandan
Posts: 59
Joined: Tue Feb 28, 2017 2:51 pm
languages_spoken: english
ODROIDs: ODROID C2
Has thanked: 4 times
Been thanked: 0
Contact:

compilation error in Sqlite3

Post by Manikandan »

Hi,
We tried to compile sqlite3 litesync but it shows below error . Is there any method to solve this error ?

odroid@odroid64:~/Documents$ gcc litesync.c -o litesyncout -ldl -pthread -llitesync
/usr/bin/ld: litesyncout: hidden symbol `pthread_atfork' in /usr/lib/aarch64-linux-gnu/libpthread_nonshared.a(pthread_atfork.oS) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Thanks & Regards
K.Manikandan

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: compilation error in Sqlite3

Post by odroid »

Which OS image and kernel version do you run?

Manikandan
Posts: 59
Joined: Tue Feb 28, 2017 2:51 pm
languages_spoken: english
ODROIDs: ODROID C2
Has thanked: 4 times
Been thanked: 0
Contact:

Re: compilation error in Sqlite3

Post by Manikandan »

OS Image :

odroid@odroid64:~/Documents$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial

Kernel Version:

odroid@odroid64:~/Documents$ uname -r
3.14.79-102
odroid@odroid64:~/Documents$ uname -a
Linux odroid64 3.14.79-102 #1 SMP PREEMPT Thu Jan 5 15:45:41 BRST 2017 aarch64 aarch64 aarch64 GNU/Linux
odroid@odroid64:~/Documents$

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: compilation error in Sqlite3

Post by odroid »

Can you try this latest Ubuntu 20.04 image?
https://wiki.odroid.com/odroid-c2/os_images/ubuntu/v4.1

Manikandan
Posts: 59
Joined: Tue Feb 28, 2017 2:51 pm
languages_spoken: english
ODROIDs: ODROID C2
Has thanked: 4 times
Been thanked: 0
Contact:

Re: compilation error in Sqlite3

Post by Manikandan »

Yes we tried that also but same error occurs

odroid@odroid:~/Documents/sqliteReplica$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal


With -pthread:

odroid@odroid:~/Documents/sqliteReplica$ gcc litesync.c -o litesyncout -llitesync -ldl -pthread
/usr/bin/ld: litesyncout: hidden symbol `pthread_atfork' in /usr/lib/aarch64-linux-gnu/libc_nonshared.a(pthread_atfork.oS) is referenced by DSO
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

With -lpthread:

odroid@odroid:~/Documents/sqliteReplica$ gcc litesync.c -o litesyncout -lpthread -llitesync -ldl
/usr/bin/ld: litesyncout: hidden symbol `pthread_atfork' in /usr/lib/aarch64-linux-gnu/libc_nonshared.a(pthread_atfork.oS) is referenced by DSO
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

Without -pthread:

odroid@odroid:~/Documents/sqliteReplica$ gcc litesync.c -o litesyncout -llitesync -ldl/usr/bin/ld: litesyncout: hidden symbol `pthread_atfork' in /usr/lib/aarch64-linux-gnu/libc_nonshared.a(pthread_atfork.oS) is referenced by DSO
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: compilation error in Sqlite3

Post by odroid »

Sorry. I have no idea why litesync has the pthread link error against the Ubuntu stock libc/glibc libraries since other SMP software have used pthread/lpthread without problem.
I hope other experts can help us.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 3 guests